aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectMgr.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-12 11:02:18 -0600
committermegamage <none@none>2009-01-12 11:02:18 -0600
commit90f30abd86b77c304f71b81476a9b86e948b190f (patch)
treeae6d2c1374976204ca82451e67254c2c5edabce8 /src/game/ObjectMgr.cpp
parent6daa23e39c28e13f366ce4e8a765d565a26bcca5 (diff)
parent61b2ce7856924bcaa4fda4fe124cd2a019493dd3 (diff)
*Update to Trinity 843.
--HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r--src/game/ObjectMgr.cpp41
1 files changed, 26 insertions, 15 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 8f8fc418118..9206fe0acd3 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -5179,9 +5179,9 @@ void ObjectMgr::LoadAreaTriggerTeleports()
uint32 count = 0;
- // 0 1 2 3 4 5 6 7 8 9 10 11 12
- QueryResult *result = WorldDatabase.Query("SELECT id, required_level, required_item, required_item2, heroic_key, heroic_key2, required_quest_done, required_failed_text, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM areatrigger_teleport");
- if( !result )
+ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13
+ QueryResult *result = WorldDatabase.Query("SELECT id, required_level, required_item, required_item2, heroic_key, heroic_key2, heroic_required_quest_done, heroic_required_failed_quest_text, required_quest_done, required_failed_text, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM areatrigger_teleport");
+ if( !result )
{
barGoLink bar( 1 );
@@ -5207,18 +5207,20 @@ void ObjectMgr::LoadAreaTriggerTeleports()
AreaTrigger at;
- at.requiredLevel = fields[1].GetUInt8();
- at.requiredItem = fields[2].GetUInt32();
- at.requiredItem2 = fields[3].GetUInt32();
- at.heroicKey = fields[4].GetUInt32();
- at.heroicKey2 = fields[5].GetUInt32();
- at.requiredQuest = fields[6].GetUInt32();
- at.requiredFailedText = fields[7].GetCppString();
- at.target_mapId = fields[8].GetUInt32();
- at.target_X = fields[9].GetFloat();
- at.target_Y = fields[10].GetFloat();
- at.target_Z = fields[11].GetFloat();
- at.target_Orientation = fields[12].GetFloat();
+ at.requiredLevel = fields[1].GetUInt8();
+ at.requiredItem = fields[2].GetUInt32();
+ at.requiredItem2 = fields[3].GetUInt32();
+ at.heroicKey = fields[4].GetUInt32();
+ at.heroicKey2 = fields[5].GetUInt32();
+ at.heroicQuest = fields[6].GetUInt32();
+ at.heroicQuestFailedText = fields[7].GetCppString();
+ at.requiredQuest = fields[8].GetUInt32();
+ at.requiredFailedText = fields[9].GetCppString();
+ at.target_mapId = fields[10].GetUInt32();
+ at.target_X = fields[11].GetFloat();
+ at.target_Y = fields[12].GetFloat();
+ at.target_Z = fields[13].GetFloat();
+ at.target_Orientation = fields[14].GetFloat();
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID);
if(!atEntry)
@@ -5266,6 +5268,15 @@ void ObjectMgr::LoadAreaTriggerTeleports()
}
}
+ if(at.heroicQuest)
+ {
+ if(!mQuestTemplates[at.heroicQuest])
+ {
+ sLog.outErrorDb("Required Heroic Quest %u not exist for trigger %u, remove heroic quest done requirement.",at.heroicQuest,Trigger_ID);
+ at.heroicQuest = 0;
+ }
+ }
+
if(at.requiredQuest)
{
if(!mQuestTemplates[at.requiredQuest])