aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Scripting
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2017-04-28 17:58:39 -0300
committerariel- <ariel-@users.noreply.github.com>2017-04-28 18:59:14 -0300
commitb6b59f6c239bc0259c92c28bf43bbb50573330b5 (patch)
tree5d139085583dfe98f632821ea590da89a29d4c2b /src/server/game/Scripting
parent4c4dca6d694bd1064b403a31a5b1c776a326f3ce (diff)
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
Diffstat (limited to 'src/server/game/Scripting')
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp27
-rw-r--r--src/server/game/Scripting/ScriptMgr.h12
2 files changed, 0 insertions, 39 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index fa2c23c978e..1ed163745d3 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -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);
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index 10df2ecf970..e053a8b4c63 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -365,9 +365,6 @@ class TC_GAME_API ItemScript : public ScriptObject
public:
- // Called when a dummy spell effect is triggered on the item.
- virtual bool OnDummyEffect(Unit* /*caster*/, uint32 /*spellId*/, SpellEffIndex /*effIndex*/, Item* /*target*/) { return false; }
-
// Called when a player accepts a quest from the item.
virtual bool OnQuestAccept(Player* /*player*/, Item* /*item*/, Quest const* /*quest*/) { return false; }
@@ -415,9 +412,6 @@ class TC_GAME_API CreatureScript : public UnitScript, public UpdatableScript<Cre
public:
- // Called when a dummy spell effect is triggered on the creature.
- virtual bool OnDummyEffect(Unit* /*caster*/, uint32 /*spellId*/, SpellEffIndex /*effIndex*/, Creature* /*target*/) { return false; }
-
// Called when a player opens a gossip dialog with the creature.
virtual bool OnGossipHello(Player* /*player*/, Creature* /*creature*/) { return false; }
@@ -454,9 +448,6 @@ class TC_GAME_API GameObjectScript : public ScriptObject, public UpdatableScript
public:
- // Called when a dummy spell effect is triggered on the gameobject.
- virtual bool OnDummyEffect(Unit* /*caster*/, uint32 /*spellId*/, SpellEffIndex /*effIndex*/, GameObject* /*target*/) { return false; }
-
// Called when a player opens a gossip dialog with the gameobject.
virtual bool OnGossipHello(Player* /*player*/, GameObject* /*go*/) { return false; }
@@ -954,7 +945,6 @@ class TC_GAME_API ScriptMgr
public: /* ItemScript */
- bool OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex, Item* target);
bool OnQuestAccept(Player* player, Item* item, Quest const* quest);
bool OnItemUse(Player* player, Item* item, SpellCastTargets const& targets);
bool OnItemExpire(Player* player, ItemTemplate const* proto);
@@ -963,7 +953,6 @@ class TC_GAME_API ScriptMgr
public: /* CreatureScript */
- bool OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex, Creature* target);
bool OnGossipHello(Player* player, Creature* creature);
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action);
bool OnGossipSelectCode(Player* player, Creature* creature, uint32 sender, uint32 action, const char* code);
@@ -977,7 +966,6 @@ class TC_GAME_API ScriptMgr
public: /* GameObjectScript */
- bool OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex, GameObject* target);
bool OnGossipHello(Player* player, GameObject* go);
bool OnGossipSelect(Player* player, GameObject* go, uint32 sender, uint32 action);
bool OnGossipSelectCode(Player* player, GameObject* go, uint32 sender, uint32 action, const char* code);