mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[8047] Little cleanup in C++ manner.
Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
b91f7c9479
commit
7f3be4ae6a
2 changed files with 2 additions and 4 deletions
|
|
@ -17139,7 +17139,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;
|
||||
|
|
@ -17148,8 +17147,7 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
|
|||
{
|
||||
for (int 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() )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue