[12195] Improve AreaTrigger teleport requirement checks

Implement AreaLockStatus concept by rsa

Also drop basicly unneeded `areatrigger_teleport`.required_failed_text field.
This concept is still in testing phase, please feedback results of some glitches that might exist!

TODO: Use Player::GetAreaLockStatus or GetAreaTriggerLockStatus for other "CanEnter" checks as well.

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
cyberium 2012-09-06 16:40:31 +02:00 committed by Antz
parent 7901613472
commit 9022705faf
22 changed files with 304 additions and 162 deletions

View file

@ -5573,8 +5573,8 @@ void ObjectMgr::LoadAreaTriggerTeleports()
uint32 count = 0;
// 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, required_quest_done, required_quest_done_heroic, required_failed_text, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM areatrigger_teleport");
// 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_quest_done_heroic, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM areatrigger_teleport");
if (!result)
{
@ -5608,12 +5608,11 @@ void ObjectMgr::LoadAreaTriggerTeleports()
at.heroicKey2 = fields[5].GetUInt32();
at.requiredQuest = fields[6].GetUInt32();
at.requiredQuestHeroic = fields[7].GetUInt32();
at.requiredFailedText = fields[8].GetCppString();
at.target_mapId = fields[9].GetUInt32();
at.target_X = fields[10].GetFloat();
at.target_Y = fields[11].GetFloat();
at.target_Z = fields[12].GetFloat();
at.target_Orientation = fields[13].GetFloat();
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();
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID);
if (!atEntry)