From db70ad37dd32ea0e29a4dfc0d4eef6d04b91531a Mon Sep 17 00:00:00 2001 From: KimLS Date: Wed, 26 Jun 2013 15:43:55 -0700 Subject: [PATCH] Fix for quest::depop and quest::respawn not functioning --- zone/questmgr.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 9907b795b..ad08593ae 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -596,12 +596,18 @@ void QuestManager::depop(int npc_type) { tmp->CastToNPC()->Depop(); } else { - depop_npc = true; + running_quest e = quests_running_.top(); + e.depop_npc = true; + quests_running_.pop(); + quests_running_.push(e); } } } else { //depop self - depop_npc = true; + running_quest e = quests_running_.top(); + e.depop_npc = true; + quests_running_.pop(); + quests_running_.push(e); } } } @@ -1572,7 +1578,11 @@ void QuestManager::respawn(int npc_type, int grid) { y = owner->GetY(); z = owner->GetZ(); h = owner->GetHeading(); - depop_npc = true; + + running_quest e = quests_running_.top(); + e.depop_npc = true; + quests_running_.pop(); + quests_running_.push(e); const NPCType* tmp = 0; if ((tmp = database.GetNPCType(npc_type)))