aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnubisss <none@none>2009-08-04 01:26:49 +0200
committerAnubisss <none@none>2009-08-04 01:26:49 +0200
commit834c10a0dfb3c2465d65dbdbd5202bd313a159ee (patch)
tree142899c441306d94497a909c64e0d8f4abdf4f23
parentcd1be01444bfda85c33588fe044e81a9077934a5 (diff)
*Use heroic_level_min value (if not 0) from table access_requirement for instances with heroic mode.
*Use level_min value if heroic_level_min == 0 for instances with heroic mode. *Correct heroic_level_min value for all instances. --HG-- branch : trunk
-rw-r--r--sql/updates/4745_world_access_requirement.sql61
-rw-r--r--src/game/Player.cpp5
2 files changed, 63 insertions, 3 deletions
diff --git a/sql/updates/4745_world_access_requirement.sql b/sql/updates/4745_world_access_requirement.sql
new file mode 100644
index 00000000000..c8234763414
--- /dev/null
+++ b/sql/updates/4745_world_access_requirement.sql
@@ -0,0 +1,61 @@
+-- BC Dungeons --
+UPDATE `access_requirement` SET `heroic_level_min` = 70 WHERE `id` IN
+(
+ 4404, -- Auchenai Crypts --
+ 4405, -- Mana-Tombs --
+ 4406, -- Sethekk Halls --
+ 4407, -- Shadow Labyrinth --
+
+ 4321, -- Old Hillsbrad Foothills --
+ 4320, -- The Black Morass --
+
+ 4365, -- The Slave Pens --
+ 4364, -- The Steamvault --
+ 4363, -- The Underbog --
+
+ 4150, -- Hellfire Ramparts --
+ 4152, -- The Blood Furnace --
+ 4151, -- The Shattered Halls --
+
+ 4887, -- Magisters' Terrace --
+
+ 4468, -- The Arcatraz --
+ 4467, -- The Botanica --
+ 4469 -- The Mechanar --
+);
+
+-- WOTLK Dungeons --
+UPDATE `access_requirement` SET `heroic_level_min` = 80 WHERE `id` IN
+(
+ 5215, -- Ahn'kahet: The Old Kingdom --
+ 5117, -- Azjol-Nerub --
+
+ 5150, -- The Culling of Stratholme --
+
+ 4998, -- Drak'Tharon Keep --
+
+ 5206, -- Gundrak --
+
+ 4983, -- The Nexus --
+ 5246, -- The Oculus --
+
+ 5209, -- The Violet Hold --
+
+ 5093, -- Halls of Lightning --
+ 5010, -- Halls of Stone --
+
+ 4745, -- Utgarde Keep --
+ 4747 -- Utgarde Pinnacle --
+);
+
+-- WOTLK Raids --
+UPDATE `access_requirement` SET `heroic_level_min` = 80 WHERE `id` IN
+(
+ 4156, -- Naxxramas --
+
+ 5290, -- The Eye of Eternity --
+
+ 5243, -- The Obsidian Sanctum --
+
+ 5379 -- Ulduar --
+);
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 1d0c9024412..c6f0b9aafc1 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -15934,8 +15934,7 @@ bool Player::Satisfy(AccessRequirement const *ar, uint32 target_map, bool report
{
if(ar->levelMin && getLevel() < ar->levelMin)
LevelMin = ar->levelMin;
- else if(ar->heroicLevelMin && GetDifficulty() == DIFFICULTY_HEROIC
- && getLevel() < ar->heroicLevelMin)
+ if(ar->heroicLevelMin && GetDifficulty() == DIFFICULTY_HEROIC && getLevel() < ar->heroicLevelMin)
LevelMin = ar->heroicLevelMin;
if(ar->levelMax && getLevel() > ar->levelMax)
LevelMax = ar->levelMax;
@@ -15977,7 +15976,7 @@ bool Player::Satisfy(AccessRequirement const *ar, uint32 target_map, bool report
if(report)
{
if(missingItem)
- GetSession()->SendAreaTriggerMessage(GetSession()->GetTrinityString(LANG_LEVEL_MINREQUIRED_AND_ITEM), ar->levelMin, objmgr.GetItemPrototype(missingItem)->Name1);
+ GetSession()->SendAreaTriggerMessage(GetSession()->GetTrinityString(LANG_LEVEL_MINREQUIRED_AND_ITEM), LevelMin, objmgr.GetItemPrototype(missingItem)->Name1);
else if(missingKey)
SendTransferAborted(target_map, TRANSFER_ABORT_DIFFICULTY);
else if(missingHeroicQuest)