diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-27 20:53:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-27 20:53:45 +0300 |
commit | de7d095b98846529e2394e9868a6dd2e4344acc8 (patch) | |
tree | 922f05aaa5746fa90e4c43c0a9160b5f6b51fe81 /src/net/eathena | |
parent | 32947c0634ec582f6d641402433d2037f5087a36 (diff) | |
download | plus-de7d095b98846529e2394e9868a6dd2e4344acc8.tar.gz plus-de7d095b98846529e2394e9868a6dd2e4344acc8.tar.bz2 plus-de7d095b98846529e2394e9868a6dd2e4344acc8.tar.xz plus-de7d095b98846529e2394e9868a6dd2e4344acc8.zip |
fix code style.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/auctionhandler.h | 3 | ||||
-rw-r--r-- | src/net/eathena/bankhandler.h | 3 | ||||
-rw-r--r-- | src/net/eathena/buyingstorehandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/buyingstorehandler.h | 3 | ||||
-rw-r--r-- | src/net/eathena/cashshophandler.h | 3 | ||||
-rw-r--r-- | src/net/eathena/chathandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/familyhandler.h | 3 | ||||
-rw-r--r-- | src/net/eathena/friendshandler.h | 3 | ||||
-rw-r--r-- | src/net/eathena/mercenaryhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/pethandler.cpp | 4 |
10 files changed, 23 insertions, 5 deletions
diff --git a/src/net/eathena/auctionhandler.h b/src/net/eathena/auctionhandler.h index c393a6798..a513f9c89 100644 --- a/src/net/eathena/auctionhandler.h +++ b/src/net/eathena/auctionhandler.h @@ -21,6 +21,8 @@ #ifndef NET_EATHENA_AUCTIONHANDLER_H #define NET_EATHENA_AUCTIONHANDLER_H +#ifdef EATHENA_SUPPORT + #include "net/auctionhandler.h" #include "net/eathena/messagehandler.h" @@ -75,4 +77,5 @@ class AuctionHandler final : public MessageHandler, public Net::AuctionHandler } // namespace EAthena +#endif // EATHENA_SUPPORT #endif // NET_EATHENA_AUCTIONHANDLER_H diff --git a/src/net/eathena/bankhandler.h b/src/net/eathena/bankhandler.h index 64574dc88..d5d9f513d 100644 --- a/src/net/eathena/bankhandler.h +++ b/src/net/eathena/bankhandler.h @@ -21,6 +21,8 @@ #ifndef NET_EATHENA_BANKHANDLER_H #define NET_EATHENA_BANKHANDLER_H +#ifdef EATHENA_SUPPORT + #include "net/bankhandler.h" #include "net/eathena/messagehandler.h" @@ -53,4 +55,5 @@ class BankHandler final : public MessageHandler, } // namespace EAthena +#endif // EATHENA_SUPPORT #endif // NET_EATHENA_BANKHANDLER_H diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp index a3da66527..921c2f300 100644 --- a/src/net/eathena/buyingstorehandler.cpp +++ b/src/net/eathena/buyingstorehandler.cpp @@ -296,7 +296,7 @@ void BuyingStoreHandler::create(const std::string &name, std::vector<ShopItem*> &items) const { createOutPacket(CMSG_BUYINGSTORE_CREATE); - outMsg.writeInt16(89 + items.size() * 8, "len"); + outMsg.writeInt16(static_cast<int16_t>(89 + items.size() * 8), "len"); outMsg.writeInt32(maxMoney, "limit money"); outMsg.writeInt8(flag, "flag"); outMsg.writeString(name, 80, "store name"); diff --git a/src/net/eathena/buyingstorehandler.h b/src/net/eathena/buyingstorehandler.h index 123ae135e..53cc6fcef 100644 --- a/src/net/eathena/buyingstorehandler.h +++ b/src/net/eathena/buyingstorehandler.h @@ -21,6 +21,8 @@ #ifndef NET_EATHENA_BUYINGSTOREHANDLER_H #define NET_EATHENA_BUYINGSTOREHANDLER_H +#ifdef EATHENA_SUPPORT + #include "net/buyingstorehandler.h" #include "net/eathena/messagehandler.h" @@ -75,4 +77,5 @@ class BuyingStoreHandler final : public MessageHandler, } // namespace EAthena +#endif // EATHENA_SUPPORT #endif // NET_EATHENA_BUYINGSTOREHANDLER_H diff --git a/src/net/eathena/cashshophandler.h b/src/net/eathena/cashshophandler.h index 24f8d7f1a..176af7dc3 100644 --- a/src/net/eathena/cashshophandler.h +++ b/src/net/eathena/cashshophandler.h @@ -21,6 +21,8 @@ #ifndef NET_EATHENA_CASHSHOPHANDLER_H #define NET_EATHENA_CASHSHOPHANDLER_H +#ifdef EATHENA_SUPPORT + #include "net/cashshophandler.h" #include "net/eathena/messagehandler.h" @@ -54,4 +56,5 @@ class CashShopHandler final : public MessageHandler, } // namespace EAthena +#endif // EATHENA_SUPPORT #endif // NET_EATHENA_CASHSHOPHANDLER_H diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 0d401f0e3..aaad26fda 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -757,7 +757,7 @@ void ChatHandler::talkPet(const std::string &restrict text, createOutPacket(CMSG_PET_TALK); outMsg.writeInt16(static_cast<int16_t>(sz + 4 + 1), "len"); - outMsg.writeString(msg, sz, "message"); + outMsg.writeString(msg, static_cast<int>(sz), "message"); outMsg.writeInt8(0, "zero byte"); } diff --git a/src/net/eathena/familyhandler.h b/src/net/eathena/familyhandler.h index df53482b1..f648c44cd 100644 --- a/src/net/eathena/familyhandler.h +++ b/src/net/eathena/familyhandler.h @@ -21,6 +21,8 @@ #ifndef NET_EATHENA_FAMILYHANDLER_H #define NET_EATHENA_FAMILYHANDLER_H +#ifdef EATHENA_SUPPORT + #include "net/familyhandler.h" #include "net/eathena/messagehandler.h" @@ -55,4 +57,5 @@ class FamilyHandler final : public MessageHandler, } // namespace EAthena +#endif // EATHENA_SUPPORT #endif // NET_EATHENA_FAMILYHANDLER_H diff --git a/src/net/eathena/friendshandler.h b/src/net/eathena/friendshandler.h index 635a57fe0..f0b5ead71 100644 --- a/src/net/eathena/friendshandler.h +++ b/src/net/eathena/friendshandler.h @@ -21,6 +21,8 @@ #ifndef NET_EATHENA_FRIENDSHANDLER_H #define NET_EATHENA_FRIENDSHANDLER_H +#ifdef EATHENA_SUPPORT + #include "net/friendshandler.h" #include "net/eathena/messagehandler.h" @@ -56,4 +58,5 @@ class FriendsHandler final : public MessageHandler, } // namespace EAthena +#endif // EATHENA_SUPPORT #endif // NET_EATHENA_FRIENDSHANDLER_H diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp index 0c3985f07..e611ae259 100644 --- a/src/net/eathena/mercenaryhandler.cpp +++ b/src/net/eathena/mercenaryhandler.cpp @@ -230,7 +230,7 @@ void MercenaryHandler::talk(const std::string &restrict text) const createOutPacket(CMSG_HOMMERC_TALK); outMsg.writeInt16(static_cast<int16_t>(sz + 4 + 1), "len"); - outMsg.writeString(msg, sz, "message"); + outMsg.writeString(msg, static_cast<int>(sz), "message"); outMsg.writeInt8(0, "zero byte"); } diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp index 963ef0cc3..1b03cbf83 100644 --- a/src/net/eathena/pethandler.cpp +++ b/src/net/eathena/pethandler.cpp @@ -116,8 +116,8 @@ void PetHandler::move(const int petId A_UNUSED, return; createOutPacket(CMSG_PET_MOVE_TO); outMsg.writeInt32(0, "pet id"); - outMsg.writeInt16(x, "x"); - outMsg.writeInt16(y, "y"); + outMsg.writeInt16(static_cast<int16_t>(x), "x"); + outMsg.writeInt16(static_cast<int16_t>(y), "y"); } void PetHandler::spawn(const Being *const being A_UNUSED, |