diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-11 21:49:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-11 21:49:16 +0300 |
commit | 5b4e74ab44a2ae4eab9db71c860885802e2ba28d (patch) | |
tree | 065e1c4a5c5639b77789e7cf51ca25efeeb7e86a /src/net/eathena/vendinghandler.cpp | |
parent | ac12efd17d9f719b083d8af1eb5a06853835e8d6 (diff) | |
download | plus-5b4e74ab44a2ae4eab9db71c860885802e2ba28d.tar.gz plus-5b4e74ab44a2ae4eab9db71c860885802e2ba28d.tar.bz2 plus-5b4e74ab44a2ae4eab9db71c860885802e2ba28d.tar.xz plus-5b4e74ab44a2ae4eab9db71c860885802e2ba28d.zip |
Fix code style.
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; |