aboutsummaryrefslogtreecommitdiff
path: root/src/game/ItemHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/ItemHandler.cpp')
-rw-r--r--src/game/ItemHandler.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/game/ItemHandler.cpp b/src/game/ItemHandler.cpp
index 129766b35f0..ad9b1a7de4b 100644
--- a/src/game/ItemHandler.cpp
+++ b/src/game/ItemHandler.cpp
@@ -337,14 +337,14 @@ void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data )
data << int32(pProto->Stackable);
data << pProto->ContainerSlots;
data << pProto->StatsCount; // item stats count
- for(uint32 i = 0; i < pProto->StatsCount; ++i)
+ for (uint32 i = 0; i < pProto->StatsCount; ++i)
{
data << pProto->ItemStat[i].ItemStatType;
data << pProto->ItemStat[i].ItemStatValue;
}
data << pProto->ScalingStatDistribution; // scaling stats distribution
data << pProto->ScalingStatValue; // some kind of flags used to determine stat values column
- for(int i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i)
+ for (int i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i)
{
data << pProto->Damage[i].DamageMin;
data << pProto->Damage[i].DamageMax;
@@ -364,7 +364,7 @@ void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data )
data << pProto->AmmoType;
data << pProto->RangedModRange;
- for(int s = 0; s < MAX_ITEM_PROTO_SPELLS; ++s)
+ for (int s = 0; s < MAX_ITEM_PROTO_SPELLS; ++s)
{
// send DBC data for cooldowns in same way as it used in Spell::SendSpellCooldown
// use `item_template` or if not set then only use spell cooldowns
@@ -418,7 +418,7 @@ void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data )
data << pProto->Map; // Added in 1.12.x & 2.0.1 client branch
data << pProto->BagFamily;
data << pProto->TotemCategory;
- for(int s = 0; s < MAX_ITEM_PROTO_SOCKETS; ++s)
+ for (int s = 0; s < MAX_ITEM_PROTO_SOCKETS; ++s)
{
data << pProto->Socket[s].Color;
data << pProto->Socket[s].Content;
@@ -656,7 +656,7 @@ void WorldSession::HandleBuyItemInSlotOpcode( WorldPacket & recv_data )
bag = INVENTORY_SLOT_BAG_0;
else
{
- for (int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END;++i)
+ for (int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i)
{
if (Bag *pBag = (Bag*)_player->GetItemByPos(INVENTORY_SLOT_BAG_0,i))
{
@@ -737,7 +737,7 @@ void WorldSession::SendListInventory( uint64 vendorguid )
float discountMod = _player->GetReputationPriceDiscount(pCreature);
- for(int i = 0; i < numitems; ++i )
+ for (int i = 0; i < numitems; ++i )
{
if(VendorItem const* crItem = vItems->GetItem(i))
{
@@ -1123,7 +1123,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
if(!item_guid)
return;
- for(int i = 0; i < MAX_GEM_SOCKETS; ++i)
+ for (int i = 0; i < MAX_GEM_SOCKETS; ++i)
recv_data >> gem_guids[i];
//cheat -> tried to socket same gem multiple times
@@ -1143,14 +1143,14 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
uint8 slot = itemTarget->IsEquipped() ? itemTarget->GetSlot() : uint8(NULL_SLOT);
Item *Gems[MAX_GEM_SOCKETS];
- for(int i = 0; i < MAX_GEM_SOCKETS; ++i)
+ for (int i = 0; i < MAX_GEM_SOCKETS; ++i)
Gems[i] = gem_guids[i] ? _player->GetItemByGuid(gem_guids[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;
@@ -1180,14 +1180,14 @@ 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));
}
// check unique-equipped conditions
- for(int i = 0; i < MAX_GEM_SOCKETS; ++i)
+ for (int i = 0; i < MAX_GEM_SOCKETS; ++i)
{
if(!Gems[i])
continue;
@@ -1284,10 +1284,10 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
//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
- for(uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
+ for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
_player->ApplyEnchantment(itemTarget,EnchantmentSlot(enchant_slot),false);
- for(int i = 0; i < MAX_GEM_SOCKETS; ++i)
+ for (int i = 0; i < MAX_GEM_SOCKETS; ++i)
{
if(GemEnchants[i])
{
@@ -1297,7 +1297,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
}
}
- for(uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
+ for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
_player->ApplyEnchantment(itemTarget,EnchantmentSlot(enchant_slot),true);
bool SocketBonusToBeActivated = itemTarget->GemsFitSockets();//current socketbonus state