aboutsummaryrefslogtreecommitdiff
path: root/src/game/MiscHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/MiscHandler.cpp')
-rw-r--r--src/game/MiscHandler.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp
index 7196b57eac2..e63a92c27b1 100644
--- a/src/game/MiscHandler.cpp
+++ b/src/game/MiscHandler.cpp
@@ -279,13 +279,6 @@ void WorldSession::HandleLogoutRequestOpcode( WorldPacket & /*recv_data*/ )
if (uint64 lguid = GetPlayer()->GetLootGUID())
DoLootRelease(lguid);
- //instant logout for admins, gm's, mod's
- if( GetSecurity() > SEC_PLAYER )
- {
- LogoutPlayer(true);
- return;
- }
-
//Can not logout if...
if( GetPlayer()->isInCombat() || //...is in combat
GetPlayer()->duel || //...is in Duel
@@ -302,8 +295,9 @@ void WorldSession::HandleLogoutRequestOpcode( WorldPacket & /*recv_data*/ )
return;
}
- //instant logout in taverns/cities or on taxi or if its enabled in Trinityd.conf
- if(GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) || GetPlayer()->isInFlight() || sWorld.getConfig(CONFIG_INSTANT_LOGOUT))
+ //instant logout in taverns/cities or on taxi or for admins, gm's, mod's if its enabled in mangosd.conf
+ if (GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) || GetPlayer()->isInFlight() ||
+ GetSecurity() >= sWorld.getConfig(CONFIG_INSTANT_LOGOUT))
{
LogoutPlayer(true);
return;
@@ -671,9 +665,9 @@ void WorldSession::HandleCorpseReclaimOpcode(WorldPacket &recv_data)
if (GetPlayer()->isAlive())
return;
- if (BattleGround * bg = _player->GetBattleGround())
- if(bg->isArena())
- return;
+ // do not allow corpse reclaim in arena
+ if (GetPlayer()->InArena())
+ return;
// body not released yet
if(!GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
@@ -1275,14 +1269,12 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
return;
}
- if(charname.empty())
+ if(charname.empty() || !normalizePlayerName (charname))
{
SendNotification(LANG_NEED_CHARACTER_NAME);
return;
}
- normalizePlayerName (charname);
-
Player *plr = objmgr.GetPlayer(charname.c_str());
if(!plr)