Core: More codestyle cleanups

This commit is contained in:
click
2011-06-12 01:47:45 +02:00
parent 158966dc79
commit f16df538ee
87 changed files with 309 additions and 309 deletions
@@ -37,7 +37,7 @@ void WorldSession::HandleAuctionHelloOpcode(WorldPacket & recv_data)
uint64 guid; //NPC guid
recv_data >> guid;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
@@ -42,7 +42,7 @@ void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recv_data)
recv_data >> guid;
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
if (!unit)
return;
@@ -591,7 +591,7 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
if (!unit)
return;
@@ -611,7 +611,7 @@ void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
if (!unit)
return;
@@ -639,7 +639,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
if (_player->InBattleground())
return;
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
if (!unit)
return;
@@ -828,7 +828,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
pCurrChar->SetInGameTime(getMSTime());
// announce group about member online (must be after add to player list to receive announce to self)
if (Group *group = pCurrChar->GetGroup())
if (Group* group = pCurrChar->GetGroup())
{
//pCurrChar->groupInfo.group->SendInit(this); // useless
group->SendUpdate();
@@ -262,7 +262,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
break;
}
Player *player = sObjectMgr->GetPlayer(to.c_str());
Player* player = sObjectMgr->GetPlayer(to.c_str());
uint32 tSecurity = GetSecurity();
uint32 pSecurity = player ? player->GetSession()->GetSecurity() : SEC_PLAYER;
if (!player || (tSecurity == SEC_PLAYER && pSecurity > SEC_PLAYER && !player->isAcceptWhispers()))
@@ -294,7 +294,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
case CHAT_MSG_PARTY_LEADER:
{
// if player is in battleground, he cannot say to battleground members by /p
Group *group = GetPlayer()->GetOriginalGroup();
Group* group = GetPlayer()->GetOriginalGroup();
if (!group)
{
group = _player->GetGroup();
@@ -315,7 +315,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
{
if (GetPlayer()->GetGuildId())
{
if (Guild *guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildId()))
if (Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildId()))
{
sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, guild);
@@ -327,7 +327,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
{
if (GetPlayer()->GetGuildId())
{
if (Guild *guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildId()))
if (Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildId()))
{
sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, guild);
@@ -338,7 +338,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
case CHAT_MSG_RAID:
{
// if player is in battleground, he cannot say to battleground members by /ra
Group *group = GetPlayer()->GetOriginalGroup();
Group* group = GetPlayer()->GetOriginalGroup();
if (!group)
{
group = GetPlayer()->GetGroup();
@@ -355,7 +355,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
case CHAT_MSG_RAID_LEADER:
{
// if player is in battleground, he cannot say to battleground members by /ra
Group *group = GetPlayer()->GetOriginalGroup();
Group* group = GetPlayer()->GetOriginalGroup();
if (!group)
{
group = GetPlayer()->GetGroup();
@@ -371,7 +371,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
} break;
case CHAT_MSG_RAID_WARNING:
{
Group *group = GetPlayer()->GetGroup();
Group* group = GetPlayer()->GetGroup();
if (!group || !group->isRaidGroup() || !(group->IsLeader(GetPlayer()->GetGUID()) || group->IsAssistant(GetPlayer()->GetGUID())) || group->isBGGroup())
return;
@@ -385,7 +385,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
case CHAT_MSG_BATTLEGROUND:
{
//battleground raid is always in Player->GetGroup(), never in GetOriginalGroup()
Group *group = GetPlayer()->GetGroup();
Group* group = GetPlayer()->GetGroup();
if (!group || !group->isBGGroup())
return;
@@ -398,7 +398,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
case CHAT_MSG_BATTLEGROUND_LEADER:
{
// battleground raid is always in Player->GetGroup(), never in GetOriginalGroup()
Group *group = GetPlayer()->GetGroup();
Group* group = GetPlayer()->GetGroup();
if (!group || !group->isBGGroup() || !group->IsLeader(GetPlayer()->GetGUID()))
return;
@@ -584,7 +584,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recv_data)
recv_data >> iguid;
recv_data >> unk; // probably related to spam reporting
Player *player = sObjectMgr->GetPlayer(iguid);
Player* player = sObjectMgr->GetPlayer(iguid);
if (!player || !player->GetSession())
return;
@@ -73,7 +73,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket & recv_data)
return;
}
Player *player = sObjectMgr->GetPlayer(membername.c_str());
Player* player = sObjectMgr->GetPlayer(membername.c_str());
// no player
if (!player)
@@ -110,11 +110,11 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket & recv_data)
return;
}
Group *group = GetPlayer()->GetGroup();
Group* group = GetPlayer()->GetGroup();
if (group && group->isBGGroup())
group = GetPlayer()->GetOriginalGroup();
Group *group2 = player->GetGroup();
Group* group2 = player->GetGroup();
if (group2 && group2->isBGGroup())
group2 = player->GetOriginalGroup();
// player already in another group or invited
@@ -197,7 +197,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recv_data)
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_ACCEPT");
recv_data.read_skip<uint32>();
Group *group = GetPlayer()->GetGroupInvite();
Group* group = GetPlayer()->GetGroupInvite();
if (!group)
return;
@@ -363,14 +363,14 @@ void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket & recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_SET_LEADER");
Group *group = GetPlayer()->GetGroup();
Group* group = GetPlayer()->GetGroup();
if (!group)
return;
uint64 guid;
recv_data >> guid;
Player *player = sObjectMgr->GetPlayer(guid);
Player* player = sObjectMgr->GetPlayer(guid);
/** error handling **/
if (!player || !group->IsLeader(GetPlayer()->GetGUID()) || player->GetGroup() != group)
@@ -410,7 +410,7 @@ void WorldSession::HandleLootMethodOpcode(WorldPacket & recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_LOOT_METHOD");
Group *group = GetPlayer()->GetGroup();
Group* group = GetPlayer()->GetGroup();
if (!group)
return;
@@ -520,7 +520,7 @@ void WorldSession::HandleRaidTargetUpdateOpcode(WorldPacket & recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_RAID_TARGET_UPDATE");
Group *group = GetPlayer()->GetGroup();
Group* group = GetPlayer()->GetGroup();
if (!group)
return;
@@ -550,7 +550,7 @@ void WorldSession::HandleGroupRaidConvertOpcode(WorldPacket & /*recv_data*/)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_RAID_CONVERT");
Group *group = GetPlayer()->GetGroup();
Group* group = GetPlayer()->GetGroup();
if (!group)
return;
@@ -572,7 +572,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data)
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_CHANGE_SUB_GROUP");
// we will get correct pointer for group here, so we don't have to check if group is BG raid
Group *group = GetPlayer()->GetGroup();
Group* group = GetPlayer()->GetGroup();
if (!group)
return;
@@ -610,7 +610,7 @@ void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket & recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_ASSISTANT_LEADER");
Group *group = GetPlayer()->GetGroup();
Group* group = GetPlayer()->GetGroup();
if (!group)
return;
@@ -631,7 +631,7 @@ void WorldSession::HandlePartyAssignmentOpcode(WorldPacket & recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_PARTY_ASSIGNMENT");
Group *group = GetPlayer()->GetGroup();
Group* group = GetPlayer()->GetGroup();
if (!group)
return;
@@ -665,7 +665,7 @@ void WorldSession::HandleRaidReadyCheckOpcode(WorldPacket & recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_RAID_READY_CHECK");
Group *group = GetPlayer()->GetGroup();
Group* group = GetPlayer()->GetGroup();
if (!group)
return;
@@ -708,7 +708,7 @@ void WorldSession::HandleRaidReadyCheckFinishedOpcode(WorldPacket & /*recv_data*
// Is any reaction need?
}
void WorldSession::BuildPartyMemberStatsChangedPacket(Player *player, WorldPacket *data)
void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacket *data)
{
uint32 mask = player->GetGroupUpdateFlag();
@@ -884,7 +884,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recv_data)
uint64 Guid;
recv_data >> Guid;
Player *player = HashMapHolder<Player>::Find(Guid);
Player* player = HashMapHolder<Player>::Find(Guid);
if (!player)
{
WorldPacket data(SMSG_PARTY_MEMBER_STATS_FULL, 3+4+2);
@@ -91,7 +91,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
if (_player->PlayerTalkClass->IsGossipOptionCoded(gossipListId))
recv_data >> code;
Creature *unit = NULL;
Creature* unit = NULL;
GameObject *go = NULL;
if (IS_CRE_OR_VEH_GUID(guid))
{
@@ -1250,7 +1250,7 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data)
uint64 guid;
recv_data >> guid;
Player *player = sObjectMgr->GetPlayer(guid);
Player* player = sObjectMgr->GetPlayer(guid);
if (!player)
{
@@ -1691,7 +1691,7 @@ void WorldSession::HandleQueryInspectAchievements(WorldPacket & recv_data)
uint64 guid;
recv_data.readPackGUID(guid);
Player *player = sObjectMgr->GetPlayer(guid);
Player* player = sObjectMgr->GetPlayer(guid);
if (!player)
return;
@@ -51,7 +51,7 @@ void WorldSession::HandleTabardVendorActivateOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TABARDDESIGNER);
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TABARDDESIGNER);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleTabardVendorActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
@@ -80,7 +80,7 @@ void WorldSession::HandleBankerActivateOpcode(WorldPacket & recv_data)
recv_data >> guid;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_BANKER);
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_BANKER);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleBankerActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
@@ -119,7 +119,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList");
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
@@ -243,7 +243,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recv_data)
recv_data >> guid >> spellId;
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_TRAINER_BUY_SPELL NpcGUID=%u, learn spell id is: %u", uint32(GUID_LOPART(guid)), spellId);
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleTrainerBuySpellOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
@@ -309,7 +309,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipHelloOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
@@ -365,7 +365,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
sLog->outDebug(LOG_FILTER_PACKETIO, "string read: %s", code.c_str());
}
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
if (!unit)
{
sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
@@ -396,7 +396,7 @@ void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket & recv_data)
recv_data >> guid;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_SPIRITHEALER);
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_SPIRITHEALER);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleSpiritHealerActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
@@ -451,7 +451,7 @@ void WorldSession::HandleBinderActivateOpcode(WorldPacket & recv_data)
if (!GetPlayer()->IsInWorld() || !GetPlayer()->isAlive())
return;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_INNKEEPER);
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_INNKEEPER);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleBinderActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(npcGUID)));
@@ -868,7 +868,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket & recv_data)
recv_data >> npcGUID >> itemGUID >> guildBank;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_REPAIR);
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_REPAIR);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleRepairItemOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(npcGUID)));
@@ -319,7 +319,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
pet->GetCharmInfo()->SetIsFollowing(false);
}
Spell *spell = new Spell(pet, spellInfo, false);
Spell* spell = new Spell(pet, spellInfo, false);
SpellCastResult result = spell->CheckPetCast(unit_target);
@@ -774,7 +774,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
caster->ClearUnitState(UNIT_STAT_FOLLOW);
Spell *spell = new Spell(caster, spellInfo, false);
Spell* spell = new Spell(caster, spellInfo, false);
spell->m_cast_count = castCount; // probably pending spell cast
spell->m_targets = targets;
@@ -602,7 +602,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
uint8 signs = 0;
uint64 petitionguid, plguid;
uint32 type, junk;
Player *player;
Player* player;
recv_data >> junk; // this is not petition type!
recv_data >> petitionguid; // petition guid
recv_data >> plguid; // player guid
@@ -60,7 +60,7 @@ void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleTalentWipeConfirmOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
@@ -397,7 +397,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
spellInfo = actualSpellInfo;
}
Spell *spell = new Spell(mover, spellInfo, false);
Spell* spell = new Spell(mover, spellInfo, false);
spell->m_cast_count = castCount; // set count of casts
spell->prepare(&targets);
}
@@ -550,7 +550,7 @@ void WorldSession::HandleSpellClick(WorldPacket& recv_data)
recv_data >> guid;
// this will get something not in world. crash
Creature *unit = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
Creature* unit = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if (!unit)
return;
@@ -42,7 +42,7 @@ void WorldSession::HandleTaxiNodeStatusQueryOpcode(WorldPacket & recv_data)
void WorldSession::SendTaxiStatus(uint64 guid)
{
// cheating checks
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSession::SendTaxiStatus - Unit (GUID: %u) not found.", uint32(GUID_LOPART(guid)));
@@ -72,7 +72,7 @@ void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket & recv_data)
recv_data >> guid;
// cheating checks
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleTaxiQueryAvailableNodes - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));