[12069] Cleanup comment style

This commit is contained in:
Schmoozerd 2012-07-22 02:54:31 +02:00
parent 5efb3867f5
commit 835d1c7479
205 changed files with 2835 additions and 2835 deletions

View file

@ -29,12 +29,12 @@
void WorldSession::HandleSplitItemOpcode(WorldPacket& recv_data)
{
//DEBUG_LOG("WORLD: CMSG_SPLIT_ITEM");
// DEBUG_LOG("WORLD: CMSG_SPLIT_ITEM");
uint8 srcbag, srcslot, dstbag, dstslot;
uint32 count;
recv_data >> srcbag >> srcslot >> dstbag >> dstslot >> count;
//DEBUG_LOG("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u, dstslot = %u, count = %u", srcbag, srcslot, dstbag, dstslot, count);
// DEBUG_LOG("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u, dstslot = %u, count = %u", srcbag, srcslot, dstbag, dstslot, count);
uint16 src = ((srcbag << 8) | srcslot);
uint16 dst = ((dstbag << 8) | dstslot);
@ -43,7 +43,7 @@ void WorldSession::HandleSplitItemOpcode(WorldPacket& recv_data)
return;
if (count == 0)
return; //check count - if zero it's fake packet
return; // check count - if zero it's fake packet
if (!_player->IsValidPos(srcbag, srcslot, true))
{
@ -62,11 +62,11 @@ void WorldSession::HandleSplitItemOpcode(WorldPacket& recv_data)
void WorldSession::HandleSwapInvItemOpcode(WorldPacket& recv_data)
{
//DEBUG_LOG("WORLD: CMSG_SWAP_INV_ITEM");
// DEBUG_LOG("WORLD: CMSG_SWAP_INV_ITEM");
uint8 srcslot, dstslot;
recv_data >> dstslot >> srcslot;
//DEBUG_LOG("STORAGE: receive srcslot = %u, dstslot = %u", srcslot, dstslot);
// DEBUG_LOG("STORAGE: receive srcslot = %u, dstslot = %u", srcslot, dstslot);
// prevent attempt swap same item to current position generated by client at special cheating sequence
if (srcslot == dstslot)
@ -111,11 +111,11 @@ void WorldSession::HandleAutoEquipItemSlotOpcode(WorldPacket& recv_data)
void WorldSession::HandleSwapItem(WorldPacket& recv_data)
{
//DEBUG_LOG("WORLD: CMSG_SWAP_ITEM");
// DEBUG_LOG("WORLD: CMSG_SWAP_ITEM");
uint8 dstbag, dstslot, srcbag, srcslot;
recv_data >> dstbag >> dstslot >> srcbag >> srcslot ;
//DEBUG_LOG("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u, dstslot = %u", srcbag, srcslot, dstbag, dstslot);
// DEBUG_LOG("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u, dstslot = %u", srcbag, srcslot, dstbag, dstslot);
uint16 src = ((srcbag << 8) | srcslot);
uint16 dst = ((dstbag << 8) | dstslot);
@ -141,11 +141,11 @@ void WorldSession::HandleSwapItem(WorldPacket& recv_data)
void WorldSession::HandleAutoEquipItemOpcode(WorldPacket& recv_data)
{
//DEBUG_LOG("WORLD: CMSG_AUTOEQUIP_ITEM");
// DEBUG_LOG("WORLD: CMSG_AUTOEQUIP_ITEM");
uint8 srcbag, srcslot;
recv_data >> srcbag >> srcslot;
//DEBUG_LOG("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
// DEBUG_LOG("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
Item* pSrcItem = _player->GetItemByPos(srcbag, srcslot);
if (!pSrcItem)
@ -235,11 +235,11 @@ void WorldSession::HandleAutoEquipItemOpcode(WorldPacket& recv_data)
void WorldSession::HandleDestroyItemOpcode(WorldPacket& recv_data)
{
//DEBUG_LOG("WORLD: CMSG_DESTROYITEM");
// DEBUG_LOG("WORLD: CMSG_DESTROYITEM");
uint8 bag, slot, count, data1, data2, data3;
recv_data >> bag >> slot >> count >> data1 >> data2 >> data3;
//DEBUG_LOG("STORAGE: receive bag = %u, slot = %u, count = %u", bag, slot, count);
// DEBUG_LOG("STORAGE: receive bag = %u, slot = %u, count = %u", bag, slot, count);
uint16 pos = (bag << 8) | slot;
@ -280,7 +280,7 @@ void WorldSession::HandleDestroyItemOpcode(WorldPacket& recv_data)
// Only _static_ data send in this packet !!!
void WorldSession::HandleItemQuerySingleOpcode(WorldPacket& recv_data)
{
//DEBUG_LOG("WORLD: CMSG_ITEM_QUERY_SINGLE");
// DEBUG_LOG("WORLD: CMSG_ITEM_QUERY_SINGLE");
uint32 item;
recv_data >> item;
@ -302,9 +302,9 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket& recv_data)
data << pProto->SubClass;
data << int32(pProto->Unk0); // new 2.0.3, not exist in wdb cache?
data << name;
data << uint8(0x00); //pProto->Name2; // blizz not send name there, just uint8(0x00); <-- \0 = empty string = empty name...
data << uint8(0x00); //pProto->Name3; // blizz not send name there, just uint8(0x00);
data << uint8(0x00); //pProto->Name4; // blizz not send name there, just uint8(0x00);
data << uint8(0x00); // pProto->Name2; // blizz not send name there, just uint8(0x00); <-- \0 = empty string = empty name...
data << uint8(0x00); // pProto->Name3; // blizz not send name there, just uint8(0x00);
data << uint8(0x00); // pProto->Name4; // blizz not send name there, just uint8(0x00);
data << pProto->DisplayInfoID;
data << pProto->Quality;
data << pProto->Flags;
@ -433,12 +433,12 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket& recv_data)
void WorldSession::HandleReadItemOpcode(WorldPacket& recv_data)
{
//DEBUG_LOG( "WORLD: CMSG_READ_ITEM");
// DEBUG_LOG( "WORLD: CMSG_READ_ITEM");
uint8 bag, slot;
recv_data >> bag >> slot;
//sLog.outDetail("STORAGE: Read bag = %u, slot = %u", bag, slot);
// sLog.outDetail("STORAGE: Read bag = %u, slot = %u", bag, slot);
Item* pItem = _player->GetItemByPos(bag, slot);
if (pItem && pItem->GetProto()->PageText)
@ -828,11 +828,11 @@ void WorldSession::SendListInventory(ObjectGuid vendorguid)
void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket& recv_data)
{
//DEBUG_LOG("WORLD: CMSG_AUTOSTORE_BAG_ITEM");
// DEBUG_LOG("WORLD: CMSG_AUTOSTORE_BAG_ITEM");
uint8 srcbag, srcslot, dstbag;
recv_data >> srcbag >> srcslot >> dstbag;
//DEBUG_LOG("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u", srcbag, srcslot, dstbag);
// DEBUG_LOG("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u", srcbag, srcslot, dstbag);
Item* pItem = _player->GetItemByPos(srcbag, srcslot);
if (!pItem)
@ -1098,7 +1098,7 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data)
DEBUG_LOG("Received opcode CMSG_WRAP_ITEM");
uint8 gift_bag, gift_slot, item_bag, item_slot;
//recv_data.hexlike();
// recv_data.hexlike();
recv_data >> gift_bag >> gift_slot; // paper
recv_data >> item_bag >> item_slot; // item
@ -1213,7 +1213,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
for (int i = 0; i < MAX_GEM_SOCKETS; ++i)
recv_data >> gemGuids[i];
//cheat -> tried to socket same gem multiple times
// cheat -> tried to socket same gem multiple times
for (int i = 0; i < MAX_GEM_SOCKETS; ++i)
{
ObjectGuid gemGuid = gemGuids[i];
@ -1229,14 +1229,14 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
}
Item* itemTarget = _player->GetItemByGuid(itemGuid);
if (!itemTarget) //missing item to socket
if (!itemTarget) // missing item to socket
return;
ItemPrototype const* itemProto = itemTarget->GetProto();
if (!itemProto)
return;
//this slot is excepted when applying / removing meta gem bonus
// this slot is excepted when applying / removing meta gem bonus
uint8 slot = itemTarget->IsEquipped() ? itemTarget->GetSlot() : uint8(NULL_SLOT);
Item* Gems[MAX_GEM_SOCKETS];
@ -1244,10 +1244,10 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
Gems[i] = gemGuids[i] ? _player->GetItemByGuid(gemGuids[i]) : NULL;
GemPropertiesEntry const* GemProps[MAX_GEM_SOCKETS];
for (int i = 0; i < MAX_GEM_SOCKETS; ++i) //get geminfo from dbc storage
for (int i = 0; i < MAX_GEM_SOCKETS; ++i) // get geminfo from dbc storage
GemProps[i] = (Gems[i]) ? sGemPropertiesStore.LookupEntry(Gems[i]->GetProto()->GemProperties) : NULL;
for (int i = 0; i < MAX_GEM_SOCKETS; ++i) //check for hack maybe
for (int i = 0; i < MAX_GEM_SOCKETS; ++i) // check for hack maybe
{
if (!GemProps[i])
continue;
@ -1277,7 +1277,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
uint32 GemEnchants[MAX_GEM_SOCKETS];
uint32 OldEnchants[MAX_GEM_SOCKETS];
for (int i = 0; i < MAX_GEM_SOCKETS; ++i) //get new and old enchantments
for (int i = 0; i < MAX_GEM_SOCKETS; ++i) // get new and old enchantments
{
GemEnchants[i] = (GemProps[i]) ? GemProps[i]->spellitemenchantement : 0;
OldEnchants[i] = itemTarget->GetEnchantmentId(EnchantmentSlot(SOCK_ENCHANTMENT_SLOT + i));
@ -1377,12 +1377,12 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
}
}
bool SocketBonusActivated = itemTarget->GemsFitSockets(); //save state of socketbonus
_player->ToggleMetaGemsActive(slot, false); //turn off all metagems (except for the target item)
bool SocketBonusActivated = itemTarget->GemsFitSockets(); // save state of socketbonus
_player->ToggleMetaGemsActive(slot, false); // turn off all metagems (except for the target item)
//if a meta gem is being equipped, all information has to be written to the item before testing if the conditions for the gem are met
// if a meta gem is being equipped, all information has to be written to the item before testing if the conditions for the gem are met
//remove ALL enchants
// remove ALL enchants
for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT + MAX_GEM_SOCKETS; ++enchant_slot)
_player->ApplyEnchantment(itemTarget, EnchantmentSlot(enchant_slot), false);
@ -1405,7 +1405,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
_player->ApplyEnchantment(itemTarget, BONUS_ENCHANTMENT_SLOT, false);
itemTarget->SetEnchantment(BONUS_ENCHANTMENT_SLOT, (SocketBonusToBeActivated ? itemTarget->GetProto()->socketBonus : 0), 0, 0);
_player->ApplyEnchantment(itemTarget, BONUS_ENCHANTMENT_SLOT, true);
//it is not displayed, client has an inbuilt system to determine if the bonus is activated
// it is not displayed, client has an inbuilt system to determine if the bonus is activated
}
_player->ToggleMetaGemsActive(slot, true); // turn on all metagems (except for target item)