diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-01 17:00:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-01 19:28:09 +0300 |
commit | e6eef288f86dcc16aa2b5ba20c9079ead78f17e2 (patch) | |
tree | a878c5d7efab2c382bfa53860af305c8148b2c88 /src/being/playerinfo.cpp | |
parent | e6853de603d64bd6e194e308e5e532339545e892 (diff) | |
download | manaplus-e6eef288f86dcc16aa2b5ba20c9079ead78f17e2.tar.gz manaplus-e6eef288f86dcc16aa2b5ba20c9079ead78f17e2.tar.bz2 manaplus-e6eef288f86dcc16aa2b5ba20c9079ead78f17e2.tar.xz manaplus-e6eef288f86dcc16aa2b5ba20c9079ead78f17e2.zip |
Move ATK stat from net enum into attributes.
Diffstat (limited to 'src/being/playerinfo.cpp')
-rw-r--r-- | src/being/playerinfo.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp index 359069471..4f7b714cf 100644 --- a/src/being/playerinfo.cpp +++ b/src/being/playerinfo.cpp @@ -370,17 +370,13 @@ void setTrading(const bool trading) void updateAttrs() { - const Net::PlayerHandler *const handler = playerHandler; - if (!handler) - return; - const int attr = handler->getAttackLocation(); const int attackDelay = getStatBase(Attributes::ATTACK_DELAY); - if (attr != -1 && attackDelay) + if (attackDelay) { - setStatBase(Attributes::ATTACK_SPEED, getStatBase(attr) * 1000 - / attackDelay, false); - setStatMod(Attributes::ATTACK_SPEED, getStatMod(attr) * 1000 - / attackDelay, true); + setStatBase(Attributes::ATTACK_SPEED, + getStatBase(Attributes::ATK) * 1000 / attackDelay, false); + setStatMod(Attributes::ATTACK_SPEED, + getStatMod(Attributes::ATK) * 1000 / attackDelay, true); } else { |