From a4fcfbb3afe388f90725734b0180ad8322277b7d Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sat, 27 Apr 2019 23:38:48 +0200 Subject: Core/Scripts: Rename recent GameObject spell overloads to fix GCC warnings Rename recent GameObject spell overloads (they used to accept only Unit as parameters) to fix GCC warnings about partial function override. (cherry picked from commit e3a9a9bfb2cba3fc1f6ed616b07fb0ea88de461f) --- src/server/game/Spells/Spell.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/game/Spells/Spell.cpp') diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 34bcb020e4b..8083c08479f 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2638,7 +2638,7 @@ void Spell::TargetInfo::DoDamageAndTriggers(Spell* spell) if (CreatureAI* hitTargetAI = cHitTarget->AI()) { if (spell->m_caster->GetTypeId() == TYPEID_GAMEOBJECT) - hitTargetAI->SpellHit(spell->m_caster->ToGameObject(), spell->m_spellInfo); + hitTargetAI->SpellHitByGameObject(spell->m_caster->ToGameObject(), spell->m_spellInfo); else hitTargetAI->SpellHit(spell->m_caster->ToUnit(), spell->m_spellInfo); } @@ -2689,15 +2689,15 @@ void Spell::GOTargetInfo::DoTargetSpellHit(Spell* spell, SpellEffectInfo const& if (go->AI()) { if (spell->m_caster->GetTypeId() == TYPEID_GAMEOBJECT) - go->AI()->SpellHit(spell->m_caster->ToGameObject(), spell->m_spellInfo); + go->AI()->SpellHitByGameObject(spell->m_caster->ToGameObject(), spell->m_spellInfo); else go->AI()->SpellHit(spell->m_caster->ToUnit(), spell->m_spellInfo); } if (spell->m_caster->GetTypeId() == TYPEID_UNIT && spell->m_caster->ToCreature()->IsAIEnabled()) - spell->m_caster->ToCreature()->AI()->SpellHitTarget(go, spell->m_spellInfo); + spell->m_caster->ToCreature()->AI()->SpellHitTargetGameObject(go, spell->m_spellInfo); else if (spell->m_caster->GetTypeId() == TYPEID_GAMEOBJECT && spell->m_caster->ToGameObject()->AI()) - spell->m_caster->ToGameObject()->AI()->SpellHitTarget(go, spell->m_spellInfo); + spell->m_caster->ToGameObject()->AI()->SpellHitTargetGameObject(go, spell->m_spellInfo); spell->CallScriptOnHitHandlers(); spell->CallScriptAfterHitHandlers(); -- cgit v1.2.3