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

(cherry picked from commit b6b59f6c23)
This commit is contained in:
ariel-
2017-04-28 17:58:39 -03:00
committed by funjoker
parent 93c19c4194
commit 1929ca3aa1
10 changed files with 3 additions and 80 deletions

View File

@@ -1637,15 +1637,6 @@ InstanceScript* ScriptMgr::CreateInstanceData(InstanceMap* map)
return tmpscript->GetInstanceScript(map);
}
bool ScriptMgr::OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex, Item* target)
{
ASSERT(caster);
ASSERT(target);
GET_SCRIPT_RET(ItemScript, target->GetScriptId(), tmpscript, false);
return tmpscript->OnDummyEffect(caster, spellId, effIndex, target);
}
bool ScriptMgr::OnQuestAccept(Player* player, Item* item, Quest const* quest)
{
ASSERT(player);
@@ -1695,15 +1686,6 @@ bool ScriptMgr::OnCastItemCombatSpell(Player* player, Unit* victim, SpellInfo co
return tmpscript->OnCastItemCombatSpell(player, victim, spellInfo, item);
}
bool ScriptMgr::OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex, Creature* target)
{
ASSERT(caster);
ASSERT(target);
GET_SCRIPT_RET(CreatureScript, target->GetScriptId(), tmpscript, false);
return tmpscript->OnDummyEffect(caster, spellId, effIndex, target);
}
bool ScriptMgr::OnGossipHello(Player* player, Creature* creature)
{
ASSERT(player);
@@ -1920,15 +1902,6 @@ void ScriptMgr::OnGameObjectUpdate(GameObject* go, uint32 diff)
tmpscript->OnUpdate(go, diff);
}
bool ScriptMgr::OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex, GameObject* target)
{
ASSERT(caster);
ASSERT(target);
GET_SCRIPT_RET(GameObjectScript, target->GetScriptId(), tmpscript, false);
return tmpscript->OnDummyEffect(caster, spellId, effIndex, target);
}
bool ScriptMgr::OnAreaTrigger(Player* player, AreaTriggerEntry const* trigger, bool entered)
{
ASSERT(player);