[7730] Some optimizantion and code style. Author: zhenya

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-29 00:26:07 -05:00
parent 9dd4b8c985
commit de11b9e901
60 changed files with 264 additions and 264 deletions
+3 -3
View File
@@ -84,7 +84,7 @@ bool Bag::Create(uint32 guidlow, uint32 itemid, Player const* owner)
SetUInt32Value(CONTAINER_FIELD_NUM_SLOTS, itemProto->ContainerSlots);
// Cleaning 20 slots
for (uint8 i = 0; i < MAX_BAG_SIZE; i++)
for (uint8 i = 0; i < MAX_BAG_SIZE; ++i)
{
SetUInt64Value(CONTAINER_FIELD_SLOT_1 + (i*2), 0);
m_bagslot[i] = NULL;
@@ -119,7 +119,7 @@ bool Bag::LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult *result)
void Bag::DeleteFromDB()
{
for (int i = 0; i < MAX_BAG_SIZE; i++)
for (int i = 0; i < MAX_BAG_SIZE; ++i)
if (m_bagslot[i])
m_bagslot[i]->DeleteFromDB();
@@ -129,7 +129,7 @@ void Bag::DeleteFromDB()
uint32 Bag::GetFreeSlots() const
{
uint32 slots = 0;
for (uint32 i=0; i < GetBagSize(); i++)
for (uint32 i=0; i < GetBagSize(); ++i)
if (!m_bagslot[i])
++slots;