Core/AI: refactor SpellHit and SpellHitTarget.

Port From (https://github.com/TrinityCore/TrinityCore/commit/3171cd3fa9dbcec43f5d70b74ab2f54a2aa44173)
This commit is contained in:
hondacrx
2022-02-23 16:02:13 -05:00
parent 19abbbf0b5
commit c41acd0bc8
7 changed files with 28 additions and 206 deletions
+3 -3
View File
@@ -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