summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-18 12:18:44 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-18 14:52:11 +0300
commitbb9ed14fc1bf7dc20f1e951e67bb359c273033a3 (patch)
treec46e7e5708d3a2058233a41a08995e6c861703ea /src/net
parent10273bc94e90fefcfe3fc215aaaaafe7e0e96bd4 (diff)
downloadplus-bb9ed14fc1bf7dc20f1e951e67bb359c273033a3.tar.gz
plus-bb9ed14fc1bf7dc20f1e951e67bb359c273033a3.tar.bz2
plus-bb9ed14fc1bf7dc20f1e951e67bb359c273033a3.tar.xz
plus-bb9ed14fc1bf7dc20f1e951e67bb359c273033a3.zip
fix code style.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/beinghandler.cpp8
-rw-r--r--src/net/ea/chathandler.cpp10
-rw-r--r--src/net/ea/loginhandler.cpp8
-rw-r--r--src/net/ea/token.h4
-rw-r--r--src/net/eathena/beinghandler.cpp8
-rw-r--r--src/net/logindata.h6
-rw-r--r--src/net/tmwa/playerhandler.cpp8
7 files changed, 27 insertions, 25 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index c983cfd9d..8366d1dc4 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -280,16 +280,16 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
switch (gender)
{
case 2:
- dstBeing->setGender(GENDER_FEMALE);
+ dstBeing->setGender(Gender::FEMALE);
break;
case 3:
- dstBeing->setGender(GENDER_MALE);
+ dstBeing->setGender(Gender::MALE);
break;
case 4:
- dstBeing->setGender(GENDER_OTHER);
+ dstBeing->setGender(Gender::OTHER);
break;
default:
- dstBeing->setGender(GENDER_UNSPECIFIED);
+ dstBeing->setGender(Gender::UNSPECIFIED);
break;
}
}
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index c880de0f6..40dc15a15 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -106,8 +106,9 @@ void ChatHandler::processWhisperResponse(Net::MessageIn &msg)
{
chatWindow->addWhisper(nick,
// TRANSLATORS: chat message
- strprintf(_("Whisper could not be "
- "sent, %s is offline."), nick.c_str()), ChatMsgType::BY_SERVER);
+ strprintf(_("Whisper could not be sent, %s is offline."),
+ nick.c_str()),
+ ChatMsgType::BY_SERVER);
}
break;
case 0x02:
@@ -328,8 +329,9 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg,
if (player_relations.checkPermissionSilently(sender_name,
PlayerRelation::SPEECH_LOG) && chatWindow)
{
- allow = chatWindow->resortChatLog(removeColors(sender_name)
- .append(" : ").append(chatMsg), ChatMsgType::BY_OTHER, channel, false, true);
+ allow = chatWindow->resortChatLog(
+ removeColors(sender_name).append(" : ").append(chatMsg),
+ ChatMsgType::BY_OTHER, channel, false, true);
}
if (allow && player_relations.hasPermission(sender_name,
diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp
index 25ad6d916..c53cdb773 100644
--- a/src/net/ea/loginhandler.cpp
+++ b/src/net/ea/loginhandler.cpp
@@ -102,16 +102,16 @@ void LoginHandler::registerAccount(const LoginData *const loginData1) const
std::string username = loginData1->username;
switch (loginData1->gender)
{
- case GENDER_FEMALE:
+ case Gender::FEMALE:
username.append("_F");
break;
- case GENDER_MALE:
+ case Gender::MALE:
username.append("_M");
break;
- case GENDER_OTHER:
+ case Gender::OTHER:
username.append("_O");
break;
- case GENDER_UNSPECIFIED:
+ case Gender::UNSPECIFIED:
default:
break;
}
diff --git a/src/net/ea/token.h b/src/net/ea/token.h
index dadc341c7..35aadd02c 100644
--- a/src/net/ea/token.h
+++ b/src/net/ea/token.h
@@ -30,14 +30,14 @@ struct Token
int account_ID;
int session_ID1;
int session_ID2;
- Gender sex;
+ Gender::Type sex;
void clear()
{
account_ID = 0;
session_ID1 = 0;
session_ID2 = 0;
- sex = GENDER_UNSPECIFIED;
+ sex = Gender::UNSPECIFIED;
}
};
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index e07062585..136f19b03 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -758,16 +758,16 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
switch (gender)
{
case 2:
- dstBeing->setGender(GENDER_FEMALE);
+ dstBeing->setGender(Gender::FEMALE);
break;
case 3:
- dstBeing->setGender(GENDER_MALE);
+ dstBeing->setGender(Gender::MALE);
break;
case 4:
- dstBeing->setGender(GENDER_OTHER);
+ dstBeing->setGender(Gender::OTHER);
break;
default:
- dstBeing->setGender(GENDER_UNSPECIFIED);
+ dstBeing->setGender(Gender::UNSPECIFIED);
break;
}
}
diff --git a/src/net/logindata.h b/src/net/logindata.h
index a2179a0b9..69dbfbb66 100644
--- a/src/net/logindata.h
+++ b/src/net/logindata.h
@@ -45,7 +45,7 @@ class LoginData final
email(),
captchaResponse(),
registerUrl(),
- gender(GENDER_UNSPECIFIED),
+ gender(Gender::UNSPECIFIED),
remember(false),
registerLogin(false),
characterSlots(9)
@@ -74,7 +74,7 @@ class LoginData final
std::string captchaResponse;
std::string registerUrl;
- Gender gender;
+ Gender::Type gender;
bool remember; // Whether to store the username.
bool registerLogin; // Whether an account is being registered.
@@ -92,7 +92,7 @@ class LoginData final
email.clear();
captchaResponse.clear();
registerUrl.clear();
- gender = GENDER_UNSPECIFIED;
+ gender = Gender::UNSPECIFIED;
lastLogin.clear();
resetCharacterSlots();
}
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index c8cee7979..a0246dbd4 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -285,17 +285,17 @@ void PlayerHandler::processOnlineList(Net::MessageIn &msg)
}
buf ++;
- int gender = GENDER_UNSPECIFIED;
+ int gender = Gender::UNSPECIFIED;
if (serverVersion >= 4)
{
if (config.getBoolValue("showgender"))
{
if (status & BeingFlag::GENDER_MALE)
- gender = GENDER_MALE;
+ gender = Gender::MALE;
else if (status & BeingFlag::GENDER_OTHER)
- gender = GENDER_OTHER;
+ gender = Gender::OTHER;
else
- gender = GENDER_FEMALE;
+ gender = Gender::FEMALE;
}
}
arr.push_back(new OnlinePlayer(static_cast<const char*>(buf),