aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-19 19:01:25 -0500
committermegamage <none@none>2009-06-19 19:01:25 -0500
commit2940aeb681259c977f7e7c9d1023050ec2271ca6 (patch)
treea768ff1f3cdea3067b2c4a9f1b0ffe0e0391be23 /src/game/Player.cpp
parent8adfaceadffbb66768ed5b0e3284c0ee46363a36 (diff)
[8048] Fixed typo in HandleBuyItemInSlotOpcode. Author: nos4r2zod
[8047] Little cleanup in C++ manner. Author: ApoC --HG-- branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 063ec6956cc..17203faadde 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -17779,7 +17779,6 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
if (bagguid != NULL_BAG && slot != NULL_SLOT)
{
- Bag *pBag;
if( bagguid == GetGUID() )
{
bag = INVENTORY_SLOT_BAG_0;
@@ -17788,8 +17787,7 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
{
for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END;i++)
{
- pBag = (Bag*)GetItemByPos(INVENTORY_SLOT_BAG_0,i);
- if( pBag )
+ if( Bag *pBag = (Bag*)GetItemByPos(INVENTORY_SLOT_BAG_0,i) )
{
if( bagguid == pBag->GetGUID() )
{