summaryrefslogtreecommitdiff
path: root/src/being/playerinfo.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-25 02:30:47 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-25 02:30:47 +0300
commitc9795055ee1b6079ef9b0c0e3faf4bb79704bd98 (patch)
tree147357b76a80705cf0af7bc1ec69cf417ef94812 /src/being/playerinfo.cpp
parent1e5a50f6c67cd20967e139320a6c00f54e15dfe2 (diff)
downloadmv-c9795055ee1b6079ef9b0c0e3faf4bb79704bd98.tar.gz
mv-c9795055ee1b6079ef9b0c0e3faf4bb79704bd98.tar.bz2
mv-c9795055ee1b6079ef9b0c0e3faf4bb79704bd98.tar.xz
mv-c9795055ee1b6079ef9b0c0e3faf4bb79704bd98.zip
Add into player attributes prefix PLAYER_.
Diffstat (limited to 'src/being/playerinfo.cpp')
-rw-r--r--src/being/playerinfo.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp
index 68b3ee8e1..6ed4fceba 100644
--- a/src/being/playerinfo.cpp
+++ b/src/being/playerinfo.cpp
@@ -398,18 +398,22 @@ void setTrading(const Trading trading)
void updateAttrs()
{
- const int attackDelay = getStatBase(Attributes::ATTACK_DELAY);
+ const int attackDelay = getStatBase(Attributes::PLAYER_ATTACK_DELAY);
if (attackDelay)
{
- setStatBase(Attributes::ATTACK_SPEED,
- getStatBase(Attributes::ATK) * 1000 / attackDelay, Notify_false);
- setStatMod(Attributes::ATTACK_SPEED,
- getStatMod(Attributes::ATK) * 1000 / attackDelay, Notify_true);
+ setStatBase(Attributes::PLAYER_ATTACK_SPEED,
+ getStatBase(Attributes::PLAYER_ATK) * 1000 / attackDelay,
+ Notify_false);
+ setStatMod(Attributes::PLAYER_ATTACK_SPEED,
+ getStatMod(Attributes::PLAYER_ATK) * 1000 / attackDelay,
+ Notify_true);
}
else
{
- setStatBase(Attributes::ATTACK_SPEED, 0, Notify_false);
- setStatMod(Attributes::ATTACK_SPEED, 0, Notify_true);
+ setStatBase(Attributes::PLAYER_ATTACK_SPEED, 0,
+ Notify_false);
+ setStatMod(Attributes::PLAYER_ATTACK_SPEED, 0,
+ Notify_true);
}
}