Move area trigger storage from DBC to database (#742)

Renamed AreaTrigger + related stuff to AreaTriggerTeleport
This commit is contained in:
Kaev
2018-01-02 22:08:08 +01:00
committed by Yehonal
parent b669d24a1f
commit 05cd8c8c61
43 changed files with 1431 additions and 124 deletions

View File

@@ -362,7 +362,7 @@ public:
if (!areaTriggerId)
return false;
AreaTriggerEntry const* at = sAreaTriggerStore.LookupEntry(areaTriggerId);
AreaTrigger const* at = sObjectMgr->GetAreaTrigger(areaTriggerId);
if (!at)
{
handler->PSendSysMessage(LANG_COMMAND_GOAREATRNOTFOUND, areaTriggerId);
@@ -370,9 +370,9 @@ public:
return false;
}
if (!MapManager::IsValidMapCoord(at->mapid, at->x, at->y, at->z))
if (!MapManager::IsValidMapCoord(at->map, at->x, at->y, at->z))
{
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, at->x, at->y, at->mapid);
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, at->x, at->y, at->map);
handler->SetSentErrorMessage(true);
return false;
}
@@ -387,7 +387,7 @@ public:
else
player->SaveRecallPosition();
player->TeleportTo(at->mapid, at->x, at->y, at->z, player->GetOrientation());
player->TeleportTo(at->map, at->x, at->y, at->z, player->GetOrientation());
return true;
}