aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
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() )
{