summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-05 21:49:04 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-06 12:12:22 +0300
commit2bd59adc7c456ce6f377feac8bc838e8011ebfc8 (patch)
treef2f25428e42e59b9a6d55d7c0be9a99c42e96e40 /src/net/eathena
parentac1ef6b19f5c1405cfaa239ab367a93b17043723 (diff)
downloadmanaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.gz
manaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.bz2
manaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.xz
manaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.zip
Fix code style.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/beinghandler.cpp11
-rw-r--r--src/net/eathena/buyingstorehandler.cpp3
-rw-r--r--src/net/eathena/buysellhandler.cpp2
-rw-r--r--src/net/eathena/cashshophandler.cpp4
-rw-r--r--src/net/eathena/charserverhandler.cpp4
-rw-r--r--src/net/eathena/chathandler.cpp2
-rw-r--r--src/net/eathena/gamehandler.cpp1
-rw-r--r--src/net/eathena/generalhandler.cpp8
-rw-r--r--src/net/eathena/guildhandler.cpp4
-rw-r--r--src/net/eathena/homunculushandler.cpp2
-rw-r--r--src/net/eathena/inventoryhandler.cpp2
-rw-r--r--src/net/eathena/markethandler.cpp4
-rw-r--r--src/net/eathena/mercenaryhandler.cpp4
-rw-r--r--src/net/eathena/pethandler.cpp4
-rw-r--r--src/net/eathena/playerhandler.cpp2
-rw-r--r--src/net/eathena/vendinghandler.cpp3
16 files changed, 15 insertions, 45 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 9a678321a..ff12a909d 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -1232,7 +1232,8 @@ void BeingHandler::processBeingMove2(Net::MessageIn &msg)
* later versions of eAthena for both mobs and
* players
*/
- Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id"));
+ Being *const dstBeing = actorManager->findBeing(
+ msg.readBeingId("being id"));
uint16_t srcX, srcY, dstX, dstY;
msg.readCoordinatePair(srcX, srcY, dstX, dstY, "move path");
@@ -1347,6 +1348,8 @@ void BeingHandler::processBeingAction2(Net::MessageIn &msg)
}
break;
default:
+ case AttackType::MISS:
+ case AttackType::SKILLMISS:
UNIMPLIMENTEDPACKET;
break;
}
@@ -1440,7 +1443,8 @@ void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg)
return;
}
- Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id"));
+ Being *const dstBeing = actorManager->findBeing(
+ msg.readBeingId("being id"));
msg.readInt16("head direction");
@@ -1666,7 +1670,8 @@ void BeingHandler::processPlayerGuilPartyInfo(Net::MessageIn &msg)
return;
}
- Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id"));
+ Being *const dstBeing = actorManager->findBeing(
+ msg.readBeingId("being id"));
if (dstBeing)
{
diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp
index baaee1aca..5e99994f9 100644
--- a/src/net/eathena/buyingstorehandler.cpp
+++ b/src/net/eathena/buyingstorehandler.cpp
@@ -25,12 +25,9 @@
#include "notifymanager.h"
#include "shopitem.h"
-#include "being/being.h"
#include "being/localplayer.h"
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/buyingstoreselldialog.h"
#include "listeners/arrowslistener.h"
diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp
index 26a5a538b..c10978b3d 100644
--- a/src/net/eathena/buysellhandler.cpp
+++ b/src/net/eathena/buysellhandler.cpp
@@ -26,8 +26,6 @@
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/buydialog.h"
#include "net/eathena/messageout.h"
diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp
index c2b872eca..785e3f62a 100644
--- a/src/net/eathena/cashshophandler.cpp
+++ b/src/net/eathena/cashshophandler.cpp
@@ -20,12 +20,8 @@
#include "net/eathena/cashshophandler.h"
-#include "logger.h"
-
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/buydialog.h"
#include "net/eathena/messageout.h"
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp
index 835360c64..63ca3f277 100644
--- a/src/net/eathena/charserverhandler.cpp
+++ b/src/net/eathena/charserverhandler.cpp
@@ -26,10 +26,6 @@
#include "configuration.h"
#include "settings.h"
-#include "enums/being/attributes.h"
-
-#include "enums/gui/dialogtype.h"
-
#include "gui/windows/charcreatedialog.h"
#include "gui/windows/charselectdialog.h"
#include "gui/windows/okdialog.h"
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 3cade553c..db7bb5829 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -47,8 +47,6 @@
#include "utils/gettext.h"
#include "utils/stringutils.h"
-#include <string>
-
#include "debug.h"
extern Net::ChatHandler *chatHandler;
diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp
index 7fa94ab48..4902b959f 100644
--- a/src/net/eathena/gamehandler.cpp
+++ b/src/net/eathena/gamehandler.cpp
@@ -23,6 +23,7 @@
#include "net/eathena/gamehandler.h"
#include "client.h"
+#include "logger.h"
#include "being/localplayer.h"
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 072605e78..2f404ce76 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -24,24 +24,17 @@
#include "client.h"
#include "configuration.h"
-#include "logger.h"
-#include "enums/being/attributes.h"
-
-#include "gui/windows/inventorywindow.h"
#include "gui/windows/skilldialog.h"
#include "gui/windows/socialwindow.h"
#include "gui/windows/statuswindow.h"
-#include "net/ea/guildhandler.h"
-
#include "gui/widgets/tabs/chat/guildtab.h"
#include "gui/widgets/tabs/chat/partytab.h"
#include "net/eathena/adminhandler.h"
#include "net/eathena/auctionhandler.h"
#include "net/eathena/bankhandler.h"
-#include "net/eathena/battlegroundhandler.h"
#include "net/eathena/beinghandler.h"
#include "net/eathena/buyingstorehandler.h"
#include "net/eathena/buysellhandler.h"
@@ -58,7 +51,6 @@
#include "net/eathena/itemhandler.h"
#include "net/eathena/loginhandler.h"
#include "net/eathena/mailhandler.h"
-#include "net/eathena/maphandler.h"
#include "net/eathena/markethandler.h"
#include "net/eathena/mercenaryhandler.h"
#include "net/eathena/network.h"
diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp
index bffe95b94..31f1edba7 100644
--- a/src/net/eathena/guildhandler.cpp
+++ b/src/net/eathena/guildhandler.cpp
@@ -512,8 +512,8 @@ void GuildHandler::changeEmblem(std::string emblem) const
createOutPacket(CMSG_GUILD_CHANGE_EMBLEM);
if (emblem.size() > 200)
emblem = emblem.substr(0, 200);
- const int sz = emblem.size();
- outMsg.writeInt16(sz + 4, "len");
+ const int sz = static_cast<int>(emblem.size());
+ outMsg.writeInt16(static_cast<int16_t>(sz + 4), "len");
outMsg.writeString(emblem, sz, "emblem");
}
diff --git a/src/net/eathena/homunculushandler.cpp b/src/net/eathena/homunculushandler.cpp
index e2441ac14..537ea33d8 100644
--- a/src/net/eathena/homunculushandler.cpp
+++ b/src/net/eathena/homunculushandler.cpp
@@ -301,7 +301,7 @@ void HomunculusHandler::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/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index ed834c9e8..54204234e 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -26,8 +26,6 @@
#include "enums/equipslot.h"
-#include "enums/being/attributes.h"
-
#include "being/localplayer.h"
#include "listeners/arrowslistener.h"
diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp
index 12beafd98..ec9e3c095 100644
--- a/src/net/eathena/markethandler.cpp
+++ b/src/net/eathena/markethandler.cpp
@@ -24,8 +24,6 @@
#include "being/playerinfo.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/buydialog.h"
#include "net/eathena/messageout.h"
@@ -127,7 +125,7 @@ void MarketHandler::buyItem(const int itemId,
cnt = 100;
createOutPacket(CMSG_NPC_MARKET_BUY);
- outMsg.writeInt16(4 + 6 * cnt, "len");
+ outMsg.writeInt16(static_cast<int16_t>(4 + 6 * cnt), "len");
for (int f = 0; f < cnt; f ++)
{
outMsg.writeInt16(static_cast<int16_t>(itemId), "item id");
diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp
index 82f7b59c2..bbe8cc8bf 100644
--- a/src/net/eathena/mercenaryhandler.cpp
+++ b/src/net/eathena/mercenaryhandler.cpp
@@ -23,7 +23,6 @@
#include "actormanager.h"
#include "notifymanager.h"
-#include "being/being.h"
#include "being/localplayer.h"
#include "being/mercenaryinfo.h"
#include "being/playerinfo.h"
@@ -90,7 +89,8 @@ void MercenaryHandler::processMercenaryUpdate(Net::MessageIn &msg)
void MercenaryHandler::processMercenaryInfo(Net::MessageIn &msg)
{
// +++ need create if need mercenary being and update stats
- Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id"));
+ Being *const dstBeing = actorManager->findBeing(
+ msg.readBeingId("being id"));
msg.readInt16("atk");
msg.readInt16("matk");
msg.readInt16("hit");
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp
index f89a6d53a..f737ba6a1 100644
--- a/src/net/eathena/pethandler.cpp
+++ b/src/net/eathena/pethandler.cpp
@@ -21,20 +21,16 @@
#include "net/eathena/pethandler.h"
#include "actormanager.h"
-#include "inventory.h"
#include "notifymanager.h"
#include "being/localplayer.h"
#include "being/petinfo.h"
#include "being/playerinfo.h"
-#include "gui/chatconsts.h"
-
#include "gui/windows/eggselectiondialog.h"
#include "gui/widgets/tabs/chat/chattab.h"
-#include "net/chathandler.h"
#include "net/inventoryhandler.h"
#include "net/serverfeatures.h"
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 83cbec9ba..83f0a44b6 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -24,8 +24,6 @@
#include "being/localplayer.h"
-#include "enums/being/attributes.h"
-
#include "gui/windows/statuswindow.h"
#include "input/inputmanager.h"
diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp
index 1bbe491cf..f53a7b861 100644
--- a/src/net/eathena/vendinghandler.cpp
+++ b/src/net/eathena/vendinghandler.cpp
@@ -23,9 +23,6 @@
#include "actormanager.h"
#include "shopitem.h"
-#include "enums/being/attributes.h"
-
-#include "being/being.h"
#include "being/localplayer.h"
#include "being/playerinfo.h"