Core: Continued cleanup
If and for whitespaces.
This commit is contained in:
@@ -64,7 +64,7 @@ bool AddonHandler::BuildAddonPacket(WorldPacket *Source, WorldPacket *Target)
|
||||
*Source >> TempValue; // get real size of the packed structure
|
||||
|
||||
// empty addon packet, nothing process, can't be received from real client
|
||||
if(!TempValue)
|
||||
if (!TempValue)
|
||||
return false;
|
||||
|
||||
AddonRealSize = TempValue; // temp value because ZLIB only excepts uLongf
|
||||
@@ -80,20 +80,20 @@ bool AddonHandler::BuildAddonPacket(WorldPacket *Source, WorldPacket *Target)
|
||||
uint32 addonsCount;
|
||||
AddOnPacked >> addonsCount; // addons count?
|
||||
|
||||
for(uint32 i = 0; i < addonsCount; ++i)
|
||||
for (uint32 i = 0; i < addonsCount; ++i)
|
||||
{
|
||||
std::string addonName;
|
||||
uint8 enabled;
|
||||
uint32 crc, unk2;
|
||||
|
||||
// check next addon data format correctness
|
||||
if(AddOnPacked.rpos()+1 > AddOnPacked.size())
|
||||
if (AddOnPacked.rpos()+1 > AddOnPacked.size())
|
||||
return false;
|
||||
|
||||
AddOnPacked >> addonName;
|
||||
|
||||
// recheck next addon data format correctness
|
||||
if(AddOnPacked.rpos()+1+4+4 > AddOnPacked.size())
|
||||
if (AddOnPacked.rpos()+1+4+4 > AddOnPacked.size())
|
||||
return false;
|
||||
|
||||
AddOnPacked >> enabled >> crc >> unk2;
|
||||
@@ -130,7 +130,7 @@ bool AddonHandler::BuildAddonPacket(WorldPacket *Source, WorldPacket *Target)
|
||||
uint32 count = 0;
|
||||
*Target << uint32(count);
|
||||
|
||||
if(AddOnPacked.rpos() != AddOnPacked.size())
|
||||
if (AddOnPacked.rpos() != AddOnPacked.size())
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "packet under read!");
|
||||
}
|
||||
else
|
||||
|
||||
@@ -152,7 +152,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
|
||||
if (item)
|
||||
{
|
||||
ItemTemplate const* itemProto = item->GetTemplate();
|
||||
if(!itemProto || !(itemProto->Flags & ITEM_PROTO_FLAG_BIND_TO_ACCOUNT))
|
||||
if (!itemProto || !(itemProto->Flags & ITEM_PROTO_FLAG_BIND_TO_ACCOUNT))
|
||||
{
|
||||
accountBound = false;
|
||||
break;
|
||||
|
||||
@@ -222,7 +222,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
|
||||
}
|
||||
|
||||
// Verify that the bag is an actual bag or wrapped item that can be used "normally"
|
||||
if(!(proto->Flags & ITEM_PROTO_FLAG_OPENABLE) && !pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED))
|
||||
if (!(proto->Flags & ITEM_PROTO_FLAG_OPENABLE) && !pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED))
|
||||
{
|
||||
pUser->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
|
||||
sLog->outError("Possible hacking attempt: Player %s [guid: %u] tried to open item [guid: %u, entry: %u] which is not openable!",
|
||||
|
||||
@@ -219,7 +219,7 @@ static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item **m
|
||||
hisTrade->SetInAcceptProcess(true);
|
||||
|
||||
// store items in local list and set 'in-trade' flag
|
||||
for(uint8 i = 0; i < TRADE_SLOT_TRADED_COUNT; ++i)
|
||||
for (uint8 i = 0; i < TRADE_SLOT_TRADED_COUNT; ++i)
|
||||
{
|
||||
if (Item* item = myTrade->GetItem(TradeSlots(i)))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user