aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_08_13_00_world_quest_template_434.sql (renamed from sql/updates/world/2012_08_13_00_world_quest_template.sql)0
-rw-r--r--sql/updates/world/2012_08_14_00_reputation_spillover_template_434.sql (renamed from sql/updates/world/2012_08_14_00_reputation_spillover_template.sql)0
-rw-r--r--sql/updates/world/2012_08_14_00_world_event_ai_434.sql (renamed from sql/updates/world/2012_08_14_00_world_event_ai.sql)0
-rw-r--r--sql/updates/world/2012_08_14_01_world_commands_434.sql (renamed from sql/updates/world/2012_08_14_01_world_commands.sql)0
-rw-r--r--sql/updates/world/2012_08_14_02_world_npc_vendor_434.sql (renamed from sql/updates/world/2012_08_14_02_world_npc_vendor.sql)0
-rw-r--r--sql/updates/world/2012_08_15_00_world_quest_template_434.sql2
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp4
-rwxr-xr-xsrc/server/game/Quests/QuestDef.cpp4
8 files changed, 6 insertions, 4 deletions
diff --git a/sql/updates/world/2012_08_13_00_world_quest_template.sql b/sql/updates/world/2012_08_13_00_world_quest_template_434.sql
index b3c5a45a668..b3c5a45a668 100644
--- a/sql/updates/world/2012_08_13_00_world_quest_template.sql
+++ b/sql/updates/world/2012_08_13_00_world_quest_template_434.sql
diff --git a/sql/updates/world/2012_08_14_00_reputation_spillover_template.sql b/sql/updates/world/2012_08_14_00_reputation_spillover_template_434.sql
index afce8209afa..afce8209afa 100644
--- a/sql/updates/world/2012_08_14_00_reputation_spillover_template.sql
+++ b/sql/updates/world/2012_08_14_00_reputation_spillover_template_434.sql
diff --git a/sql/updates/world/2012_08_14_00_world_event_ai.sql b/sql/updates/world/2012_08_14_00_world_event_ai_434.sql
index 3fe49aa4059..3fe49aa4059 100644
--- a/sql/updates/world/2012_08_14_00_world_event_ai.sql
+++ b/sql/updates/world/2012_08_14_00_world_event_ai_434.sql
diff --git a/sql/updates/world/2012_08_14_01_world_commands.sql b/sql/updates/world/2012_08_14_01_world_commands_434.sql
index aa030e01adb..aa030e01adb 100644
--- a/sql/updates/world/2012_08_14_01_world_commands.sql
+++ b/sql/updates/world/2012_08_14_01_world_commands_434.sql
diff --git a/sql/updates/world/2012_08_14_02_world_npc_vendor.sql b/sql/updates/world/2012_08_14_02_world_npc_vendor_434.sql
index de00be694fc..de00be694fc 100644
--- a/sql/updates/world/2012_08_14_02_world_npc_vendor.sql
+++ b/sql/updates/world/2012_08_14_02_world_npc_vendor_434.sql
diff --git a/sql/updates/world/2012_08_15_00_world_quest_template_434.sql b/sql/updates/world/2012_08_15_00_world_quest_template_434.sql
new file mode 100644
index 00000000000..423edb1c77b
--- /dev/null
+++ b/sql/updates/world/2012_08_15_00_world_quest_template_434.sql
@@ -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';
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index ab78566ae0e..cf5de46a418 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -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
}
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp
index 2240fa471a0..f259d57d839 100755
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -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();