Core/Events: Fixed crash when loading character_queststatus_seasonal

This commit is contained in:
Shauren
2012-01-06 14:57:01 +01:00
parent 7f241e5b64
commit 0c2dd2dc7f
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -17848,7 +17848,8 @@ void Player::_LoadWeeklyQuestStatus(PreparedQueryResult result)
{
do
{
uint32 quest_id = (*result)[0].GetUInt32();
Field* fields = result->Fetch();
uint32 quest_id = fields[0].GetUInt32();
Quest const* quest = sObjectMgr->GetQuestTemplate(quest_id);
if (!quest)
continue;
@@ -17870,8 +17871,9 @@ void Player::_LoadSeasonalQuestStatus(PreparedQueryResult result)
{
do
{
uint32 quest_id = (*result)[0].GetUInt32();
uint16 event_id = (*result)[1].GetUInt16();
Field* fields = result->Fetch();
uint32 quest_id = fields[0].GetUInt32();
uint16 event_id = fields[1].GetUInt16();
Quest const* quest = sObjectMgr->GetQuestTemplate(quest_id);
if (!quest)
continue;
@@ -68,7 +68,7 @@ void CharacterDatabaseConnection::DoPrepareStatements()
"itemcount1, itemcount2, itemcount3, itemcount4, playercount FROM character_queststatus WHERE guid = ?", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_SEL_CHARACTER_DAILYQUESTSTATUS, "SELECT quest, time FROM character_queststatus_daily WHERE guid = ?", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_SEL_CHARACTER_WEEKLYQUESTSTATUS, "SELECT quest FROM character_queststatus_weekly WHERE guid = ?", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_SEL_CHARACTER_SEASONALQUESTSTATUS, "SELECT quest FROM character_queststatus_seasonal WHERE guid = ?", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_SEL_CHARACTER_SEASONALQUESTSTATUS, "SELECT quest, event FROM character_queststatus_seasonal WHERE guid = ?", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_INS_CHARACTER_DAILYQUESTSTATUS, "INSERT INTO character_queststatus_daily (guid, quest, time) VALUES (?, ?, ?)", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_INS_CHARACTER_WEEKLYQUESTSTATUS, "INSERT INTO character_queststatus_weekly (guid, quest) VALUES (?, ?)", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_INS_CHARACTER_SEASONALQUESTSTATUS, "INSERT INTO character_queststatus_seasonal (guid, quest, event) VALUES (?, ?, ?)", CONNECTION_ASYNC)