mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Player: Quests with status QUEST_STATUS_NONE(0) shouldn't be loaded into player's queststatus storage. These should be removed since they are remnants from the old queststatus storage system.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
DELETE FROM `character_queststatus` WHERE `status`=0;
|
||||
@@ -17781,12 +17781,19 @@ void Player::_LoadQuestStatus(PreparedQueryResult result)
|
||||
QuestStatusData& questStatusData = m_QuestStatus[quest_id];
|
||||
|
||||
uint8 qstatus = fields[1].GetUInt8();
|
||||
if (qstatus < MAX_QUEST_STATUS)
|
||||
if (qstatus < MAX_QUEST_STATUS && qstatus > QUEST_STATUS_NONE)
|
||||
questStatusData.Status = QuestStatus(qstatus);
|
||||
else if (qstatus == QUEST_STATUS_NONE)
|
||||
{
|
||||
sLog->outError("Player %s (GUID: %u) has QUEST_STATUS_NONE for quest %u and should be removed from character_queststatus.",
|
||||
GetName(), GetGUIDLow(), quest_id);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
questStatusData.Status = QUEST_STATUS_INCOMPLETE;
|
||||
sLog->outError("Player %s have invalid quest %d status (%u), replaced by QUEST_STATUS_INCOMPLETE(3).", GetName(), quest_id, qstatus);
|
||||
sLog->outError("Player %s (GUID: %u) has invalid quest %d status (%u), replaced by QUEST_STATUS_INCOMPLETE(3).",
|
||||
GetName(), GetGUIDLow(), quest_id, qstatus);
|
||||
}
|
||||
|
||||
questStatusData.Explored = (fields[2].GetUInt8() > 0);
|
||||
|
||||
Reference in New Issue
Block a user