summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-24 01:30:46 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-24 01:32:02 +0300
commit3da7fa61442364be6713359690a35f89aa8e613a (patch)
tree48a941dbbb0234b897478aa50518112407d08e5b /src/localplayer.cpp
parent470aaad15a0f9a08dd12ab34c8602cd93fc57b76 (diff)
downloadmanaplus-3da7fa61442364be6713359690a35f89aa8e613a.tar.gz
manaplus-3da7fa61442364be6713359690a35f89aa8e613a.tar.bz2
manaplus-3da7fa61442364be6713359690a35f89aa8e613a.tar.xz
manaplus-3da7fa61442364be6713359690a35f89aa8e613a.zip
Add support for show quest variables in skills window (evol only)
This allow use pseudo skills controlled by quest variables.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index b4c31b33a..f7a95625f 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -1697,8 +1697,8 @@ void LocalPlayer::processEvent(Channels channel,
const int id = event.getInt("id");
if (id == Net::getPlayerHandler()->getJobLocation())
{
- const std::pair<int, int> exp = PlayerInfo::getStatExperience(
- static_cast<PlayerInfo::Attribute>(id));
+ const std::pair<int, int> exp
+ = PlayerInfo::getStatExperience(id);
if (event.getInt("oldValue1") > exp.first
|| !event.getInt("oldValue2"))
{
@@ -3272,10 +3272,8 @@ void LocalPlayer::tryMagic(const std::string &spell, const int baseMagic,
if (!chatWindow)
return;
- if (PlayerInfo::getStatEffective(static_cast<PlayerInfo::Attribute>(
- 340)) >= baseMagic
- && PlayerInfo::getStatEffective(static_cast<PlayerInfo::Attribute>(
- 342)) >= schoolMagic)
+ if (PlayerInfo::getStatEffective(340) >= baseMagic
+ && PlayerInfo::getStatEffective(342) >= schoolMagic)
{
if (PlayerInfo::getAttribute(PlayerInfo::MP) >= mana)
{