aboutsummaryrefslogtreecommitdiff
path: root/src/game/Bag.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-11-20 16:16:57 -0600
committermegamage <none@none>2008-11-20 16:16:57 -0600
commit1e997b95cc89c615adf2acd27a5f6916b78e0ff3 (patch)
tree491c496b798daf9b20db6397ae3f0affb6fd3738 /src/game/Bag.cpp
parent0b61584e1b19afb8dbef376a4e2903d8631bfc1d (diff)
Re-commit 262 due to EOL issues. (no difference from 262)
--HG-- branch : trunk
Diffstat (limited to 'src/game/Bag.cpp')
-rw-r--r--src/game/Bag.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/game/Bag.cpp b/src/game/Bag.cpp
index 4b8284c7c37..765d40f3962 100644
--- a/src/game/Bag.cpp
+++ b/src/game/Bag.cpp
@@ -10,12 +10,12 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Common.h"
@@ -41,7 +41,7 @@ Bag::~Bag()
{
for(int i = 0; i < MAX_BAG_SIZE; ++i)
if (m_bagslot[i])
- delete m_bagslot[i];
+ delete m_bagslot[i];
}
void Bag::AddToWorld()
@@ -71,7 +71,7 @@ bool Bag::Create(uint32 guidlow, uint32 itemid, Player const* owner)
Object::_Create( guidlow, 0, HIGHGUID_CONTAINER );
- SetUInt32Value(OBJECT_FIELD_ENTRY, itemid);
+ SetEntry(itemid);
SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f);
SetUInt64Value(ITEM_FIELD_OWNER, owner ? owner->GetGUID() : 0);
@@ -85,7 +85,7 @@ bool Bag::Create(uint32 guidlow, uint32 itemid, Player const* owner)
// Setting the number of Slots the Container has
SetUInt32Value(CONTAINER_FIELD_NUM_SLOTS, itemProto->ContainerSlots);
- // Cleanning 20 slots
+ // Cleaning 20 slots
for (uint8 i = 0; i < MAX_BAG_SIZE; i++)
{
SetUInt64Value(CONTAINER_FIELD_SLOT_1 + (i*2), 0);
@@ -213,6 +213,7 @@ uint8 Bag::GetSlotByItemGUID(uint64 guid) const
if(m_bagslot[i] != 0)
if(m_bagslot[i]->GetGUID() == guid)
return i;
+
return NULL_SLOT;
}
@@ -220,6 +221,6 @@ Item* Bag::GetItemByPos( uint8 slot ) const
{
if( slot < GetBagSize() )
return m_bagslot[slot];
-
+
return NULL;
}