diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-11 19:28:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-11 19:28:57 +0300 |
commit | 87c59212f8590a8dd72fac3e320fcb2ada781355 (patch) | |
tree | 198d627c44f1164140659827a5c782d30bec375b /src/being/playerinfo.cpp | |
parent | 02e91411eb9961e95f856bd717d6ca0d8ec0e435 (diff) | |
download | plus-87c59212f8590a8dd72fac3e320fcb2ada781355.tar.gz plus-87c59212f8590a8dd72fac3e320fcb2ada781355.tar.bz2 plus-87c59212f8590a8dd72fac3e320fcb2ada781355.tar.xz plus-87c59212f8590a8dd72fac3e320fcb2ada781355.zip |
Move player attributes into separate file.
Diffstat (limited to 'src/being/playerinfo.cpp')
-rw-r--r-- | src/being/playerinfo.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp index fdbad89a5..b4824599b 100644 --- a/src/being/playerinfo.cpp +++ b/src/being/playerinfo.cpp @@ -24,6 +24,9 @@ #include "client.h" #include "configuration.h" #include "inventory.h" + +#include "being/attributes.h" + #include "itemsoundmanager.h" #include "gui/windows/inventorywindow.h" @@ -363,18 +366,18 @@ void updateAttrs() if (!handler) return; const int attr = handler->getAttackLocation(); - const int attackDelay = getStatBase(ATTACK_DELAY); + const int attackDelay = getStatBase(Attributes::ATTACK_DELAY); if (attr != -1 && attackDelay) { - setStatBase(ATTACK_SPEED, getStatBase(attr) * 1000 + setStatBase(Attributes::ATTACK_SPEED, getStatBase(attr) * 1000 / attackDelay, false); - setStatMod(ATTACK_SPEED, getStatMod(attr) * 1000 + setStatMod(Attributes::ATTACK_SPEED, getStatMod(attr) * 1000 / attackDelay, true); } else { - setStatBase(ATTACK_SPEED, 0, false); - setStatMod(ATTACK_SPEED, 0, true); + setStatBase(Attributes::ATTACK_SPEED, 0, false); + setStatMod(Attributes::ATTACK_SPEED, 0, true); } } |