diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
commit | 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch) | |
tree | 798117abd4dc7e610997d59d530a96ddc1509f53 /src/net/eathena/buyingstorehandler.cpp | |
parent | 4429cb14e9e187edef27aba692a4266733f79c17 (diff) | |
download | manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2 manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip |
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/net/eathena/buyingstorehandler.cpp')
-rw-r--r-- | src/net/eathena/buyingstorehandler.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp index a850a8785..5fcc9c4aa 100644 --- a/src/net/eathena/buyingstorehandler.cpp +++ b/src/net/eathena/buyingstorehandler.cpp @@ -48,15 +48,15 @@ void BuyingStoreHandler::create(const std::string &name, std::vector<ShopItem*> &items) const { createOutPacket(CMSG_BUYINGSTORE_CREATE); - outMsg.writeInt16(static_cast<int16_t>(89 + items.size() * 8), "len"); + outMsg.writeInt16(CAST_S16(89 + items.size() * 8), "len"); outMsg.writeInt32(maxMoney, "limit money"); outMsg.writeInt8(flag, "flag"); outMsg.writeString(name, 80, "store name"); FOR_EACH (std::vector<ShopItem*>::const_iterator, it, items) { const ShopItem *const item = *it; - outMsg.writeInt16(static_cast<int16_t>(item->getId()), "item id"); - outMsg.writeInt16(static_cast<int16_t>(item->getQuantity()), "amount"); + outMsg.writeInt16(CAST_S16(item->getId()), "item id"); + outMsg.writeInt16(CAST_S16(item->getQuantity()), "amount"); outMsg.writeInt32(item->getPrice(), "price"); } } @@ -87,11 +87,11 @@ void BuyingStoreHandler::sell(const Being *const being, outMsg.writeInt16(18, "len"); outMsg.writeBeingId(being->getId(), "account id"); outMsg.writeInt32(storeId, "store id"); - outMsg.writeInt16(static_cast<int16_t>( + outMsg.writeInt16(CAST_S16( item->getInvIndex() + INVENTORY_OFFSET), "index"); - outMsg.writeInt16(static_cast<int16_t>(item->getId()), "item id"); - outMsg.writeInt16(static_cast<int16_t>(amount), "amount"); + outMsg.writeInt16(CAST_S16(item->getId()), "item id"); + outMsg.writeInt16(CAST_S16(amount), "amount"); } } // namespace EAthena |