refactor(Core/Misc): isEmpty to IsEmpty (#10011)

This commit is contained in:
Kitzunu
2022-01-14 03:43:15 +01:00
committed by GitHub
parent e36ee257c7
commit d1cc65b1c7
50 changed files with 94 additions and 94 deletions

View File

@@ -97,7 +97,7 @@ public:
if (TeamIdInInstance == TEAM_NEUTRAL)
{
Map::PlayerList const& players = instance->GetPlayers();
if( !players.isEmpty() )
if( !players.IsEmpty() )
if( Player* pPlayer = players.begin()->GetSource() )
TeamIdInInstance = pPlayer->GetTeamId();
}

View File

@@ -74,7 +74,7 @@ public:
if (teamIdInInstance == TEAM_NEUTRAL)
{
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
teamIdInInstance = player->GetTeamId();
}

View File

@@ -204,7 +204,7 @@ public:
if (TeamIdInInstance == TEAM_NEUTRAL)
{
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
if (!players.IsEmpty())
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
if (Player* p = itr->GetSource())
if (!p->IsGameMaster())

View File

@@ -83,7 +83,7 @@ public:
if (teamIdInInstance == TEAM_NEUTRAL)
{
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
teamIdInInstance = player->GetTeamId();
}
@@ -109,7 +109,7 @@ public:
if (teamIdInInstance == TEAM_NEUTRAL)
{
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
teamIdInInstance = player->GetTeamId();
}

View File

@@ -363,7 +363,7 @@ void SendPacketToPlayers(WorldPacket const* data, Unit* source)
{
// Send packet to all players in The Frozen Throne
Map::PlayerList const& players = source->GetMap()->GetPlayers();
if (!players.isEmpty())
if (!players.IsEmpty())
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
if (Player* player = itr->GetSource())
if (player->GetAreaId() == AREA_THE_FROZEN_THRONE)
@@ -973,7 +973,7 @@ public:
{
_positionCheckTimer = 5000;
Map::PlayerList const& players = me->GetMap()->GetPlayers();
if (!players.isEmpty())
if (!players.IsEmpty())
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
if (Player* player = itr->GetSource())
if (player->GetPositionZ() < 700.0f)

View File

@@ -238,7 +238,7 @@ public:
if (TeamIdInInstance == TEAM_NEUTRAL)
{
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
TeamIdInInstance = player->GetTeamId();
}
@@ -485,7 +485,7 @@ public:
if (TeamIdInInstance == TEAM_NEUTRAL)
{
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
TeamIdInInstance = player->GetTeamId();
}
@@ -530,7 +530,7 @@ public:
if (TeamIdInInstance == TEAM_NEUTRAL)
{
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
TeamIdInInstance = player->GetTeamId();
}
@@ -634,7 +634,7 @@ public:
if (TeamIdInInstance == TEAM_NEUTRAL)
{
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
TeamIdInInstance = player->GetTeamId();
}
@@ -1632,7 +1632,7 @@ public:
{
LichKingRandomWhisperTimer = urand(100, 300) * IN_MILLISECONDS;
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
if (player->GetQuestStatus(QUEST_A_FEAST_OF_SOULS) == QUEST_STATUS_INCOMPLETE)
{

View File

@@ -276,7 +276,7 @@ public:
{
if (pInstance->GetBossState(BOSS_HORSEMAN) == DONE)
{
if (!me->GetMap()->GetPlayers().isEmpty())
if (!me->GetMap()->GetPlayers().IsEmpty())
{
if (Player* player = me->GetMap()->GetPlayers().getFirst()->GetSource())
{

View File

@@ -353,7 +353,7 @@ public:
bool CheckGroupSplitted()
{
Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
if (!PlayerList.isEmpty())
if (!PlayerList.IsEmpty())
{
bool checklife = false;
bool checkdead = false;

View File

@@ -138,7 +138,7 @@ public:
void EnterCombatSelfFunction()
{
Map::PlayerList const& PlList = me->GetMap()->GetPlayers();
if (PlList.isEmpty())
if (PlList.IsEmpty())
return;
for (const auto& i : PlList)

View File

@@ -494,7 +494,7 @@ public:
vp->SetDisableGravity(true);
Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
if (!PlayerList.isEmpty())
if (!PlayerList.IsEmpty())
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (Player* pPlayer = i->GetSource())
{
@@ -714,7 +714,7 @@ public:
// mount players:
Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
if (!PlayerList.isEmpty())
if (!PlayerList.IsEmpty())
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (Player* pPlayer = i->GetSource())
{
@@ -1196,7 +1196,7 @@ public:
{
GuidVector guids;
Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
if (!PlayerList.isEmpty())
if (!PlayerList.IsEmpty())
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (Player* pPlayer = i->GetSource())
{

View File

@@ -51,7 +51,7 @@ public:
{
Map::PlayerList const& players = instance->GetPlayers();
TeamId TeamIdInInstance = TEAM_NEUTRAL;
if (!players.isEmpty())
if (!players.IsEmpty())
if (Player* pPlayer = players.begin()->GetSource())
TeamIdInInstance = pPlayer->GetTeamId();

View File

@@ -338,7 +338,7 @@ public:
case ACTION_START_TRIBUNAL:
{
Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
if (!PlayerList.isEmpty())
if (!PlayerList.IsEmpty())
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
me->SetFaction(i->GetSource()->GetFaction());

View File

@@ -78,7 +78,7 @@ public:
if (bf->GetTimer() <= (16 * MINUTE * IN_MILLISECONDS) && bf->GetTimer() >= (15 * MINUTE * IN_MILLISECONDS))
{
Map::PlayerList const& PlayerList = instance->GetPlayers();
if (!PlayerList.isEmpty())
if (!PlayerList.IsEmpty())
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (Player* player = i->GetSource())
player->TextEmote("This instance will reset in 15 minutes.", nullptr, true);
@@ -102,7 +102,7 @@ public:
else if (bf->GetTimer() <= (2 * MINUTE * IN_MILLISECONDS) && bf->GetTimer() > (MINUTE * IN_MILLISECONDS))
{
Map::PlayerList const& PlayerList = instance->GetPlayers();
if (!PlayerList.isEmpty())
if (!PlayerList.IsEmpty())
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (Player* player = i->GetSource())
player->TextEmote("This instance is about to reset. Prepare to be removed.", nullptr, true);
@@ -115,7 +115,7 @@ public:
cr->AI()->EnterEvadeMode();
Map::PlayerList const& PlayerList = instance->GetPlayers();
if (!PlayerList.isEmpty())
if (!PlayerList.IsEmpty())
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (Player* player = i->GetSource())
player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->GetOrientation());

View File

@@ -145,7 +145,7 @@ public:
void IchoronDoCastToAllHostilePlayers(uint32 spellId, bool triggered)
{
Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
if (PlayerList.isEmpty())
if (PlayerList.IsEmpty())
return;
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)