summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-30 23:40:58 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-30 23:40:58 +0300
commit24c274b63f95636619b985db99311f6807e12170 (patch)
tree237731512e20f05cfa691b9879ab23e85d7feea9 /src
parentfc2702efdf477a96761a6405e5d764c478b2905f (diff)
downloadmanaplus-24c274b63f95636619b985db99311f6807e12170.tar.gz
manaplus-24c274b63f95636619b985db99311f6807e12170.tar.bz2
manaplus-24c274b63f95636619b985db99311f6807e12170.tar.xz
manaplus-24c274b63f95636619b985db99311f6807e12170.zip
Add manner stat to player.
Diffstat (limited to 'src')
-rw-r--r--src/being/attributes.h3
-rw-r--r--src/net/ea/playerhandler.cpp4
-rw-r--r--src/net/eathena/generalhandler.cpp1
-rw-r--r--src/net/tmwa/playerhandler.cpp2
4 files changed, 7 insertions, 3 deletions
diff --git a/src/being/attributes.h b/src/being/attributes.h
index 8b2754f1d..42a061b7d 100644
--- a/src/being/attributes.h
+++ b/src/being/attributes.h
@@ -46,7 +46,8 @@ namespace Attributes
ATTACK_RANGE = 101,
WALK_SPEED = 102,
ATTACK_SPEED = 103,
- KARMA
+ KARMA,
+ MANNER
};
} // namespace Attributes
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 941f96499..01b83e143 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -197,7 +197,9 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg)
PlayerInfo::setStatMod(Attributes::KARMA, 0);
break;
case 0x0004:
- break; // manner
+ PlayerInfo::setStatBase(Attributes::MANNER, value);
+ PlayerInfo::setStatMod(Attributes::MANNER, 0);
+ break;
case 0x0005:
PlayerInfo::setAttribute(Attributes::HP, value);
if (localPlayer->isInParty() && Party::getParty(1))
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index d1056bb71..63fbb707e 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -368,6 +368,7 @@ void GeneralHandler::gameStarted() const
statusWindow->addAttribute(Attributes::ATTACK_RANGE, _("Attack Range"));
statusWindow->addAttribute(Attributes::ATTACK_SPEED, _("Damage per sec."));
statusWindow->addAttribute(Attributes::KARMA, _("Karma"));
+ statusWindow->addAttribute(Attributes::MANNER, _("Manner"));
}
void GeneralHandler::gameEnded() const
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 3c3173d47..9ad631d71 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -421,7 +421,7 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg)
PlayerInfo::setStatBase(CRIT, msg.readInt16("crit"));
- msg.readInt16("manner");
+ PlayerInfo::setStatBase(Attributes::MANNER, msg.readInt16("manner"));
msg.readInt16("unused?");
BLOCK_END("PlayerHandler::processPlayerStatUpdate5")
}