Core/Scripts: Rename recent GameObject spell overloads to fix warnings
Port From (https://github.com/TrinityCore/TrinityCore/commit/a4fcfbb3afe388f90725734b0180ad8322277b7d)
This commit is contained in:
@@ -388,11 +388,11 @@ namespace Game.AI
|
||||
|
||||
// Called when hit by a spell
|
||||
public virtual void SpellHit(Unit caster, SpellInfo spellInfo) { }
|
||||
public virtual void SpellHit(GameObject caster, SpellInfo spellInfo) { }
|
||||
public virtual void SpellHitByGameObject(GameObject caster, SpellInfo spellInfo) { }
|
||||
|
||||
// Called when spell hits a target
|
||||
public virtual void SpellHitTarget(Unit target, SpellInfo spellInfo) { }
|
||||
public virtual void SpellHitTarget(GameObject target, SpellInfo spellInfo) { }
|
||||
public virtual void SpellHitTargetGameObject(GameObject target, SpellInfo spellInfo) { }
|
||||
|
||||
public virtual bool IsEscorted() { return false; }
|
||||
|
||||
|
||||
@@ -96,10 +96,10 @@ namespace Game.AI
|
||||
|
||||
// Called when hit by a spell
|
||||
public virtual void SpellHit(Unit caster, SpellInfo spellInfo) { }
|
||||
public virtual void SpellHit(GameObject caster, SpellInfo spellInfo) { }
|
||||
public virtual void SpellHitByGameObject(GameObject caster, SpellInfo spellInfo) { }
|
||||
|
||||
// Called when spell hits a target
|
||||
public virtual void SpellHitTarget(Unit target, SpellInfo spellInfo) { }
|
||||
public virtual void SpellHitTarget(GameObject target, SpellInfo spellInfo) { }
|
||||
public virtual void SpellHitTargetGameObject(GameObject target, SpellInfo spellInfo) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8029,7 +8029,7 @@ namespace Game.Spells
|
||||
if (hitTargetAI != null)
|
||||
{
|
||||
if (spell.GetCaster().IsGameObject())
|
||||
hitTargetAI.SpellHit(spell.GetCaster().ToGameObject(), spell.m_spellInfo);
|
||||
hitTargetAI.SpellHitByGameObject(spell.GetCaster().ToGameObject(), spell.m_spellInfo);
|
||||
else
|
||||
hitTargetAI.SpellHit(spell.GetCaster().ToUnit(), spell.m_spellInfo);
|
||||
}
|
||||
@@ -8088,15 +8088,15 @@ namespace Game.Spells
|
||||
if (go.GetAI() != null)
|
||||
{
|
||||
if (spell.GetCaster().IsGameObject())
|
||||
go.GetAI().SpellHit(spell.GetCaster().ToGameObject(), spell.m_spellInfo);
|
||||
go.GetAI().SpellHitByGameObject(spell.GetCaster().ToGameObject(), spell.m_spellInfo);
|
||||
else
|
||||
go.GetAI().SpellHit(spell.GetCaster().ToUnit(), spell.m_spellInfo);
|
||||
}
|
||||
|
||||
if (spell.GetCaster().IsCreature() && spell.GetCaster().ToCreature().IsAIEnabled())
|
||||
spell.GetCaster().ToCreature().GetAI().SpellHitTarget(go, spell.m_spellInfo);
|
||||
spell.GetCaster().ToCreature().GetAI().SpellHitTargetGameObject(go, spell.m_spellInfo);
|
||||
else if (spell.GetCaster().IsGameObject() && spell.GetCaster().ToGameObject().GetAI() != null)
|
||||
spell.GetCaster().ToGameObject().GetAI().SpellHitTarget(go, spell.m_spellInfo);
|
||||
spell.GetCaster().ToGameObject().GetAI().SpellHitTargetGameObject(go, spell.m_spellInfo);
|
||||
|
||||
spell.CallScriptOnHitHandlers();
|
||||
spell.CallScriptAfterHitHandlers();
|
||||
|
||||
Reference in New Issue
Block a user