[8047] Little cleanup in C++ manner.

Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
ApoC 2009-06-20 01:43:04 +02:00
parent b91f7c9479
commit 7f3be4ae6a
2 changed files with 2 additions and 4 deletions

View file

@ -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() )
{

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8046"
#define REVISION_NR "8047"
#endif // __REVISION_NR_H__