Jump to content

[Fix][8048] WorldSession::HandleBuyItemInSlotOpcode


Guest nos4r2zod

Recommended Posts

What bug does the patch fix? What features does the patch add?

This fixes a small typo in WorldSession::HandleBuyItemInSlotOpcode that makes MaNGOS try to put bought items in the slot of the item in the vendor's inventory rather than the slot the player chose. This causes weird client error messages and potential crashes.

Bug reproduceable by manually buying items from vendors, as in using left click and dragging the item into the player's inventory.

For which repository revision was the patch created?

8039

Who has been writing this patch? Please include either forum user names or email addresses.

Me

diff --git a/src/game/ItemHandler.cpp b/src/game/ItemHandler.cpp
index 1956791..5a9ff81 100644
--- a/src/game/ItemHandler.cpp
+++ b/src/game/ItemHandler.cpp
@@ -672,7 +672,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 )

Edit: Perhaps this should have been a part of http://github.com/mangos/mangos/commit/4e8447fda703c49e711d2e2eec92ddfdc29f22f9 ?

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use