aboutsummaryrefslogtreecommitdiff
path: root/src/game/Bag.cpp
diff options
context:
space:
mode:
authorSpp <none@none>2010-04-07 19:14:10 +0200
committerSpp <none@none>2010-04-07 19:14:10 +0200
commitd19e12708001fbef2308be0e8cb5375a2ac7af48 (patch)
tree09fc8f67a6197802e0512950f0b0a3438a9834e8 /src/game/Bag.cpp
parent2e127f7a30706dc1d40c65de22ff02851732da24 (diff)
Code style (game + scripts only):
"if(" --> "if (" --HG-- branch : trunk
Diffstat (limited to 'src/game/Bag.cpp')
-rw-r--r--src/game/Bag.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/game/Bag.cpp b/src/game/Bag.cpp
index e71bfc02fd0..c56e0c71007 100644
--- a/src/game/Bag.cpp
+++ b/src/game/Bag.cpp
@@ -41,7 +41,7 @@ Bag::~Bag()
for (uint8 i = 0; i < MAX_BAG_SIZE; ++i)
if (Item *item = m_bagslot[i])
{
- if(item->IsInWorld())
+ if (item->IsInWorld())
{
sLog.outCrash("Item %u (slot %u, bag slot %u) in bag %u (slot %u, bag slot %u, m_bagslot %u) is to be deleted but is still in world.",
item->GetEntry(), (uint32)item->GetSlot(), (uint32)item->GetBagSlot(),
@@ -57,14 +57,14 @@ void Bag::AddToWorld()
Item::AddToWorld();
for (uint32 i = 0; i < GetBagSize(); ++i)
- if(m_bagslot[i])
+ if (m_bagslot[i])
m_bagslot[i]->AddToWorld();
}
void Bag::RemoveFromWorld()
{
for (uint32 i = 0; i < GetBagSize(); ++i)
- if(m_bagslot[i])
+ if (m_bagslot[i])
m_bagslot[i]->RemoveFromWorld();
Item::RemoveFromWorld();
@@ -74,7 +74,7 @@ bool Bag::Create(uint32 guidlow, uint32 itemid, Player const* owner)
{
ItemPrototype const * itemProto = objmgr.GetItemPrototype(itemid);
- if(!itemProto || itemProto->ContainerSlots > MAX_BAG_SIZE)
+ if (!itemProto || itemProto->ContainerSlots > MAX_BAG_SIZE)
return false;
Object::_Create( guidlow, 0, HIGHGUID_CONTAINER );
@@ -110,7 +110,7 @@ void Bag::SaveToDB()
bool Bag::LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult_AutoPtr result)
{
- if(!Item::LoadFromDB(guid, owner_guid, result))
+ if (!Item::LoadFromDB(guid, owner_guid, result))
return false;
// cleanup bag content related item value fields (its will be filled correctly from `character_inventory`)
@@ -177,7 +177,7 @@ void Bag::BuildCreateUpdateBlockForPlayer( UpdateData *data, Player *target ) co
Item::BuildCreateUpdateBlockForPlayer( data, target );
for (uint32 i = 0; i < GetBagSize(); ++i)
- if(m_bagslot[i])
+ if (m_bagslot[i])
m_bagslot[i]->BuildCreateUpdateBlockForPlayer( data, target );
}
@@ -198,16 +198,16 @@ uint32 Bag::GetItemCount( uint32 item, Item* eItem ) const
for (uint32 i=0; i < GetBagSize(); ++i)
{
pItem = m_bagslot[i];
- if( pItem && pItem != eItem && pItem->GetEntry() == item )
+ if ( pItem && pItem != eItem && pItem->GetEntry() == item )
count += pItem->GetCount();
}
- if(eItem && eItem->GetProto()->GemProperties)
+ if (eItem && eItem->GetProto()->GemProperties)
{
for (uint32 i=0; i < GetBagSize(); ++i)
{
pItem = m_bagslot[i];
- if( pItem && pItem != eItem && pItem->GetProto()->Socket[0].Color )
+ if ( pItem && pItem != eItem && pItem->GetProto()->Socket[0].Color )
count += pItem->GetGemCountWithID(item);
}
}
@@ -218,8 +218,8 @@ uint32 Bag::GetItemCount( uint32 item, Item* eItem ) const
uint8 Bag::GetSlotByItemGUID(uint64 guid) const
{
for (uint32 i = 0; i < GetBagSize(); ++i)
- if(m_bagslot[i] != 0)
- if(m_bagslot[i]->GetGUID() == guid)
+ if (m_bagslot[i] != 0)
+ if (m_bagslot[i]->GetGUID() == guid)
return i;
return NULL_SLOT;
@@ -227,7 +227,7 @@ uint8 Bag::GetSlotByItemGUID(uint64 guid) const
Item* Bag::GetItemByPos( uint8 slot ) const
{
- if( slot < GetBagSize() )
+ if ( slot < GetBagSize() )
return m_bagslot[slot];
return NULL;