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:
ariel-
2017-04-28 17:58:39 -03:00
parent 4c4dca6d69
commit b6b59f6c23
10 changed files with 3 additions and 80 deletions

View File

@@ -1512,15 +1512,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);
@@ -1570,15 +1561,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);
@@ -1787,15 +1769,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)
{
ASSERT(player);