mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[8533] Not remove timed quest and correctly fail when time runs out.
Add function to remove timed quest instead of direct access to set. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
1bf0678ebd
commit
38aac1a77a
4 changed files with 16 additions and 14 deletions
|
|
@ -350,6 +350,12 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recv_data)
|
|||
if(!_player->TakeQuestSourceItem( quest, true ))
|
||||
return; // can't un-equip some items, reject quest cancel
|
||||
|
||||
if (const Quest *pQuest = objmgr.GetQuestTemplate(quest))
|
||||
{
|
||||
if (pQuest->HasFlag(QUEST_MANGOS_FLAGS_TIMED))
|
||||
_player->RemoveTimedQuest(quest);
|
||||
}
|
||||
|
||||
_player->SetQuestStatus( quest, QUEST_STATUS_NONE);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue