fix(DB/ZulGurub): Hoodoo Piles should not melee atack their targets. (#12269)
Will of Hakkar is casted on pile looter. Fixes #12186
This commit is contained in:
parent
bafc72e675
commit
f6ede1a503
2 changed files with 9 additions and 4 deletions
|
|
@ -2058,17 +2058,16 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
|
|||
bool self = false;
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if (spellInfo->Effects[i].TargetA.GetTarget() == TARGET_UNIT_CASTER)
|
||||
if (spellInfo->Effects[i].TargetA.GetReferenceType() == TARGET_REFERENCE_TYPE_CASTER && !spellInfo->Effects[i].TargetB.GetTarget())
|
||||
{
|
||||
self = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (self)
|
||||
if (self && target && target->GetGUID() != GetGUID())
|
||||
{
|
||||
if (target)
|
||||
target->CastSpell(target, spellInfo, true);
|
||||
target->CastSpell(target, spellInfo, true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue