summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-05 20:30:24 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-05 20:30:24 +0300
commitbd05fef587d0cbb821b6284567a81524cb0b15d3 (patch)
tree962ee03e6286952537f707f360ff19730e281374 /src/net
parent3b9c2fa508f6020e2456ea3d2e865549392a593a (diff)
downloadplus-bd05fef587d0cbb821b6284567a81524cb0b15d3.tar.gz
plus-bd05fef587d0cbb821b6284567a81524cb0b15d3.tar.bz2
plus-bd05fef587d0cbb821b6284567a81524cb0b15d3.tar.xz
plus-bd05fef587d0cbb821b6284567a81524cb0b15d3.zip
fix code style.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/playerhandler.cpp4
-rw-r--r--src/net/eathena/beinghandler.cpp29
-rw-r--r--src/net/tmwa/beinghandler.cpp9
-rw-r--r--src/net/tmwa/playerhandler.cpp11
4 files changed, 23 insertions, 30 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index fa892af29..841e27c48 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -22,7 +22,6 @@
#include "net/ea/playerhandler.h"
-#include "configuration.h"
#include "game.h"
#include "party.h"
#include "notifymanager.h"
@@ -32,7 +31,6 @@
#include "being/attributes.h"
#include "being/localplayer.h"
-#include "gui/dialogtype.h"
#include "gui/viewport.h"
#include "gui/windows/skilldialog.h"
@@ -46,8 +44,6 @@
#include "net/ea/eaprotocol.h"
-#include "utils/gettext.h"
-
#include "debug.h"
// Max. distance we are willing to scroll after a teleport;
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 48f31aeaa..d49fc145e 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -37,7 +37,6 @@
#include "input/keyboardconfig.h"
#include "gui/windows/socialwindow.h"
-#include "gui/windows/killstats.h"
#include "gui/windows/outfitwindow.h"
@@ -454,41 +453,41 @@ void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing,
const std::string color;
switch (type)
{
- case 0: // change race
+ case 0: // change race
dstBeing->setSubtype(static_cast<uint16_t>(id), 0);
break;
- case 1: // eAthena LOOK_HAIR
+ case 1: // eAthena LOOK_HAIR
dstBeing->setSpriteID(SPRITE_HAIR_COLOR, id *-1);
break;
- case 2: // LOOK_WEAPON Weapon ID in id, Shield ID in id2
+ case 2: // LOOK_WEAPON Weapon ID in id, Shield ID in id2
dstBeing->setSprite(SPRITE_BODY, id, "", 1, true);
if (!mHideShield)
dstBeing->setSprite(SPRITE_FLOOR, id2);
localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR);
break;
- case 3: // LOOK_HEAD_BOTTOM
+ case 3: // LOOK_HEAD_BOTTOM
dstBeing->setSprite(SPRITE_WEAPON, id, color,
static_cast<unsigned char>(id2));
localPlayer->imitateOutfit(dstBeing, SPRITE_WEAPON);
break;
- case 4: // LOOK_HEAD_TOP Change upper headgear for eAthena, hat for us
+ case 4: // LOOK_HEAD_TOP Change upper headgear for eAthena, hat for us
dstBeing->setSprite(SPRITE_CLOTHES_COLOR, id, color,
static_cast<unsigned char>(id2));
localPlayer->imitateOutfit(dstBeing, SPRITE_CLOTHES_COLOR);
break;
- case 5: // LOOK_HEAD_MID Change middle headgear for eathena, armor for us
+ case 5: // LOOK_HEAD_MID Change middle headgear for eathena, armor for us
dstBeing->setSprite(SPRITE_HEAD_BOTTOM, id, color,
static_cast<unsigned char>(id2));
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_BOTTOM);
break;
- case 6: // eAthena LOOK_HAIR_COLOR
+ case 6: // eAthena LOOK_HAIR_COLOR
dstBeing->setSpriteColor(SPRITE_HAIR_COLOR, ItemDB::get(
dstBeing->getSpriteID(SPRITE_HAIR_COLOR)).getDyeColorsString(id));
break;
- case 7: // Clothes color
+ case 7: // Clothes color
// ignoring it
break;
- case 8: // eAthena LOOK_SHIELD
+ case 8: // eAthena LOOK_SHIELD
if (!mHideShield)
{
dstBeing->setSprite(SPRITE_FLOOR, id, color,
@@ -496,12 +495,12 @@ void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing,
}
localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR);
break;
- case 9: // eAthena LOOK_SHOES
+ case 9: // eAthena LOOK_SHOES
dstBeing->setSprite(SPRITE_HAIR, id, color,
static_cast<unsigned char>(id2));
localPlayer->imitateOutfit(dstBeing, SPRITE_HAIR);
break;
- case 10: // LOOK_GLOVES
+ case 10: // LOOK_GLOVES
dstBeing->setSprite(SPRITE_SHOES, id, color,
static_cast<unsigned char>(id2));
localPlayer->imitateOutfit(dstBeing, SPRITE_SHOES);
@@ -1043,7 +1042,7 @@ void BeingHandler::processBeingVisible(Net::MessageIn &msg)
dstBeing->setStatusEffectBlock(32, static_cast<uint16_t>(
msg.readInt32("opt3")));
dstBeing->setKarma(msg.readUInt8("karma"));
- uint8_t gender = msg.readUInt8("gender") & 3;
+ uint8_t gender = static_cast<uint8_t>(msg.readUInt8("gender") & 3);
if (dstBeing->getType() == ActorType::Player)
{
@@ -1205,7 +1204,7 @@ void BeingHandler::processBeingMove(Net::MessageIn &msg)
dstBeing->setStatusEffectBlock(32, static_cast<uint16_t>(
msg.readInt32("opt3")));
dstBeing->setKarma(msg.readUInt8("karma"));
- uint8_t gender = msg.readUInt8("gender") & 3;
+ uint8_t gender = static_cast<uint8_t>(msg.readUInt8("gender") & 3);
if (dstBeing->getType() == ActorType::Player)
{
@@ -1370,7 +1369,7 @@ void BeingHandler::processBeingSpawn(Net::MessageIn &msg)
dstBeing->setStatusEffectBlock(32, static_cast<uint16_t>(
msg.readInt32("opt3")));
dstBeing->setKarma(msg.readUInt8("karma"));
- uint8_t gender = msg.readUInt8("gender") & 3;
+ uint8_t gender = static_cast<uint8_t>(msg.readUInt8("gender") & 3);
if (dstBeing->getType() == ActorType::Player)
{
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index a74e8bee7..7f11598c5 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -529,7 +529,8 @@ void BeingHandler::processPlayerUpdate1(Net::MessageIn &msg)
dstBeing->updateSprite(SPRITE_WEAPON, headBottom,
"", colors[0]);
dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, "", colors[2]);
- dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, "", colors[1]);
+ dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop,
+ "", colors[1]);
}
else
{
@@ -680,7 +681,8 @@ void BeingHandler::processPlayerUpdate2(Net::MessageIn &msg)
dstBeing->updateSprite(SPRITE_WEAPON, headBottom,
"", colors[0]);
dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, "", colors[2]);
- dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, "", colors[1]);
+ dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop,
+ "", colors[1]);
}
else
{
@@ -831,7 +833,8 @@ void BeingHandler::processPlayerMove(Net::MessageIn &msg)
dstBeing->updateSprite(SPRITE_WEAPON, headBottom,
"", colors[0]);
dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, "", colors[2]);
- dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, "", colors[1]);
+ dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop,
+ "", colors[1]);
}
else
{
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index cec4d2772..c2aa6b4e0 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -23,25 +23,20 @@
#include "net/tmwa/playerhandler.h"
#include "configuration.h"
-#include "game.h"
#include "being/attributes.h"
#include "being/beingflag.h"
#include "being/localplayer.h"
+#include "gui/onlineplayer.h"
+
#include "gui/windows/statuswindow.h"
+#include "gui/windows/whoisonline.h"
#include "net/tmwa/inventoryhandler.h"
#include "net/tmwa/messageout.h"
#include "net/tmwa/protocol.h"
-#include "gui/windows/whoisonline.h"
-
-#include "gui/onlineplayer.h"
-#include "gui/viewport.h"
-
-#include "resources/map/map.h"
-
#include "debug.h"
extern Net::PlayerHandler *playerHandler;