Core&DB: Increase the size of MinLevel and MaxLevel to int16

This commit is contained in:
Nay
2012-08-15 18:00:11 +01:00
parent 0e304fa98c
commit 53a2b86228
8 changed files with 6 additions and 4 deletions

View File

@@ -0,0 +1,2 @@
ALTER TABLE `quest_template` CHANGE `MinLevel` `MinLevel` smallint(6) NOT NULL DEFAULT '0';
ALTER TABLE `quest_template` CHANGE `MaxLevel` `MaxLevel` smallint(6) NOT NULL DEFAULT '0';

View File

@@ -3550,9 +3550,9 @@ void ObjectMgr::LoadQuests()
}
}
if (qinfo->MinLevel == uint32(-1))
if (qinfo->MinLevel == uint32(-1) || qinfo->MinLevel > DEFAULT_MAX_LEVEL)
{
sLog->outError(LOG_FILTER_SQL, "Quest %u should be disabled because `MinLevel` = -1", qinfo->GetQuestId());
sLog->outError(LOG_FILTER_SQL, "Quest %u should be disabled because `MinLevel` = %i", qinfo->GetQuestId(), int32(qinfo->MinLevel));
// no changes needed, sending -1 in SMSG_QUEST_QUERY_RESPONSE is valid
}

View File

@@ -26,8 +26,8 @@ Quest::Quest(Field* questRecord)
Id = questRecord[0].GetUInt32();
Method = questRecord[1].GetUInt8();
Level = questRecord[2].GetInt16();
MinLevel = uint32(questRecord[3].GetInt8());
MaxLevel = questRecord[4].GetUInt8();
MinLevel = uint32(questRecord[3].GetInt16());
MaxLevel = uint32(questRecord[4].GetInt16());
ZoneOrSort = questRecord[5].GetInt16();
Type = questRecord[6].GetUInt16();
SuggestedPlayers = questRecord[7].GetUInt8();