*Implemented requires_heroic_quest_done in areatrigger_teleport - by Anubisss

--HG--
branch : trunk
This commit is contained in:
Blaymoira
2009-01-11 16:47:44 +01:00
parent d719fb2707
commit ca342a8815
4 changed files with 40 additions and 16 deletions

View File

@@ -5112,9 +5112,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 );
@@ -5140,18 +5140,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)
@@ -5199,6 +5201,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])