Core: Define helper functions to know if an account is Player, Moderator, GM, Admin or Console
This commit is contained in:
@@ -260,7 +260,7 @@ World::AddSession_(WorldSession* s)
|
||||
if (decrease_session)
|
||||
--Sessions;
|
||||
|
||||
if (pLimit > 0 && Sessions >= pLimit && s->GetSecurity() == SEC_PLAYER && !HasRecentlyDisconnected(s))
|
||||
if (pLimit > 0 && Sessions >= pLimit && AccountMgr::IsPlayerAccount(s->GetSecurity()) && !HasRecentlyDisconnected(s))
|
||||
{
|
||||
AddQueuedPlayer (s);
|
||||
UpdateMaxSessionCounters();
|
||||
@@ -2037,7 +2037,7 @@ void World::SendGlobalGMMessage(WorldPacket* packet, WorldSession* self, uint32
|
||||
itr->second->GetPlayer() &&
|
||||
itr->second->GetPlayer()->IsInWorld() &&
|
||||
itr->second != self &&
|
||||
itr->second->GetSecurity() > SEC_PLAYER &&
|
||||
!AccountMgr::IsPlayerAccount(itr->second->GetSecurity()) &&
|
||||
(team == 0 || itr->second->GetPlayer()->GetTeam() == team))
|
||||
{
|
||||
itr->second->SendPacket(packet);
|
||||
@@ -2134,7 +2134,7 @@ void World::SendGMText(int32 string_id, ...)
|
||||
if (!itr->second || !itr->second->GetPlayer() || !itr->second->GetPlayer()->IsInWorld())
|
||||
continue;
|
||||
|
||||
if (itr->second->GetSecurity() < SEC_MODERATOR)
|
||||
if (AccountMgr::IsPlayerAccount(itr->second->GetSecurity()))
|
||||
continue;
|
||||
|
||||
wt_do(itr->second->GetPlayer());
|
||||
|
||||
Reference in New Issue
Block a user