Scripts/Quests: Implemented new quest scripting hook, OnQuestAcknowledgeAutoAccept, used when player closes quest frame after viewing details of autoaccept quests
Port From (https://github.com/TrinityCore/TrinityCore/commit/f269f60d8a5f6b0982eb46dc583e2618c98931fb)
This commit is contained in:
@@ -574,6 +574,19 @@ namespace Game
|
||||
}
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.QuestGiverCloseQuest)]
|
||||
void HandleQuestgiverCloseQuest(QuestGiverCloseQuest questGiverCloseQuest)
|
||||
{
|
||||
if (_player.FindQuestSlot(questGiverCloseQuest.QuestID) >= SharedConst.MaxQuestLogSize)
|
||||
return;
|
||||
|
||||
Quest quest = Global.ObjectMgr.GetQuestTemplate(questGiverCloseQuest.QuestID);
|
||||
if (quest == null)
|
||||
return;
|
||||
|
||||
Global.ScriptMgr.OnQuestAcknowledgeAutoAccept(_player, quest);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.PushQuestToParty)]
|
||||
void HandlePushQuestToParty(PushQuestToParty packet)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user