summaryrefslogtreecommitdiff
path: root/src/being/localplayer.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/localplayer.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/localplayer.cpp')
-rw-r--r--src/being/localplayer.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 7efaaa907..ca6514ace 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -35,6 +35,7 @@
#include "statuseffect.h"
#include "resources/map/walklayer.h"
+#include "being/attributes.h"
#include "being/playerinfo.h"
#include "being/playerrelations.h"
@@ -191,9 +192,9 @@ LocalPlayer::LocalPlayer(const int id, const int subtype) :
else
mNameColor = nullptr;
- PlayerInfo::setStatBase(PlayerInfo::WALK_SPEED,
+ PlayerInfo::setStatBase(Attributes::WALK_SPEED,
static_cast<int>(getWalkSpeed().x));
- PlayerInfo::setStatMod(PlayerInfo::WALK_SPEED, 0);
+ PlayerInfo::setStatMod(Attributes::WALK_SPEED, 0);
loadHomes();
@@ -1075,7 +1076,7 @@ void LocalPlayer::attributeChanged(const int id,
{
switch (id)
{
- case PlayerInfo::EXP:
+ case Attributes::EXP:
{
if (oldVal > newVal)
break;
@@ -1088,7 +1089,7 @@ void LocalPlayer::attributeChanged(const int id,
}
break;
}
- case PlayerInfo::LEVEL:
+ case Attributes::LEVEL:
mLevel = newVal;
break;
default:
@@ -2693,7 +2694,7 @@ void LocalPlayer::tryMagic(const std::string &spell, const int baseMagic,
if (PlayerInfo::getSkillLevel(340) >= baseMagic
&& PlayerInfo::getSkillLevel(342) >= schoolMagic)
{
- if (PlayerInfo::getAttribute(PlayerInfo::MP) >= mana)
+ if (PlayerInfo::getAttribute(Attributes::MP) >= mana)
{
if (!client->limitPackets(PACKET_CHAT))
return;
@@ -3594,7 +3595,7 @@ void LocalPlayer::respawn()
int LocalPlayer::getLevel() const
{
- return PlayerInfo::getAttribute(PlayerInfo::LEVEL);
+ return PlayerInfo::getAttribute(Attributes::LEVEL);
}
void LocalPlayer::updateNavigateList()