Core/Commands: Allow .save command to save targeted player for GMs

This commit is contained in:
Shocker
2011-06-16 00:22:09 +03:00
parent ee717ad1ee
commit f4203e171e

View File

@@ -131,7 +131,10 @@ bool ChatHandler::HandleSaveCommand(const char* /*args*/)
// save GM account without delay and output message
if (m_session->GetSecurity() > SEC_PLAYER)
{
player->SaveToDB();
if (Player *target = getSelectedPlayer())
target->SaveToDB();
else
player->SaveToDB();
SendSysMessage(LANG_PLAYER_SAVED);
return true;
}