mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Removed OnQuestComplete hook, use QuestReward instead. Implemented OnQuestStatusChange hook
Also fixed some comments and added overrides The OnQuestComplete hook was unused and didnt work properly
This commit is contained in:
@@ -774,17 +774,6 @@ bool ScriptMgr::OnQuestSelect(Player* player, Creature* creature, Quest const* q
|
||||
return tmpscript->OnQuestSelect(player, creature, quest);
|
||||
}
|
||||
|
||||
bool ScriptMgr::OnQuestComplete(Player* player, Creature* creature, Quest const* quest)
|
||||
{
|
||||
ASSERT(player);
|
||||
ASSERT(creature);
|
||||
ASSERT(quest);
|
||||
|
||||
GET_SCRIPT_RET(CreatureScript, creature->GetScriptId(), tmpscript, false);
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
return tmpscript->OnQuestComplete(player, creature, quest);
|
||||
}
|
||||
|
||||
bool ScriptMgr::OnQuestReward(Player* player, Creature* creature, Quest const* quest, uint32 opt)
|
||||
{
|
||||
ASSERT(player);
|
||||
@@ -1296,6 +1285,11 @@ void ScriptMgr::OnPlayerUpdateZone(Player* player, uint32 newZone, uint32 newAre
|
||||
FOREACH_SCRIPT(PlayerScript)->OnUpdateZone(player, newZone, newArea);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnQuestStatusChange(Player* player, uint32 questId, QuestStatus status)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnQuestStatusChange(player, questId, status);
|
||||
}
|
||||
|
||||
// Account
|
||||
void ScriptMgr::OnAccountLogin(uint32 accountId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user