diff options
Diffstat (limited to 'src/net/eathena/vendinghandler.cpp')
-rw-r--r-- | src/net/eathena/vendinghandler.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp index 47428a040..3228cf0db 100644 --- a/src/net/eathena/vendinghandler.cpp +++ b/src/net/eathena/vendinghandler.cpp @@ -182,8 +182,8 @@ void VendingHandler::buy(const Being *const being, createOutPacket(CMSG_VENDING_BUY); outMsg.writeInt16(12, "len"); outMsg.writeInt32(being->getId(), "account id"); - outMsg.writeInt16(amount, "amount"); - outMsg.writeInt16(index, "index"); + outMsg.writeInt16(static_cast<int16_t>(amount), "amount"); + outMsg.writeInt16(static_cast<int16_t>(index), "index"); } void VendingHandler::buy2(const Being *const being, @@ -198,8 +198,8 @@ void VendingHandler::buy2(const Being *const being, outMsg.writeInt16(16, "len"); outMsg.writeInt32(being->getId(), "account id"); outMsg.writeInt32(vendId, "vend id"); - outMsg.writeInt16(amount, "amount"); - outMsg.writeInt16(index, "index"); + outMsg.writeInt16(static_cast<int16_t>(amount), "amount"); + outMsg.writeInt16(static_cast<int16_t>(index), "index"); } void VendingHandler::createShop(const std::string &name, @@ -207,9 +207,9 @@ void VendingHandler::createShop(const std::string &name, std::vector<ShopItem*> &items) const { createOutPacket(CMSG_VENDING_CREATE_SHOP); - outMsg.writeInt16(85 + items.size() * 8, "len"); + outMsg.writeInt16(static_cast<int16_t>(85 + items.size() * 8), "len"); outMsg.writeString(name, 80, "shop name"); - outMsg.writeInt8(flag ? 1 : 0, "flag"); + outMsg.writeInt8(static_cast<int8_t>(flag ? 1 : 0), "flag"); FOR_EACH (std::vector<ShopItem*>::const_iterator, it, items) { const ShopItem *const item = *it; |