mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Merge branch 'master' into 303
Conflicts: src/game/Creature.cpp
This commit is contained in:
commit
af6acab8f8
23 changed files with 288 additions and 129 deletions
|
|
@ -5592,9 +5592,23 @@ bool ChatHandler::HandleWritePDumpCommand(const char *args)
|
|||
if(!file || !p2)
|
||||
return false;
|
||||
|
||||
uint32 guid = objmgr.GetPlayerGUIDByName(p2);
|
||||
if(!guid)
|
||||
uint32 guid;
|
||||
// character name can't start from number
|
||||
if (isNumeric(p2[0]))
|
||||
guid = atoi(p2);
|
||||
else
|
||||
{
|
||||
std::string name = p2;
|
||||
|
||||
if (!normalizePlayerName (name))
|
||||
{
|
||||
SendSysMessage (LANG_PLAYER_NOT_FOUND);
|
||||
SetSentErrorMessage (true);
|
||||
return false;
|
||||
}
|
||||
|
||||
guid = objmgr.GetPlayerGUIDByName(name);
|
||||
}
|
||||
|
||||
if(!objmgr.GetPlayerAccountIdByGUID(guid))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue