diff options
author | megamage <none@none> | 2009-06-19 19:01:25 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-06-19 19:01:25 -0500 |
commit | 2940aeb681259c977f7e7c9d1023050ec2271ca6 (patch) | |
tree | a768ff1f3cdea3067b2c4a9f1b0ffe0e0391be23 | |
parent | 8adfaceadffbb66768ed5b0e3284c0ee46363a36 (diff) |
[8048] Fixed typo in HandleBuyItemInSlotOpcode. Author: nos4r2zod
[8047] Little cleanup in C++ manner. Author: ApoC
--HG--
branch : trunk
-rw-r--r-- | src/game/ItemHandler.cpp | 2 | ||||
-rw-r--r-- | src/game/Player.cpp | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/game/ItemHandler.cpp b/src/game/ItemHandler.cpp index 65c587ed79f..cf762dd0cb2 100644 --- a/src/game/ItemHandler.cpp +++ b/src/game/ItemHandler.cpp @@ -674,7 +674,7 @@ void WorldSession::HandleBuyItemInSlotOpcode( WorldPacket & recv_data ) recv_data >> vendorguid >> item >> slot >> bagguid >> bagslot >> count; - GetPlayer()->BuyItemFromVendor(vendorguid,item,count,bagguid,slot); + GetPlayer()->BuyItemFromVendor(vendorguid,item,count,bagguid,bagslot); } void WorldSession::HandleBuyItemOpcode( WorldPacket & recv_data ) 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() ) { |