summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-12 18:39:00 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-12 18:39:00 +0300
commit351821c1f18f9285be58df0a05339936311f6490 (patch)
tree47a60cad4f61f63c5ac2faf98dcae24760d7fe11 /src/net/eathena
parente50632a83a3c679cffd372656277a304d5d853f8 (diff)
downloadmanaverse-351821c1f18f9285be58df0a05339936311f6490.tar.gz
manaverse-351821c1f18f9285be58df0a05339936311f6490.tar.bz2
manaverse-351821c1f18f9285be58df0a05339936311f6490.tar.xz
manaverse-351821c1f18f9285be58df0a05339936311f6490.zip
first part of style fixed after cpplint checks.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/adminhandler.cpp4
-rw-r--r--src/net/eathena/beinghandler.cpp58
-rw-r--r--src/net/eathena/buysellhandler.cpp5
-rw-r--r--src/net/eathena/charserverhandler.cpp20
-rw-r--r--src/net/eathena/chathandler.cpp4
-rw-r--r--src/net/eathena/gamehandler.cpp4
-rw-r--r--src/net/eathena/generalhandler.cpp2
-rw-r--r--src/net/eathena/gui/guildtab.cpp2
-rw-r--r--src/net/eathena/gui/partytab.cpp2
-rw-r--r--src/net/eathena/guildhandler.cpp42
-rw-r--r--src/net/eathena/inventoryhandler.cpp4
-rw-r--r--src/net/eathena/itemhandler.cpp2
-rw-r--r--src/net/eathena/loginhandler.cpp4
-rw-r--r--src/net/eathena/messagehandler.cpp2
-rw-r--r--src/net/eathena/messagein.cpp4
-rw-r--r--src/net/eathena/messageout.cpp2
-rw-r--r--src/net/eathena/network.cpp2
-rw-r--r--src/net/eathena/npchandler.cpp28
-rw-r--r--src/net/eathena/partyhandler.cpp6
-rw-r--r--src/net/eathena/playerhandler.cpp14
-rw-r--r--src/net/eathena/skillhandler.cpp2
-rw-r--r--src/net/eathena/tradehandler.cpp2
22 files changed, 96 insertions, 119 deletions
diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp
index 615cffa28..4661cd5b8 100644
--- a/src/net/eathena/adminhandler.cpp
+++ b/src/net/eathena/adminhandler.cpp
@@ -85,7 +85,7 @@ void AdminHandler::localAnnounce(const std::string &text) const
void AdminHandler::hide(const bool h A_UNUSED) const
{
MessageOut outMsg(CMSG_ADMIN_HIDE);
- outMsg.writeInt32(0); //unused
+ outMsg.writeInt32(0); // unused
}
void AdminHandler::kick(const int playerId) const
@@ -94,4 +94,4 @@ void AdminHandler::kick(const int playerId) const
outMsg.writeInt32(playerId);
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 6fb7ee087..6de4bf1b7 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -102,14 +102,14 @@ BeingHandler::BeingHandler(bool enableSync):
void BeingHandler::requestNameById(const int id) const
{
MessageOut outMsg(0x0094);
- outMsg.writeInt32(id); //readLong(2));
+ outMsg.writeInt32(id); // readLong(2));
}
void BeingHandler::handleMessage(Net::MessageIn &msg)
{
switch (msg.getId())
{
- case SMSG_BEING_VISIBLE: // changed
+ case SMSG_BEING_VISIBLE: // changed
case SMSG_BEING_MOVE:
processBeingVisibleOrMove(msg, msg.getId() == SMSG_BEING_VISIBLE);
break;
@@ -118,7 +118,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
processBeingMove2(msg);
break;
- case SMSG_BEING_SPAWN: // changed
+ case SMSG_BEING_SPAWN: // changed
processBeingSpawn(msg);
break;
@@ -433,10 +433,10 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
// An update about a player, potentially including movement.
const int id = msg.readInt32();
const short speed = msg.readInt16();
- const uint16_t stunMode = msg.readInt16(); // opt1
- uint32_t statusEffects = msg.readInt16(); // opt2
+ const uint16_t stunMode = msg.readInt16(); // opt1
+ uint32_t statusEffects = msg.readInt16(); // opt2
statusEffects |= (static_cast<uint32_t>(msg.readInt16()))
- << 16; // status.options; Aethyra uses this as misc2
+ << 16; // status.options; Aethyra uses this as misc2
const short job = msg.readInt16();
Being *dstBeing = actorSpriteManager->findBeing(id);
@@ -474,7 +474,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
const uint16_t headBottom = msg.readInt16();
if (msgType == 3)
- msg.readInt32(); // server tick
+ msg.readInt32(); // server tick
const uint16_t headTop = msg.readInt16();
const uint16_t headMid = msg.readInt16();
@@ -483,9 +483,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
msg.readInt8();
msg.readInt8();
msg.readInt8();
- msg.readInt8(); //unused
-// shoes = msg.readInt16();
-// gloves = msg.readInt16(); //sd->head_dir
+ msg.readInt8(); // unused
const int guild = msg.readInt32(); // guild
@@ -508,14 +506,9 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
dstBeing->setSprite(SPRITE_WEAPON, weapon, "", 1, true);
if (!mHideShield)
dstBeing->setSprite(SPRITE_SHIELD, shield);
- //dstBeing->setSprite(SPRITE_SHOE, shoes);
dstBeing->setSprite(SPRITE_BOTTOMCLOTHES, headBottom);
dstBeing->setSprite(SPRITE_TOPCLOTHES, headMid);
dstBeing->setSprite(SPRITE_HAT, headTop);
- //dstBeing->setSprite(SPRITE_GLOVES, gloves);
- //dstBeing->setSprite(SPRITE_CAPE, cape);
- //dstBeing->setSprite(SPRITE_MISC1, misc1);
- //dstBeing->setSprite(SPRITE_MISC2, misc2);
dstBeing->setSprite(SPRITE_HAIR, hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
@@ -552,7 +545,6 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
}
else
{
-// uint8_t dir;
uint16_t x, y;
msg.readCoordinates(x, y, dir);
dstBeing->setTileCoords(x, y);
@@ -590,7 +582,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
break;
default:
- //need set stay state?
+ // need set stay state?
logger->log("QQQ2 SMSG_PLAYER_UPDATE_1:"
+ toString(id) + " " + toString(type));
logger->log("dstBeing id:" + toString(dstBeing->getId()));
@@ -601,21 +593,20 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
}
else if (msgType == 3)
{
- msg.readInt8(); // unknown
+ msg.readInt8(); // unknown
}
- const int level = msg.readInt8(); // Lv
+ const int level = msg.readInt8(); // Lv
if (level)
dstBeing->setLevel(level);
- msg.readInt8(); // unknown
+ msg.readInt8(); // unknown
if (dstBeing->getType() != Being::PLAYER
|| msgType != 3)
{
dstBeing->setActionTime(tick_time);
-// dstBeing->reset();
}
dstBeing->setStunMode(stunMode);
@@ -634,7 +625,7 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
return;
if (visible)
- msg.readInt8(); // padding?
+ msg.readInt8(); // padding?
// Information about a being in range
const int id = msg.readInt32();
@@ -646,7 +637,7 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
mSpawnId = 0;
short speed = msg.readInt16();
const uint16_t stunMode = msg.readInt16(); // opt1
- uint32_t statusEffects = msg.readInt16(); // opt2
+ uint32_t statusEffects = msg.readInt16(); // opt2
statusEffects |= (static_cast<uint32_t>(msg.readInt16())) << 16; // option
const short job = msg.readInt16(); // class
@@ -712,14 +703,11 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
const uint16_t weapon = msg.readInt16();
const uint16_t headBottom = msg.readInt16();
-// if (!visible)
-// msg.readInt32(); // server tick
-
const uint16_t shield = msg.readInt16();
const uint16_t headTop = msg.readInt16();
const uint16_t headMid = msg.readInt16();
const int hairColor = msg.readInt16();
- const uint16_t shoes = msg.readInt16(); //clothes color - "abused" as shoes
+ const uint16_t shoes = msg.readInt16(); // clothes color
uint16_t gloves;
if (dstBeing->getType() == ActorSprite::MONSTER)
@@ -731,24 +719,15 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
else
{
gloves = msg.readInt16(); // head dir - "abused" as gloves
- msg.readInt32(); // guild
- msg.readInt16(); // guild emblem
+ msg.readInt32(); // guild
+ msg.readInt16(); // guild emblem
}
-// logger->log("being guild: " + toString(guild));
-/*
- if (guild == 0)
- dstBeing->clearGuilds();
- else
- dstBeing->setGuild(Guild::getGuild(static_cast<short>(guild)));
-*/
msg.readInt16(); // manner
dstBeing->setStatusEffectBlock(32, msg.readInt16()); // opt3
msg.readInt8(); // karma
short gender = msg.readInt8();
- // reserving bits for future usage
-
if (dstBeing->getType() == ActorSprite::PLAYER)
{
gender &= 3;
@@ -818,13 +797,12 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
msg.readInt8(); // unknown
msg.readInt8(); // state / sit
- msg.readInt16(); // level
+ msg.readInt16(); // level
dstBeing->setStunMode(stunMode);
dstBeing->setStatusEffectBlock(0, static_cast<uint16_t>(
(statusEffects >> 16) & 0xffff));
dstBeing->setStatusEffectBlock(16, statusEffects & 0xffff);
-
}
} // namespace EAthena
diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp
index b96d2c382..0b1c4ad06 100644
--- a/src/net/eathena/buysellhandler.cpp
+++ b/src/net/eathena/buysellhandler.cpp
@@ -95,7 +95,6 @@ void BuySellHandler::handleMessage(Net::MessageIn &msg)
default:
break;
}
-
}
void BuySellHandler::processNpcBuy(Net::MessageIn &msg)
@@ -110,7 +109,7 @@ void BuySellHandler::processNpcBuy(Net::MessageIn &msg)
{
const int value = msg.readInt32();
msg.readInt32(); // DCvalue
- msg.readInt8(); // type
+ msg.readInt8(); // type
const int itemId = msg.readInt16();
const unsigned char color = 1;
mBuyDialog->addItem(itemId, color, 0, value);
@@ -137,4 +136,4 @@ void BuySellHandler::processNpcSellResponse(Net::MessageIn &msg) const
}
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp
index ca4275ebe..ffb83ea73 100644
--- a/src/net/eathena/charserverhandler.cpp
+++ b/src/net/eathena/charserverhandler.cpp
@@ -154,8 +154,8 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg,
data.mAttributes[PlayerInfo::MP] = msg.readInt16();
data.mAttributes[PlayerInfo::MAX_MP] = msg.readInt16();
- msg.readInt16(); // speed
- tempPlayer->setSubtype(msg.readInt16()); // class (used for race)
+ msg.readInt16(); // speed
+ tempPlayer->setSubtype(msg.readInt16()); // class (used for race)
const int hairStyle = msg.readInt16();
const uint16_t weapon = msg.readInt16();
@@ -163,11 +163,11 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg,
data.mAttributes[PlayerInfo::LEVEL] = msg.readInt16();
- msg.readInt16(); // skill point
+ msg.readInt16(); // skill point
const int bottomClothes = msg.readInt16();
const int shield = msg.readInt16();
- const int hat = msg.readInt16(); // head option top
+ const int hat = msg.readInt16(); // head option top
const int topClothes = msg.readInt16();
tempPlayer->setSprite(SPRITE_HAIR, hairStyle * -1,
@@ -186,16 +186,16 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg,
tempPlayer->setSprite(SPRITE_CAPE, cape);
tempPlayer->setSprite(SPRITE_MISC1, misc1);
tempPlayer->setSprite(SPRITE_BOTTOMCLOTHES, bottomClothes);
- //to avoid show error (error.xml) need remove this sprite
+ // to avoid show error (error.xml) need remove this sprite
if (!config.getBoolValue("hideShield"))
tempPlayer->setSprite(SPRITE_SHIELD, shield);
- tempPlayer->setSprite(SPRITE_HAT, hat); // head option top
+ tempPlayer->setSprite(SPRITE_HAT, hat); // head option top
tempPlayer->setSprite(SPRITE_TOPCLOTHES, topClothes);
tempPlayer->setSprite(SPRITE_MISC2, misc2);
- character->slot = msg.readInt8(); // character slot
+ character->slot = msg.readInt8(); // character slot
- msg.readInt8(); // unknown
+ msg.readInt8(); // unknown
}
void CharServerHandler::chooseCharacter(Net::Character *const character)
@@ -273,7 +273,7 @@ void CharServerHandler::processCharLogin(Net::MessageIn &msg)
if (slots > 0 && slots < 30)
loginData.characterSlots = static_cast<short unsigned int>(slots);
- msg.skip(18); // 0 Unused
+ msg.skip(18); // 0 Unused
delete_all(mCharacters);
mCharacters.clear();
@@ -296,4 +296,4 @@ void CharServerHandler::processCharLogin(Net::MessageIn &msg)
Client::setState(STATE_CHAR_SELECT);
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index ae13a47b7..940227b3c 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -55,7 +55,7 @@ ChatHandler::ChatHandler() :
SMSG_WHISPER,
SMSG_WHISPER_RESPONSE,
SMSG_GM_CHAT,
- SMSG_MVP, // MVP
+ SMSG_MVP, // MVP
SMSG_IGNORE_ALL_RESPONSE,
0
};
@@ -261,4 +261,4 @@ void ChatHandler::unIgnoreAll() const
outMsg.writeInt8(1);
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp
index 00cfcc827..74f2a89ea 100644
--- a/src/net/eathena/gamehandler.cpp
+++ b/src/net/eathena/gamehandler.cpp
@@ -171,7 +171,7 @@ void GameHandler::disconnect2() const
void GameHandler::processMapCharId(Net::MessageIn &msg)
{
- msg.readInt32(); // char id
+ msg.readInt32(); // char id
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 637bd7369..b75044bb3 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -285,4 +285,4 @@ void GeneralHandler::gameEnded() const
Ea::partyTab = nullptr;
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/gui/guildtab.cpp b/src/net/eathena/gui/guildtab.cpp
index e3cf1b662..f946e1f8e 100644
--- a/src/net/eathena/gui/guildtab.cpp
+++ b/src/net/eathena/gui/guildtab.cpp
@@ -47,4 +47,4 @@ GuildTab::~GuildTab()
{
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/gui/partytab.cpp b/src/net/eathena/gui/partytab.cpp
index bf40c3e01..157869a96 100644
--- a/src/net/eathena/gui/partytab.cpp
+++ b/src/net/eathena/gui/partytab.cpp
@@ -50,4 +50,4 @@ PartyTab::~PartyTab()
{
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp
index 481a74236..e9d4109dc 100644
--- a/src/net/eathena/guildhandler.cpp
+++ b/src/net/eathena/guildhandler.cpp
@@ -194,7 +194,7 @@ void GuildHandler::handleMessage(Net::MessageIn &msg)
void GuildHandler::create(const std::string &name) const
{
MessageOut msg(CMSG_GUILD_CREATE);
- msg.writeInt32(0); // Unused
+ msg.writeInt32(0); // unused
msg.writeString(name, 24);
}
@@ -210,8 +210,8 @@ void GuildHandler::invite(const int guildId A_UNUSED,
{
MessageOut msg(CMSG_GUILD_INVITE);
msg.writeInt32(being->getId());
- msg.writeInt32(0); // Unused
- msg.writeInt32(0); // Unused
+ msg.writeInt32(0); // unused
+ msg.writeInt32(0); // unused
}
}
@@ -223,8 +223,8 @@ void GuildHandler::invite(const int guildId A_UNUSED,
MessageOut msg(CMSG_GUILD_INVITE);
msg.writeInt32(being->getId());
- msg.writeInt32(0); // Unused
- msg.writeInt32(0); // Unused
+ msg.writeInt32(0); // unused
+ msg.writeInt32(0); // unused
}
void GuildHandler::inviteResponse(const int guildId,
@@ -233,8 +233,8 @@ void GuildHandler::inviteResponse(const int guildId,
MessageOut msg(CMSG_GUILD_INVITE_REPLY);
msg.writeInt32(guildId);
msg.writeInt8(response);
- msg.writeInt8(0); // Unused
- msg.writeInt16(0); // Unused
+ msg.writeInt8(0); // unused
+ msg.writeInt16(0); // unused
}
void GuildHandler::leave(const int guildId) const
@@ -244,9 +244,9 @@ void GuildHandler::leave(const int guildId) const
MessageOut msg(CMSG_GUILD_LEAVE);
msg.writeInt32(guildId);
- msg.writeInt32(player_node->getId()); // Account ID
+ msg.writeInt32(player_node->getId()); // Account ID
msg.writeInt32(PlayerInfo::getCharId()); // Char ID
- msg.writeString("", 40); // Message
+ msg.writeString("", 40); // Message
}
void GuildHandler::kick(const GuildMember *const member,
@@ -257,9 +257,9 @@ void GuildHandler::kick(const GuildMember *const member,
MessageOut msg(CMSG_GUILD_EXPULSION);
msg.writeInt32(member->getGuild()->getId());
- msg.writeInt32(member->getID()); // Account ID
- msg.writeInt32(member->getCharId()); // Char ID
- msg.writeString(reason, 40); // Message
+ msg.writeInt32(member->getID()); // Account ID
+ msg.writeInt32(member->getCharId()); // Char ID
+ msg.writeString(reason, 40); // Message
}
void GuildHandler::chat(const int guildId A_UNUSED,
@@ -285,7 +285,7 @@ void GuildHandler::memberList(const int guildId A_UNUSED) const
// 4 = expulsion list
MessageOut msg(CMSG_GUILD_REQUEST_INFO);
- msg.writeInt32(1); // Request member list
+ msg.writeInt32(1); // Request member list
}
void GuildHandler::info(const int guildId A_UNUSED)
@@ -299,7 +299,7 @@ void GuildHandler::info(const int guildId A_UNUSED)
showBasicInfo = true;
MessageOut msg(CMSG_GUILD_REQUEST_INFO);
- msg.writeInt32(0); // Request basic info
+ msg.writeInt32(0); // Request basic info
}
void GuildHandler::changeMemberPostion(const GuildMember *const member,
@@ -309,10 +309,10 @@ void GuildHandler::changeMemberPostion(const GuildMember *const member,
return;
MessageOut msg(CMSG_GUILD_CHANGE_MEMBER_POS);
- msg.writeInt16(16); // size less then 16 <= 4 + 12
- msg.writeInt32(member->getID()); // Account ID
- msg.writeInt32(member->getCharId()); // Char ID
- msg.writeInt32(level); // pos
+ msg.writeInt16(16); // size less then 16 <= 4 + 12
+ msg.writeInt32(member->getID()); // Account ID
+ msg.writeInt32(member->getCharId()); // Char ID
+ msg.writeInt32(level); // pos
}
void GuildHandler::changeNotice(const int guildId, const std::string &msg1,
@@ -320,8 +320,8 @@ void GuildHandler::changeNotice(const int guildId, const std::string &msg1,
{
MessageOut msg(CMSG_GUILD_CHANGE_NOTICE);
msg.writeInt32(guildId);
- msg.writeString(msg1, 60); // msg1
- msg.writeString(msg2, 120); // msg2
+ msg.writeString(msg1, 60); // msg1
+ msg.writeString(msg2, 120); // msg2
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 79219cb42..b19419407 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -164,7 +164,7 @@ void InventoryHandler::useItem(const Item *const item) const
MessageOut outMsg(CMSG_PLAYER_INVENTORY_USE);
outMsg.writeInt16(static_cast<int16_t>(
item->getInvIndex() + INVENTORY_OFFSET));
- outMsg.writeInt32(item->getId()); // unused
+ outMsg.writeInt32(item->getId()); // unused
}
void InventoryHandler::dropItem(const Item *const item, const int amount) const
@@ -202,4 +202,4 @@ void InventoryHandler::moveItem2(const int source, const int slot,
}
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/itemhandler.cpp b/src/net/eathena/itemhandler.cpp
index 0e2a1e003..c1f157160 100644
--- a/src/net/eathena/itemhandler.cpp
+++ b/src/net/eathena/itemhandler.cpp
@@ -64,4 +64,4 @@ void ItemHandler::handleMessage(Net::MessageIn &msg)
}
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp
index cda6c0c1a..91900b623 100644
--- a/src/net/eathena/loginhandler.cpp
+++ b/src/net/eathena/loginhandler.cpp
@@ -133,7 +133,7 @@ void LoginHandler::sendLoginRegister(const std::string &username,
const std::string &email A_UNUSED) const
{
MessageOut outMsg(0x0064);
- outMsg.writeInt32(0); // client version
+ outMsg.writeInt32(0); // client version
outMsg.writeString(username, 24);
outMsg.writeStringNoLog(password, 24);
@@ -197,4 +197,4 @@ void LoginHandler::processUpdateHost2(Net::MessageIn &msg) const
Client::setState(STATE_LOGIN);
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/messagehandler.cpp b/src/net/eathena/messagehandler.cpp
index 1a031c4b2..791660283 100644
--- a/src/net/eathena/messagehandler.cpp
+++ b/src/net/eathena/messagehandler.cpp
@@ -48,4 +48,4 @@ void MessageHandler::setNetwork(Network *network)
mNetwork = network;
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/messagein.cpp b/src/net/eathena/messagein.cpp
index cb5f2ecfd..1acbd4665 100644
--- a/src/net/eathena/messagein.cpp
+++ b/src/net/eathena/messagein.cpp
@@ -33,7 +33,7 @@
#include "debug.h"
-namespace EAthena
+namespace EAthena
{
MessageIn::MessageIn(const char *const data, const unsigned int length) :
@@ -81,4 +81,4 @@ int32_t MessageIn::readInt32()
return value;
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/messageout.cpp b/src/net/eathena/messageout.cpp
index 734ce4057..210717503 100644
--- a/src/net/eathena/messageout.cpp
+++ b/src/net/eathena/messageout.cpp
@@ -143,4 +143,4 @@ void MessageOut::writeCoordinates(const unsigned short x,
PacketCounters::incOutBytes(3);
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp
index e03554ee2..42d16396d 100644
--- a/src/net/eathena/network.cpp
+++ b/src/net/eathena/network.cpp
@@ -241,4 +241,4 @@ Network *Network::instance()
return mInstance;
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp
index e2d5a003a..4730067fd 100644
--- a/src/net/eathena/npchandler.cpp
+++ b/src/net/eathena/npchandler.cpp
@@ -116,7 +116,7 @@ void NpcHandler::talk(const int npcId) const
{
MessageOut outMsg(CMSG_NPC_TALK);
outMsg.writeInt32(npcId);
- outMsg.writeInt8(0); // Unused
+ outMsg.writeInt8(0); // unused
}
void NpcHandler::nextDialog(const int npcId) const
@@ -162,21 +162,21 @@ void NpcHandler::stringInput(const int npcId, const std::string &value) const
outMsg.writeInt16(static_cast<int16_t>(value.length() + 9));
outMsg.writeInt32(npcId);
outMsg.writeString(value, static_cast<int>(value.length()));
- outMsg.writeInt8(0); // Prevent problems with string reading
+ outMsg.writeInt8(0); // Prevent problems with string reading
}
void NpcHandler::buy(const int beingId) const
{
MessageOut outMsg(CMSG_NPC_BUY_SELL_REQUEST);
outMsg.writeInt32(beingId);
- outMsg.writeInt8(0); // Buy
+ outMsg.writeInt8(0); // Buy
}
void NpcHandler::sell(const int beingId) const
{
MessageOut outMsg(CMSG_NPC_BUY_SELL_REQUEST);
outMsg.writeInt32(beingId);
- outMsg.writeInt8(1); // Sell
+ outMsg.writeInt8(1); // Sell
}
void NpcHandler::buyItem(const int beingId A_UNUSED, const int itemId,
@@ -184,7 +184,7 @@ void NpcHandler::buyItem(const int beingId A_UNUSED, const int itemId,
const int amount) const
{
MessageOut outMsg(CMSG_NPC_BUY_REQUEST);
- outMsg.writeInt16(8); // One item (length of packet)
+ outMsg.writeInt16(8); // One item (length of packet)
outMsg.writeInt16(static_cast<int16_t>(amount));
outMsg.writeInt16(static_cast<int16_t>(itemId));
}
@@ -193,7 +193,7 @@ void NpcHandler::sellItem(const int beingId A_UNUSED,
const int itemId, const int amount) const
{
MessageOut outMsg(CMSG_NPC_SELL_REQUEST);
- outMsg.writeInt16(8); // One item (length of packet)
+ outMsg.writeInt16(8); // One item (length of packet)
outMsg.writeInt16(static_cast<int16_t>(itemId + INVENTORY_OFFSET));
outMsg.writeInt16(static_cast<int16_t>(amount));
}
@@ -247,18 +247,18 @@ int NpcHandler::getNpc(Net::MessageIn &msg, const bool haveLength)
void NpcHandler::processNpcCutin(Net::MessageIn &msg A_UNUSED,
int npcId A_UNUSED) const
{
- msg.readString(64); // image name
- msg.readInt8(); // type
+ msg.readString(64); // image name
+ msg.readInt8(); // type
}
void NpcHandler::processNpcViewPoint(Net::MessageIn &msg A_UNUSED,
int npcId A_UNUSED) const
{
- msg.readInt32(); // type
- msg.readInt32(); // x
- msg.readInt32(); // y
- msg.readInt8(); // byte
- msg.readInt32(); // color
+ msg.readInt32(); // type
+ msg.readInt32(); // x
+ msg.readInt32(); // y
+ msg.readInt8(); // byte
+ msg.readInt32(); // color
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp
index b128d3879..26e5ed981 100644
--- a/src/net/eathena/partyhandler.cpp
+++ b/src/net/eathena/partyhandler.cpp
@@ -153,7 +153,7 @@ void PartyHandler::kick(Being *const being) const
{
MessageOut outMsg(CMSG_PARTY_KICK);
outMsg.writeInt32(being->getId());
- outMsg.writeString("", 24); //Unused
+ outMsg.writeString("", 24); // unused
}
}
@@ -171,7 +171,7 @@ void PartyHandler::kick(const std::string &name) const
MessageOut outMsg(CMSG_PARTY_KICK);
outMsg.writeInt32(m->getID());
- outMsg.writeString(name, 24); //Unused
+ outMsg.writeString(name, 24); // unused
}
void PartyHandler::chat(const std::string &text) const
@@ -201,4 +201,4 @@ void PartyHandler::setShareItems(const PartyShare share) const
outMsg.writeInt16(share);
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 3d80c2e1e..c5f3c3a0f 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -81,11 +81,11 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg)
processPlayerStatUpdate2(msg);
break;
- case SMSG_PLAYER_STAT_UPDATE_3: // Update a base attribute
+ case SMSG_PLAYER_STAT_UPDATE_3: // Update a base attribute
processPlayerStatUpdate3(msg);
break;
- case SMSG_PLAYER_STAT_UPDATE_4: // Attribute increase ack
+ case SMSG_PLAYER_STAT_UPDATE_4: // Attribute increase ack
processPlayerStatUpdate4(msg);
break;
@@ -230,15 +230,15 @@ void PlayerHandler::processPlayerShortcuts(Net::MessageIn &msg) const
{
for (int f = 0; f < 27; f ++)
{
- msg.readInt8(); // type 0: item, 1: skill
- msg.readInt32(); // item or skill id
- msg.readInt16(); // lvl
+ msg.readInt8(); // type 0: item, 1: skill
+ msg.readInt32(); // item or skill id
+ msg.readInt16(); // lvl
}
}
void PlayerHandler::processPlayerShowEquip(Net::MessageIn &msg) const
{
- msg.readInt8(); // show equip
+ msg.readInt8(); // show equip
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp
index 75aae7608..e14d89e4e 100644
--- a/src/net/eathena/skillhandler.cpp
+++ b/src/net/eathena/skillhandler.cpp
@@ -95,4 +95,4 @@ void SkillHandler::useMap(const int id, const std::string &map) const
outMsg.writeString(map, 16);
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp
index aa11b1233..df0364af5 100644
--- a/src/net/eathena/tradehandler.cpp
+++ b/src/net/eathena/tradehandler.cpp
@@ -144,4 +144,4 @@ void TradeHandler::cancel() const
MessageOut outMsg(CMSG_TRADE_CANCEL_REQUEST);
}
-} // namespace EAthena
+} // namespace EAthena