Core/Quests: Fixed a crash caused when trying to add a quest to a player who does not have any free slot in his quest log. fixes #4572

Signed-off-by: Subv2112 <s.v.h21@hotmail.com>
This commit is contained in:
Subv2112
2012-01-31 16:45:36 -05:00
parent fc9e33e4c6
commit 2786ea1f5e

View File

@@ -14824,7 +14824,9 @@ bool Player::CanRewardQuest(Quest const* quest, uint32 reward, bool msg)
void Player::AddQuest(Quest const* quest, Object* questGiver)
{
uint16 log_slot = FindQuestSlot(0);
ASSERT(log_slot < MAX_QUEST_LOG_SIZE);
if (log_slot >= MAX_QUEST_LOG_SIZE) // Player does not have any free slot in the quest log
return;
uint32 quest_id = quest->GetQuestId();