diff options
Diffstat (limited to 'src/game/Bag.cpp')
-rw-r--r-- | src/game/Bag.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/game/Bag.cpp b/src/game/Bag.cpp index 331b12acde5..1edbc06474d 100644 --- a/src/game/Bag.cpp +++ b/src/game/Bag.cpp @@ -1,7 +1,7 @@ /* - * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> + * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * - * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,9 +23,7 @@ #include "ObjectMgr.h" #include "Database/DatabaseEnv.h" #include "Log.h" -#include "WorldPacket.h" #include "UpdateData.h" -#include "WorldSession.h" Bag::Bag( ): Item() { @@ -34,7 +32,7 @@ Bag::Bag( ): Item() m_valuesCount = CONTAINER_END; - memset(m_bagslot, 0, sizeof(Item *) * MAX_BAG_SIZE); // Maximum 20 Slots + memset(m_bagslot, 0, sizeof(Item *) * MAX_BAG_SIZE); } Bag::~Bag() @@ -86,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; @@ -121,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(); @@ -131,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; |