mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core: More codestyle cleanups
This commit is contained in:
@@ -551,7 +551,7 @@ void Guild::Member::ChangeRank(uint8 newRank)
|
||||
m_rankId = newRank;
|
||||
|
||||
// Update rank information in player's field, if he is online.
|
||||
if (Player *player = FindPlayer())
|
||||
if (Player* player = FindPlayer())
|
||||
player->SetRank(newRank);
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SET_GUILD_MEMBER_RANK);
|
||||
@@ -2039,7 +2039,7 @@ void Guild::BroadcastToGuild(WorldSession *session, bool officerOnly, const std:
|
||||
WorldPacket data;
|
||||
ChatHandler::FillMessageData(&data, session, officerOnly ? CHAT_MSG_OFFICER : CHAT_MSG_GUILD, language, NULL, 0, msg.c_str(), NULL);
|
||||
for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
|
||||
if (Player *player = itr->second->FindPlayer())
|
||||
if (Player* player = itr->second->FindPlayer())
|
||||
if (player->GetSession() && _HasRankRight(player, officerOnly ? GR_RIGHT_OFFCHATLISTEN : GR_RIGHT_GCHATLISTEN) &&
|
||||
!player->GetSocial()->HasIgnore(session->GetPlayer()->GetGUIDLow()))
|
||||
player->GetSession()->SendPacket(&data);
|
||||
@@ -2050,14 +2050,14 @@ void Guild::BroadcastPacketToRank(WorldPacket *packet, uint8 rankId) const
|
||||
{
|
||||
for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
|
||||
if (itr->second->IsRank(rankId))
|
||||
if (Player *player = itr->second->FindPlayer())
|
||||
if (Player* player = itr->second->FindPlayer())
|
||||
player->GetSession()->SendPacket(packet);
|
||||
}
|
||||
|
||||
void Guild::BroadcastPacket(WorldPacket *packet) const
|
||||
{
|
||||
for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
|
||||
if (Player *player = itr->second->FindPlayer())
|
||||
if (Player* player = itr->second->FindPlayer())
|
||||
player->GetSession()->SendPacket(packet);
|
||||
}
|
||||
|
||||
@@ -2135,7 +2135,7 @@ bool Guild::AddMember(const uint64& guid, uint8 rankId)
|
||||
void Guild::DeleteMember(const uint64& guid, bool isDisbanding, bool isKicked)
|
||||
{
|
||||
uint32 lowguid = GUID_LOPART(guid);
|
||||
Player *player = sObjectMgr->GetPlayer(guid);
|
||||
Player* player = sObjectMgr->GetPlayer(guid);
|
||||
|
||||
// Guild master can be deleted when loading guild and guid doesn't exist in characters table
|
||||
// or when he is removed from guild by gm command
|
||||
@@ -2716,7 +2716,7 @@ void Guild::_SendBankContentUpdate(uint8 tabId, SlotIds slots) const
|
||||
|
||||
for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
|
||||
if (_MemberHasTabRights(itr->second->GetGUID(), tabId, GUILD_BANK_RIGHT_VIEW_TAB))
|
||||
if (Player *player = itr->second->FindPlayer())
|
||||
if (Player* player = itr->second->FindPlayer())
|
||||
{
|
||||
data.put<uint32>(rempos, uint32(_GetMemberRemainingSlots(player->GetGUID(), tabId)));
|
||||
player->GetSession()->SendPacket(&data);
|
||||
|
||||
Reference in New Issue
Block a user