From 28a06b88fc79cd28cf7274174ba921ddda5354fc Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Mon, 15 Sep 2014 10:04:42 +0300 Subject: [PATCH] Eluna: Remove on quest end hook because it doesnt function correctly and there is a replacement --- HookMgr.cpp | 40 ++++++++++++++++++++-------------------- HookMgr.h | 4 ++-- LuaEngine.h | 4 ++-- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/HookMgr.cpp b/HookMgr.cpp index 7c59efb..7aa36e0 100644 --- a/HookMgr.cpp +++ b/HookMgr.cpp @@ -1403,16 +1403,16 @@ bool Eluna::OnQuestAccept(Player* pPlayer, Creature* pCreature, Quest const* pQu return true; } -bool Eluna::OnQuestComplete(Player* pPlayer, Creature* pCreature, Quest const* pQuest) -{ - ENTRY_BEGIN(CreatureEventBindings, pCreature->GetEntry(), CREATURE_EVENT_ON_QUEST_COMPLETE, return false); - Push(L, pPlayer); - Push(L, pCreature); - Push(L, pQuest); - ENTRY_EXECUTE(0); - ENDCALL(); - return true; -} +//bool Eluna::OnQuestComplete(Player* pPlayer, Creature* pCreature, Quest const* pQuest) +//{ +// ENTRY_BEGIN(CreatureEventBindings, pCreature->GetEntry(), CREATURE_EVENT_ON_QUEST_COMPLETE, return false); +// Push(L, pPlayer); +// Push(L, pCreature); +// Push(L, pQuest); +// ENTRY_EXECUTE(0); +// ENDCALL(); +// return true; +//} bool Eluna::OnQuestReward(Player* pPlayer, Creature* pCreature, Quest const* pQuest) { @@ -1822,16 +1822,16 @@ bool Eluna::OnQuestAccept(Player* pPlayer, GameObject* pGameObject, Quest const* return true; } -bool Eluna::OnQuestComplete(Player* pPlayer, GameObject* pGameObject, Quest const* pQuest) -{ - ENTRY_BEGIN(GameObjectEventBindings, pGameObject->GetEntry(), GAMEOBJECT_EVENT_ON_QUEST_COMPLETE, return false); - Push(L, pPlayer); - Push(L, pGameObject); - Push(L, pQuest); - ENTRY_EXECUTE(0); - ENDCALL(); - return true; -} +//bool Eluna::OnQuestComplete(Player* pPlayer, GameObject* pGameObject, Quest const* pQuest) +//{ +// ENTRY_BEGIN(GameObjectEventBindings, pGameObject->GetEntry(), GAMEOBJECT_EVENT_ON_QUEST_COMPLETE, return false); +// Push(L, pPlayer); +// Push(L, pGameObject); +// Push(L, pQuest); +// ENTRY_EXECUTE(0); +// ENDCALL(); +// return true; +//} void Eluna::UpdateAI(GameObject* pGameObject, uint32 diff) { diff --git a/HookMgr.h b/HookMgr.h index a76ebda..aa602e9 100644 --- a/HookMgr.h +++ b/HookMgr.h @@ -226,7 +226,7 @@ namespace HookMgr CREATURE_EVENT_ON_DUMMY_EFFECT = 30, // (event, caster, spellid, effindex, creature) CREATURE_EVENT_ON_QUEST_ACCEPT = 31, // (event, player, creature, quest) // UNUSED = 32, // (event, creature) - CREATURE_EVENT_ON_QUEST_COMPLETE = 33, // (event, player, creature, quest) + // CREATURE_EVENT_ON_QUEST_COMPLETE = 33, // (event, player, creature, quest) Decapreted, use CREATURE_EVENT_ON_QUEST_REWARD CREATURE_EVENT_ON_QUEST_REWARD = 34, // (event, player, creature, quest, opt) CREATURE_EVENT_ON_DIALOG_STATUS = 35, // (event, player, creature) CREATURE_EVENT_ON_ADD = 36, // (event, creature) @@ -247,7 +247,7 @@ namespace HookMgr GAMEOBJECT_EVENT_ON_DAMAGED = 8, // (event, go, player) GAMEOBJECT_EVENT_ON_LOOT_STATE_CHANGE = 9, // (event, go, state) GAMEOBJECT_EVENT_ON_GO_STATE_CHANGED = 10, // (event, go, state) - GAMEOBJECT_EVENT_ON_QUEST_COMPLETE = 11, // (event, player, go, quest) + // GAMEOBJECT_EVENT_ON_QUEST_COMPLETE = 11, // (event, player, go, quest) Decapreted, use GAMEOBJECT_EVENT_ON_QUEST_COMPLETE GAMEOBJECT_EVENT_ON_ADD = 12, // (event, gameobject) GAMEOBJECT_EVENT_ON_REMOVE = 13, // (event, gameobject) GAMEOBJECT_EVENT_COUNT diff --git a/LuaEngine.h b/LuaEngine.h index b7211bb..e64aebe 100644 --- a/LuaEngine.h +++ b/LuaEngine.h @@ -219,7 +219,7 @@ public: bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action); bool OnGossipSelectCode(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action, const char* code); bool OnQuestAccept(Player* pPlayer, Creature* pCreature, Quest const* pQuest); - bool OnQuestComplete(Player* pPlayer, Creature* pCreature, Quest const* pQuest); + //bool OnQuestComplete(Player* pPlayer, Creature* pCreature, Quest const* pQuest); bool OnQuestReward(Player* pPlayer, Creature* pCreature, Quest const* pQuest); uint32 GetDialogStatus(Player* pPlayer, Creature* pCreature); void OnSummoned(Creature* creature, Unit* summoner); @@ -230,7 +230,7 @@ public: bool OnGossipSelect(Player* pPlayer, GameObject* pGameObject, uint32 sender, uint32 action); bool OnGossipSelectCode(Player* pPlayer, GameObject* pGameObject, uint32 sender, uint32 action, const char* code); bool OnQuestAccept(Player* pPlayer, GameObject* pGameObject, Quest const* pQuest); - bool OnQuestComplete(Player* pPlayer, GameObject* pGameObject, Quest const* pQuest); + //bool OnQuestComplete(Player* pPlayer, GameObject* pGameObject, Quest const* pQuest); bool OnQuestReward(Player* pPlayer, GameObject* pGameObject, Quest const* pQuest); uint32 GetDialogStatus(Player* pPlayer, GameObject* pGameObject); #ifndef CLASSIC