summaryrefslogtreecommitdiff
path: root/src/being/playerinfo.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-11 19:28:57 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-11 19:28:57 +0300
commit87c59212f8590a8dd72fac3e320fcb2ada781355 (patch)
tree198d627c44f1164140659827a5c782d30bec375b /src/being/playerinfo.cpp
parent02e91411eb9961e95f856bd717d6ca0d8ec0e435 (diff)
downloadManaVerse-87c59212f8590a8dd72fac3e320fcb2ada781355.tar.gz
ManaVerse-87c59212f8590a8dd72fac3e320fcb2ada781355.tar.bz2
ManaVerse-87c59212f8590a8dd72fac3e320fcb2ada781355.tar.xz
ManaVerse-87c59212f8590a8dd72fac3e320fcb2ada781355.zip
Move player attributes into separate file.
Diffstat (limited to 'src/being/playerinfo.cpp')
-rw-r--r--src/being/playerinfo.cpp13
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);
}
}