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
committed by Aokromes
parent c015a5cf10
commit f3246f835c
10 changed files with 10 additions and 76 deletions

View File

@@ -362,9 +362,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; }
@@ -409,9 +406,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; }
@@ -448,9 +442,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; }
@@ -948,7 +939,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);
@@ -956,7 +946,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);
@@ -970,7 +959,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);