Core/DBC Move WorldSafeLocs.dbc storage to DB (#932)

This commit is contained in:
Kargatum
2019-01-08 13:37:31 +07:00
committed by Viste(Кирилл)
parent 3d416de893
commit 1a9f8dfc0c
38 changed files with 1262 additions and 414 deletions

View File

@@ -18,6 +18,7 @@ EndScriptData */
#include "Chat.h"
#include "Language.h"
#include "Player.h"
#include "GameGraveyard.h"
class go_commandscript : public CommandScript
{
@@ -171,7 +172,7 @@ public:
if (!graveyardId)
return false;
WorldSafeLocsEntry const* gy = sWorldSafeLocsStore.LookupEntry(graveyardId);
GraveyardStruct const* gy = sGraveyard->GetGraveyard(graveyardId);
if (!gy)
{
handler->PSendSysMessage(LANG_COMMAND_GRAVEYARDNOEXIST, graveyardId);
@@ -179,9 +180,9 @@ public:
return false;
}
if (!MapManager::IsValidMapCoord(gy->map_id, gy->x, gy->y, gy->z))
if (!MapManager::IsValidMapCoord(gy->Map, gy->x, gy->y, gy->z))
{
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, gy->x, gy->y, gy->map_id);
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, gy->x, gy->y, gy->Map);
handler->SetSentErrorMessage(true);
return false;
}
@@ -196,7 +197,7 @@ public:
else
player->SaveRecallPosition();
player->TeleportTo(gy->map_id, gy->x, gy->y, gy->z, player->GetOrientation());
player->TeleportTo(gy->Map, gy->x, gy->y, gy->z, player->GetOrientation());
return true;
}