diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-07-15 18:37:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-07-15 18:37:00 +0300 |
commit | 65f11a2d85f26932b0e2f0679ddbfc6b6fc4b635 (patch) | |
tree | 493d6441dd152419908d28178c26112a4639e89f /src/net/tmwa | |
parent | e1e411459e9c9aae819eee474d48d0cc20f6ca07 (diff) | |
download | manaverse-65f11a2d85f26932b0e2f0679ddbfc6b6fc4b635.tar.gz manaverse-65f11a2d85f26932b0e2f0679ddbfc6b6fc4b635.tar.bz2 manaverse-65f11a2d85f26932b0e2f0679ddbfc6b6fc4b635.tar.xz manaverse-65f11a2d85f26932b0e2f0679ddbfc6b6fc4b635.zip |
Fix code style.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/buysellhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 14 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.cpp | 16 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.cpp | 2 |
4 files changed, 17 insertions, 17 deletions
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp index 664953e4e..aa0a07d9d 100644 --- a/src/net/tmwa/buysellhandler.cpp +++ b/src/net/tmwa/buysellhandler.cpp @@ -110,7 +110,7 @@ void BuySellHandler::processNpcBuy(Net::MessageIn &msg) sz += 1; int n_items = (msg.getLength() - 4) / sz; mBuyDialog = new BuyDialog(mNpcId); - mBuyDialog->setMoney(PlayerInfo::getAttribute(MONEY)); + mBuyDialog->setMoney(PlayerInfo::getAttribute(PlayerInfo::MONEY)); for (int k = 0; k < n_items; k++) { diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 85ee3ce44..b851a5093 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -177,8 +177,8 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, tempPlayer->setGender(token.sex); PlayerInfoBackend &data = character->data; - data.mAttributes[EXP] = msg.readInt32(); - data.mAttributes[MONEY] = msg.readInt32(); + data.mAttributes[PlayerInfo::EXP] = msg.readInt32(); + data.mAttributes[PlayerInfo::MONEY] = msg.readInt32(); data.mStats[JOB].exp = msg.readInt32(); int temp = msg.readInt32(); @@ -195,10 +195,10 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, msg.readInt32(); // manner msg.readInt16(); // character points left - data.mAttributes[HP] = msg.readInt16(); - data.mAttributes[MAX_HP] = msg.readInt16(); - data.mAttributes[MP] = msg.readInt16(); - data.mAttributes[MAX_MP] = msg.readInt16(); + data.mAttributes[PlayerInfo::HP] = msg.readInt16(); + data.mAttributes[PlayerInfo::MAX_HP] = msg.readInt16(); + data.mAttributes[PlayerInfo::MP] = msg.readInt16(); + data.mAttributes[PlayerInfo::MAX_MP] = msg.readInt16(); msg.readInt16(); // speed tempPlayer->setSubtype(msg.readInt16()); // class (used for race) @@ -206,7 +206,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, uint16_t weapon = msg.readInt16(); // server not used it. may be need use? tempPlayer->setSprite(SPRITE_WEAPON, weapon, "", 1, true); - data.mAttributes[LEVEL] = msg.readInt16(); + data.mAttributes[PlayerInfo::LEVEL] = msg.readInt16(); msg.readInt16(); // skill point int bottomClothes = msg.readInt16(); diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index 9839dfe10..0006d724d 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -278,14 +278,14 @@ void GeneralHandler::processEvent(Channels channel, statusWindow->addAttribute(FLEE, _("% Evade"), false, ""); // xgettext:no-c-format statusWindow->addAttribute(CRIT, _("% Critical"), false, ""); - statusWindow->addAttribute(ATTACK_DELAY, _("Attack Delay"), - false, ""); - statusWindow->addAttribute(WALK_SPEED, _("Walk Delay"), - false, ""); - statusWindow->addAttribute(ATTACK_RANGE, _("Attack Range"), - false, ""); - statusWindow->addAttribute(ATTACK_SPEED, _("Damage per sec."), - false, ""); + statusWindow->addAttribute(PlayerInfo::ATTACK_DELAY, + _("Attack Delay"), false, ""); + statusWindow->addAttribute(PlayerInfo::WALK_SPEED, + _("Walk Delay"), false, ""); + statusWindow->addAttribute(PlayerInfo::ATTACK_RANGE, + _("Attack Range"), false, ""); + statusWindow->addAttribute(PlayerInfo::ATTACK_SPEED, + _("Damage per sec."), false, ""); } else if (event.getName() == EVENT_GUIWINDOWSUNLOADING) { diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index 5c0b8d950..92bfaef74 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -143,7 +143,7 @@ void PlayerHandler::increaseAttribute(int attr) void PlayerHandler::increaseSkill(unsigned short skillId) { - if (PlayerInfo::getAttribute(SKILL_POINTS) <= 0) + if (PlayerInfo::getAttribute(PlayerInfo::SKILL_POINTS) <= 0) return; MessageOut outMsg(CMSG_SKILL_LEVELUP_REQUEST); |