Core/Scripts: remove OnDummyEffect hook/sOnDummyEffect ai hook
- Duplicated logic never used, sometimes only ScriptMgr version was called, sometimes only AI - They only encourage bad scripting practices - You can still use OnSpellHit or a SpellScript
This commit is contained in:
1 parent
c015a5cf10
commit
f3246f835c
10 files changed
+10
-76
No files matched your search
@@ -593,15 +593,6 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
// normal DB scripted effect
|
||||
TC_LOG_DEBUG("spells", "Spell ScriptStart spellid %u in EffectDummy(%u)", m_spellInfo->Id, effIndex);
|
||||
m_caster->GetMap()->ScriptsStart(sSpellScripts, uint32(m_spellInfo->Id | (effIndex << 24)), m_caster, unitTarget);
|
||||
|
||||
// Script based implementation. Must be used only for not good for implementation in core spell effects
|
||||
// So called only for not proccessed cases
|
||||
if (gameObjTarget)
|
||||
sScriptMgr->OnDummyEffect(m_caster, m_spellInfo->Id, effIndex, gameObjTarget);
|
||||
else if (unitTarget && unitTarget->GetTypeId() == TYPEID_UNIT)
|
||||
sScriptMgr->OnDummyEffect(m_caster, m_spellInfo->Id, effIndex, unitTarget->ToCreature());
|
||||
else if (itemTarget)
|
||||
sScriptMgr->OnDummyEffect(m_caster, m_spellInfo->Id, effIndex, itemTarget);
|
||||
}
|
||||
|
||||
void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
|
||||
|
||||
Reference in new issue
Block a user