mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/Commands: Fixed build
This commit is contained in:
committed by
Aokromes
parent
882453253f
commit
95a7a88ef0
@@ -1519,7 +1519,7 @@ public:
|
||||
static bool HandleDebugNearGraveyard(ChatHandler* handler, char const* args)
|
||||
{
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
const WorldSafeLocsEntry* nearestLoc = nullptr;
|
||||
WorldSafeLocsEntry const* nearestLoc = nullptr;
|
||||
|
||||
if (stricmp(args, "linked"))
|
||||
{
|
||||
@@ -1542,10 +1542,10 @@ public:
|
||||
|
||||
for (uint32 i = 0; i < sWorldSafeLocsStore.GetNumRows(); ++i)
|
||||
{
|
||||
const WorldSafeLocsEntry* loc = sWorldSafeLocsStore.LookupEntry(i);
|
||||
if (loc && loc->map_id == player->GetMapId())
|
||||
WorldSafeLocsEntry const* loc = sWorldSafeLocsStore.LookupEntry(i);
|
||||
if (loc && loc->MapID == player->GetMapId())
|
||||
{
|
||||
float dist = (loc->x - x) * (loc->x - x) + (loc->y - y) * (loc->y - y) + (loc->z - z) * (loc->z - z);
|
||||
float dist = (loc->Loc.X - x) * (loc->Loc.X - x) + (loc->Loc.Y - y) * (loc->Loc.Y - y) + (loc->Loc.Z - z) * (loc->Loc.Z - z);
|
||||
if (dist < distNearest)
|
||||
{
|
||||
distNearest = dist;
|
||||
@@ -1556,7 +1556,7 @@ public:
|
||||
}
|
||||
|
||||
if (nearestLoc)
|
||||
handler->PSendSysMessage(LANG_COMMAND_NEARGRAVEYARD, nearestLoc->ID, nearestLoc->x, nearestLoc->y, nearestLoc->z);
|
||||
handler->PSendSysMessage(LANG_COMMAND_NEARGRAVEYARD, nearestLoc->ID, nearestLoc->Loc.X, nearestLoc->Loc.Y, nearestLoc->Loc.Z);
|
||||
else
|
||||
handler->PSendSysMessage(LANG_COMMAND_NEARGRAVEYARD_NOTFOUND);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user