Quantcast
Spell cast via raid marked mob (not targeted) - WoWInterface
Thread Tools Display Modes
06-29-21, 04:03 PM   #1
bella123
A Kobold Labourer
Join Date: Jun 2021
Posts: 1
Spell cast via raid marked mob (not targeted)

Looking for help on creating an WA triggers based on the following:

if mob's icon == {skull} and spell == X
then
run this block of code
end

without having the mob targeted.

I pulled up a WA from KT interrupt thing and it was showing:

if subEvent == "SPELL_CAST_START" then
local spellName = (select(13,...))
local sourceName = (select(5,...))
if spellName == "Y" and sourceName == "X" then
aura_env.counter = (aura_env.counter%3)+1
if aura_env.config.group == aura_env.counter then
allstates[""] = {
show = true,
changed = true,
autoHide = true,
duration = 2,
}
end
end

I was looking to replace source name with the block needed to pull from a mob with a raid icon (once again not targeted). Any help would be greatly appreciated!

P.S. For TBCC
  Reply With Quote
06-29-21, 04:21 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,641
I doubt it is possible .. But if there is a way hopefully someone will know it and let you know

https://wowpedia.fandom.com/wiki/API_GetRaidTargetIndex

index = GetRaidTargetIndex(unit)

This appears to be the best option .. but it would still mean hoping someone in the group has them targeted and use something like raid1target as the unit id

There doesn't appear to be any other function related to this except the one that sets the icon to a unit.
__________________
  Reply With Quote
06-29-21, 08:10 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,049
You can check the RaidFlags parameters from COMBAT_LOG_EVENT_UNFILTERED.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
06-29-21, 08:54 PM   #4
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,641
I knew someone would know of something
__________________
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Spell cast via raid marked mob (not targeted)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off