Core/AI: refactor SpellHit and SpellHitTarget.
Port From (https://github.com/TrinityCore/TrinityCore/commit/3171cd3fa9dbcec43f5d70b74ab2f54a2aa44173)
This commit is contained in:
@@ -72,13 +72,13 @@ namespace Scripts.Pets
|
||||
}
|
||||
|
||||
// Fly away when dismissed
|
||||
public override void SpellHit(Unit source, SpellInfo spell)
|
||||
public override void SpellHit(WorldObject caster, SpellInfo spellInfo)
|
||||
{
|
||||
if (spell.Id != SpellIds.DismissGargoyle || !me.IsAlive())
|
||||
if (spellInfo.Id != SpellIds.DismissGargoyle || !me.IsAlive())
|
||||
return;
|
||||
|
||||
Unit owner = me.GetOwner();
|
||||
if (!owner || owner != source)
|
||||
if (!owner || owner != caster)
|
||||
return;
|
||||
|
||||
// Stop Fighting
|
||||
|
||||
Reference in New Issue
Block a user