mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user