diff options
Diffstat (limited to 'src/gui/buy.cpp')
-rw-r--r-- | src/gui/buy.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp index 86bd5413..e96cc04f 100644 --- a/src/gui/buy.cpp +++ b/src/gui/buy.cpp @@ -216,11 +216,11 @@ void BuyDialog::action(const std::string& eventId) // there a better way to ensure this fails in an _obivous_ way in C++? else if (eventId == "buy" && (mAmountItems > 0 && mAmountItems <= mMaxItems)) { - MessageOut outMsg(mNetwork); - outMsg.writeInt16(CMSG_NPC_BUY_REQUEST); - outMsg.writeInt16(8); - outMsg.writeInt16(mAmountItems); - outMsg.writeInt16(mShopItems->at(selectedItem).id); + MessageOut outMsg; + outMsg.writeShort(CMSG_NPC_BUY_REQUEST); + outMsg.writeShort(8); + outMsg.writeShort(mAmountItems); + outMsg.writeShort(mShopItems->at(selectedItem).id); // update money ! mMoney -= mAmountItems * mShopItems->at(selectedItem).price; |