[8048] Fixed typo in HandleBuyItemInSlotOpcode. Author: nos4r2zod
[8047] Little cleanup in C++ manner. Author: ApoC --HG-- branch : trunk
This commit is contained in:
@@ -674,7 +674,7 @@ void WorldSession::HandleBuyItemInSlotOpcode( WorldPacket & recv_data )
|
|||||||
|
|
||||||
recv_data >> vendorguid >> item >> slot >> bagguid >> bagslot >> count;
|
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 )
|
void WorldSession::HandleBuyItemOpcode( WorldPacket & recv_data )
|
||||||
|
|||||||
+1
-3
@@ -17779,7 +17779,6 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
|
|||||||
|
|
||||||
if (bagguid != NULL_BAG && slot != NULL_SLOT)
|
if (bagguid != NULL_BAG && slot != NULL_SLOT)
|
||||||
{
|
{
|
||||||
Bag *pBag;
|
|
||||||
if( bagguid == GetGUID() )
|
if( bagguid == GetGUID() )
|
||||||
{
|
{
|
||||||
bag = INVENTORY_SLOT_BAG_0;
|
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++)
|
for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END;i++)
|
||||||
{
|
{
|
||||||
pBag = (Bag*)GetItemByPos(INVENTORY_SLOT_BAG_0,i);
|
if( Bag *pBag = (Bag*)GetItemByPos(INVENTORY_SLOT_BAG_0,i) )
|
||||||
if( pBag )
|
|
||||||
{
|
{
|
||||||
if( bagguid == pBag->GetGUID() )
|
if( bagguid == pBag->GetGUID() )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user