mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
Core/DBC Move WorldSafeLocs.dbc storage to DB (#932)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user