mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
Core/Chat: Fix crash when using a command (#220)
This commit is contained in:
@@ -310,13 +310,13 @@ bool ChatHandler::ExecuteCommandInTable(std::vector<ChatCommand> const& table, c
|
|||||||
}
|
}
|
||||||
|
|
||||||
sLog->outCommand(m_session->GetAccountId(), "Command: %s [Player: %s (%ul) (Account: %u) X: %f Y: %f Z: %f Map: %u (%s) Area: %u (%s) Zone: %s Selected: %s (%ul)]",
|
sLog->outCommand(m_session->GetAccountId(), "Command: %s [Player: %s (%ul) (Account: %u) X: %f Y: %f Z: %f Map: %u (%s) Area: %u (%s) Zone: %s Selected: %s (%ul)]",
|
||||||
fullcmd.c_str(), player->GetName().c_str(), player->GetGUID(),
|
fullcmd.c_str(), player->GetName().c_str(), GUID_LOPART(player->GetGUID()),
|
||||||
m_session->GetAccountId(), player->GetPositionX(), player->GetPositionY(),
|
m_session->GetAccountId(), player->GetPositionX(), player->GetPositionY(),
|
||||||
player->GetPositionZ(), player->GetMapId(),
|
player->GetPositionZ(), player->GetMapId(),
|
||||||
player->GetMap() ? player->GetMap()->GetMapName() : "Unknown",
|
player->GetMap() ? player->GetMap()->GetMapName() : "Unknown",
|
||||||
areaId, areaName.c_str(), zoneName.c_str(),
|
areaId, areaName.c_str(), zoneName.c_str(),
|
||||||
(player->GetSelectedUnit()) ? player->GetSelectedUnit()->GetName().c_str() : "",
|
(player->GetSelectedUnit()) ? player->GetSelectedUnit()->GetName().c_str() : "",
|
||||||
guid);
|
GUID_LOPART(guid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// some commands have custom error messages. Don't send the default one in these cases.
|
// some commands have custom error messages. Don't send the default one in these cases.
|
||||||
|
|||||||
Reference in New Issue
Block a user