summaryrefslogtreecommitdiff
path: root/src/net/eathena/playerhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-08 23:04:20 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-08 23:04:20 +0300
commitd9ffcee4837b22bd404589079373c9157ef448bb (patch)
tree39ee424bbf80594648979190208d473a989971a3 /src/net/eathena/playerhandler.cpp
parentb43a9478fb7af4a2352f55395bdeda5067b5f721 (diff)
downloadmanaplus-d9ffcee4837b22bd404589079373c9157ef448bb.tar.gz
manaplus-d9ffcee4837b22bd404589079373c9157ef448bb.tar.bz2
manaplus-d9ffcee4837b22bd404589079373c9157ef448bb.tar.xz
manaplus-d9ffcee4837b22bd404589079373c9157ef448bb.zip
Rename Sp attributes to server values. Also add missing values for hercules.
Diffstat (limited to 'src/net/eathena/playerhandler.cpp')
-rw-r--r--src/net/eathena/playerhandler.cpp67
1 files changed, 34 insertions, 33 deletions
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 97d914b21..8a6a7e878 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -251,15 +251,15 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
{
switch (type)
{
- case Sp::WALK_SPEED:
+ case Sp::SPEED:
localPlayer->setWalkSpeed(base);
PlayerInfo::setStatBase(Attributes::WALK_SPEED, base);
PlayerInfo::setStatMod(Attributes::WALK_SPEED, 0);
break;
- case Sp::EXP:
+ case Sp::BASEEXP:
PlayerInfo::setAttribute(Attributes::EXP, base);
break;
- case Sp::JOB_EXP:
+ case Sp::JOBEXP:
PlayerInfo::setStatExperience(Attributes::JOB, base,
PlayerInfo::getStatExperience(Attributes::JOB).second);
break;
@@ -284,7 +284,7 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
}
}
break;
- case Sp::MAX_HP:
+ case Sp::MAXHP:
PlayerInfo::setAttribute(Attributes::MAX_HP, base);
if (localPlayer->isInParty() && Party::getParty(1))
@@ -298,16 +298,16 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
}
}
break;
- case Sp::MP:
+ case Sp::SP:
PlayerInfo::setAttribute(Attributes::MP, base);
break;
- case Sp::MAX_MP:
+ case Sp::MAXSP:
PlayerInfo::setAttribute(Attributes::MAX_MP, base);
break;
- case Sp::CHAR_POINTS:
+ case Sp::STATUSPOINT:
PlayerInfo::setAttribute(Attributes::CHAR_POINTS, base);
break;
- case Sp::LEVEL:
+ case Sp::BASELEVEL:
PlayerInfo::setAttribute(Attributes::LEVEL, base);
if (localPlayer)
{
@@ -315,7 +315,7 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
localPlayer->updateName();
}
break;
- case Sp::SKILL_POINTS:
+ case Sp::SKILLPOINT:
PlayerInfo::setAttribute(Attributes::SKILL_POINTS, base);
if (skillDialog)
skillDialog->update();
@@ -338,7 +338,7 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
case Sp::LUK:
setStatComplex(Attributes::LUK);
break;
- case Sp::MONEY:
+ case Sp::ZENY:
{
const int oldMoney = PlayerInfo::getAttribute(Attributes::MONEY);
const int newMoney = base;
@@ -356,83 +356,84 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
PlayerInfo::setAttribute(Attributes::MONEY, newMoney);
break;
}
- case Sp::EXP_NEEDED:
+ case Sp::NEXTBASEEXP:
PlayerInfo::setAttribute(Attributes::EXP_NEEDED, base);
break;
- case Sp::JOB_MOD:
+ // ++ here used in wrong way. Need like Sp::NEXTBASEEXP?
+ case Sp::NEXTJOBEXP:
PlayerInfo::setStatExperience(Attributes::JOB,
PlayerInfo::getStatExperience(Attributes::JOB).first, base);
break;
- case Sp::TOTAL_WEIGHT:
+ case Sp::WEIGHT:
PlayerInfo::setAttribute(Attributes::TOTAL_WEIGHT, base);
break;
- case Sp::MAX_WEIGHT:
+ case Sp::MAXWEIGHT:
PlayerInfo::setAttribute(Attributes::MAX_WEIGHT, base);
break;
- case Sp::STR_NEEDED:
+ case Sp::USTR:
statusWindow->setPointsNeeded(Attributes::STR, base);
break;
- case Sp::AGI_NEEDED:
+ case Sp::UAGI:
statusWindow->setPointsNeeded(Attributes::AGI, base);
break;
- case Sp::VIT_NEEDED:
+ case Sp::UVIT:
statusWindow->setPointsNeeded(Attributes::VIT, base);
break;
- case Sp::INT_NEEDED:
+ case Sp::UINT:
statusWindow->setPointsNeeded(Attributes::INT, base);
break;
- case Sp::DEX_NEEDED:
+ case Sp::UDEX:
statusWindow->setPointsNeeded(Attributes::DEX, base);
break;
- case Sp::LUK_NEEDED:
+ case Sp::ULUK:
statusWindow->setPointsNeeded(Attributes::LUK, base);
break;
- case Sp::ATK:
+ case Sp::ATK1:
PlayerInfo::setStatBase(Attributes::ATK, base);
PlayerInfo::updateAttrs();
break;
- case Sp::ATK_MOD:
+ case Sp::ATK2:
PlayerInfo::setStatMod(Attributes::ATK, base);
PlayerInfo::updateAttrs();
break;
- case Sp::MATK:
+ case Sp::MATK1:
PlayerInfo::setStatBase(Attributes::MATK, base);
break;
- case Sp::MATK_MOD:
+ case Sp::MATK2:
PlayerInfo::setStatMod(Attributes::MATK, base);
break;
- case Sp::DEF:
+ case Sp::DEF1:
PlayerInfo::setStatBase(Attributes::DEF, base);
break;
- case Sp::DEF_MOD:
+ case Sp::DEF2:
PlayerInfo::setStatMod(Attributes::DEF, base);
break;
- case Sp::MDEF:
+ case Sp::MDEF1:
PlayerInfo::setStatBase(Attributes::MDEF, base);
break;
- case Sp::MDEF_MOD:
+ case Sp::MDEF2:
PlayerInfo::setStatMod(Attributes::MDEF, base);
break;
case Sp::HIT:
PlayerInfo::setStatBase(Attributes::HIT, base);
break;
- case Sp::FLEE:
+ case Sp::FLEE1:
PlayerInfo::setStatBase(Attributes::FLEE, base);
break;
- case Sp::FLEE_MOD:
+ case Sp::FLEE2:
PlayerInfo::setStatMod(Attributes::FLEE, base);
break;
- case Sp::CRIT:
+ case Sp::CRITICAL:
PlayerInfo::setStatBase(Attributes::CRIT, base);
break;
- case Sp::ATTACK_DELAY:
+ case Sp::ASPD:
localPlayer->setAttackSpeed(base);
PlayerInfo::setStatBase(Attributes::ATTACK_DELAY, base);
PlayerInfo::setStatMod(Attributes::ATTACK_DELAY, 0);
PlayerInfo::updateAttrs();
break;
- case Sp::JOB:
+ case Sp::JOBLEVEL:
PlayerInfo::setStatBase(Attributes::JOB, base);
break;