diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-30 22:55:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-30 22:55:31 +0300 |
commit | f493b31b59c79f8923d23634b7e2450c4df7019b (patch) | |
tree | b4576e3710d5280fcb87d9d0b4df0584e4436fd4 /src | |
parent | b1fa35079365cd92d6a719f5d95e17285bd17659 (diff) | |
download | manaplus-f493b31b59c79f8923d23634b7e2450c4df7019b.tar.gz manaplus-f493b31b59c79f8923d23634b7e2450c4df7019b.tar.bz2 manaplus-f493b31b59c79f8923d23634b7e2450c4df7019b.tar.xz manaplus-f493b31b59c79f8923d23634b7e2450c4df7019b.zip |
eathena: add karma stat to player.
Diffstat (limited to 'src')
-rw-r--r-- | src/being/attributes.h | 3 | ||||
-rw-r--r-- | src/net/ea/playerhandler.cpp | 6 | ||||
-rw-r--r-- | src/net/eathena/generalhandler.cpp | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/being/attributes.h b/src/being/attributes.h index 612ef886c..8b2754f1d 100644 --- a/src/being/attributes.h +++ b/src/being/attributes.h @@ -45,7 +45,8 @@ namespace Attributes ATTACK_DELAY = 100, ATTACK_RANGE = 101, WALK_SPEED = 102, - ATTACK_SPEED = 103 + ATTACK_SPEED = 103, + KARMA }; } // namespace Attributes diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index e365ccdfe..941f96499 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -191,7 +191,11 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg) value), static_cast<float>(value), 0)); PlayerInfo::setStatBase(Attributes::WALK_SPEED, value); PlayerInfo::setStatMod(Attributes::WALK_SPEED, 0); - break; + break; + case 0x0003: + PlayerInfo::setStatBase(Attributes::KARMA, value); + PlayerInfo::setStatMod(Attributes::KARMA, 0); + break; case 0x0004: break; // manner case 0x0005: diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp index 0d7a551ea..d1056bb71 100644 --- a/src/net/eathena/generalhandler.cpp +++ b/src/net/eathena/generalhandler.cpp @@ -367,6 +367,7 @@ void GeneralHandler::gameStarted() const statusWindow->addAttribute(Attributes::WALK_SPEED, _("Walk Delay")); statusWindow->addAttribute(Attributes::ATTACK_RANGE, _("Attack Range")); statusWindow->addAttribute(Attributes::ATTACK_SPEED, _("Damage per sec.")); + statusWindow->addAttribute(Attributes::KARMA, _("Karma")); } void GeneralHandler::gameEnded() const |