summaryrefslogtreecommitdiff
path: root/src/net/eathena/playerrecv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/playerrecv.cpp')
-rw-r--r--src/net/eathena/playerrecv.cpp60
1 files changed, 31 insertions, 29 deletions
diff --git a/src/net/eathena/playerrecv.cpp b/src/net/eathena/playerrecv.cpp
index 6f9f5a43c..3c32be745 100644
--- a/src/net/eathena/playerrecv.cpp
+++ b/src/net/eathena/playerrecv.cpp
@@ -74,14 +74,14 @@ void PlayerRecv::processPlayerShowEquip(Net::MessageIn &msg)
void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
{
BLOCK_START("PlayerRecv::processPlayerStatUpdate5")
- PlayerInfo::setAttribute(Attributes::CHAR_POINTS,
+ PlayerInfo::setAttribute(Attributes::PLAYER_CHAR_POINTS,
msg.readInt16("char points"));
unsigned int val = msg.readUInt8("str");
- PlayerInfo::setStatBase(Attributes::STR, val);
+ PlayerInfo::setStatBase(Attributes::PLAYER_STR, val);
if (statusWindow)
{
- statusWindow->setPointsNeeded(Attributes::STR,
+ statusWindow->setPointsNeeded(Attributes::PLAYER_STR,
msg.readUInt8("str cost"));
}
else
@@ -90,10 +90,10 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
}
val = msg.readUInt8("agi");
- PlayerInfo::setStatBase(Attributes::AGI, val);
+ PlayerInfo::setStatBase(Attributes::PLAYER_AGI, val);
if (statusWindow)
{
- statusWindow->setPointsNeeded(Attributes::AGI,
+ statusWindow->setPointsNeeded(Attributes::PLAYER_AGI,
msg.readUInt8("agi cost"));
}
else
@@ -102,10 +102,10 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
}
val = msg.readUInt8("vit");
- PlayerInfo::setStatBase(Attributes::VIT, val);
+ PlayerInfo::setStatBase(Attributes::PLAYER_VIT, val);
if (statusWindow)
{
- statusWindow->setPointsNeeded(Attributes::VIT,
+ statusWindow->setPointsNeeded(Attributes::PLAYER_VIT,
msg.readUInt8("vit cost"));
}
else
@@ -114,10 +114,10 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
}
val = msg.readUInt8("int");
- PlayerInfo::setStatBase(Attributes::INT, val);
+ PlayerInfo::setStatBase(Attributes::PLAYER_INT, val);
if (statusWindow)
{
- statusWindow->setPointsNeeded(Attributes::INT,
+ statusWindow->setPointsNeeded(Attributes::PLAYER_INT,
msg.readUInt8("int cost"));
}
else
@@ -126,10 +126,10 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
}
val = msg.readUInt8("dex");
- PlayerInfo::setStatBase(Attributes::DEX, val);
+ PlayerInfo::setStatBase(Attributes::PLAYER_DEX, val);
if (statusWindow)
{
- statusWindow->setPointsNeeded(Attributes::DEX,
+ statusWindow->setPointsNeeded(Attributes::PLAYER_DEX,
msg.readUInt8("dex cost"));
}
else
@@ -138,10 +138,10 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
}
val = msg.readUInt8("luk");
- PlayerInfo::setStatBase(Attributes::LUK, val);
+ PlayerInfo::setStatBase(Attributes::PLAYER_LUK, val);
if (statusWindow)
{
- statusWindow->setPointsNeeded(Attributes::LUK,
+ statusWindow->setPointsNeeded(Attributes::PLAYER_LUK,
msg.readUInt8("luk cost"));
}
else
@@ -149,34 +149,34 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
msg.readUInt8("luk cost");
}
- PlayerInfo::setStatBase(Attributes::ATK,
+ PlayerInfo::setStatBase(Attributes::PLAYER_ATK,
msg.readInt16("left atk"), Notify_false);
- PlayerInfo::setStatMod(Attributes::ATK, msg.readInt16("right atk"));
+ PlayerInfo::setStatMod(Attributes::PLAYER_ATK, msg.readInt16("right atk"));
PlayerInfo::updateAttrs();
val = msg.readInt16("right matk");
- PlayerInfo::setStatBase(Attributes::MATK, val, Notify_false);
+ PlayerInfo::setStatBase(Attributes::PLAYER_MATK, val, Notify_false);
val = msg.readInt16("left matk");
- PlayerInfo::setStatMod(Attributes::MATK, val);
+ PlayerInfo::setStatMod(Attributes::PLAYER_MATK, val);
- PlayerInfo::setStatBase(Attributes::DEF,
+ PlayerInfo::setStatBase(Attributes::PLAYER_DEF,
msg.readInt16("left def"), Notify_false);
- PlayerInfo::setStatMod(Attributes::DEF, msg.readInt16("right def"));
+ PlayerInfo::setStatMod(Attributes::PLAYER_DEF, msg.readInt16("right def"));
- PlayerInfo::setStatBase(Attributes::MDEF,
+ PlayerInfo::setStatBase(Attributes::PLAYER_MDEF,
msg.readInt16("left mdef"), Notify_false);
- PlayerInfo::setStatMod(Attributes::MDEF, msg.readInt16("right mdef"));
+ PlayerInfo::setStatMod(Attributes::PLAYER_MDEF, msg.readInt16("right mdef"));
- PlayerInfo::setStatBase(Attributes::HIT, msg.readInt16("hit"));
+ PlayerInfo::setStatBase(Attributes::PLAYER_HIT, msg.readInt16("hit"));
- PlayerInfo::setStatBase(Attributes::FLEE,
+ PlayerInfo::setStatBase(Attributes::PLAYER_FLEE,
msg.readInt16("flee"), Notify_false);
- PlayerInfo::setStatMod(Attributes::FLEE, msg.readInt16("flee2/10"));
+ PlayerInfo::setStatMod(Attributes::PLAYER_FLEE, msg.readInt16("flee2/10"));
- PlayerInfo::setStatBase(Attributes::CRIT, msg.readInt16("crit/10"));
+ PlayerInfo::setStatBase(Attributes::PLAYER_CRIT, msg.readInt16("crit/10"));
- PlayerInfo::setAttribute(Attributes::ATTACK_DELAY,
+ PlayerInfo::setAttribute(Attributes::PLAYER_ATTACK_DELAY,
msg.readInt16("attack speed"));
msg.readInt16("plus speed = 0");
@@ -248,8 +248,9 @@ void PlayerRecv::processPlayerHeal(Net::MessageIn &msg)
const int amount = msg.readInt16("value");
if (type == Sp::HP)
{
- const int base = PlayerInfo::getAttribute(Attributes::HP) + amount;
- PlayerInfo::setAttribute(Attributes::HP, base);
+ const int base = PlayerInfo::getAttribute(Attributes::PLAYER_HP) +
+ amount;
+ PlayerInfo::setAttribute(Attributes::PLAYER_HP, base);
if (localPlayer->isInParty() && Party::getParty(1))
{
PartyMember *const m = Party::getParty(1)
@@ -257,7 +258,8 @@ void PlayerRecv::processPlayerHeal(Net::MessageIn &msg)
if (m)
{
m->setHp(base);
- m->setMaxHp(PlayerInfo::getAttribute(Attributes::MAX_HP));
+ m->setMaxHp(PlayerInfo::getAttribute(
+ Attributes::PLAYER_MAX_HP));
}
}
localPlayer->addHpMessage(amount);