summaryrefslogtreecommitdiff
path: root/src/net/tmwa
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/tmwa
parentb43a9478fb7af4a2352f55395bdeda5067b5f721 (diff)
downloadmv-d9ffcee4837b22bd404589079373c9157ef448bb.tar.gz
mv-d9ffcee4837b22bd404589079373c9157ef448bb.tar.bz2
mv-d9ffcee4837b22bd404589079373c9157ef448bb.tar.xz
mv-d9ffcee4837b22bd404589079373c9157ef448bb.zip
Rename Sp attributes to server values. Also add missing values for hercules.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/playerhandler.cpp64
-rw-r--r--src/net/tmwa/sp.h66
2 files changed, 66 insertions, 64 deletions
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 33481d85a..c34aca907 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -224,15 +224,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;
@@ -257,7 +257,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))
@@ -271,16 +271,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)
{
@@ -288,7 +288,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();
@@ -311,7 +311,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;
@@ -329,83 +329,83 @@ 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:
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;
case Sp::GM_LEVEL:
diff --git a/src/net/tmwa/sp.h b/src/net/tmwa/sp.h
index 01a552ea5..f4116e1f1 100644
--- a/src/net/tmwa/sp.h
+++ b/src/net/tmwa/sp.h
@@ -27,49 +27,51 @@ namespace Sp
{
enum
{
- WALK_SPEED = 0,
- EXP = 1,
- JOB_EXP = 2,
+ SPEED = 0,
+ BASEEXP = 1,
+ JOBEXP = 2,
KARMA = 3,
MANNER = 4,
HP = 5,
- MAX_HP = 6,
- MP = 7,
- MAX_MP = 8,
- CHAR_POINTS = 9,
- LEVEL = 11,
- SKILL_POINTS = 12,
+ MAXHP = 6,
+ SP = 7,
+ MAXSP = 8,
+ STATUSPOINT = 9,
+ BASELEVEL = 11,
+ SKILLPOINT = 12,
STR = 13,
AGI = 14,
VIT = 15,
INT = 16,
DEX = 17,
LUK = 18,
- MONEY = 20,
- EXP_NEEDED = 22,
+ CLASS = 19,
+ ZENY = 20,
+ SEX = 21,
+ NEXTBASEEXP = 22,
JOB_MOD = 23,
- TOTAL_WEIGHT = 24,
- MAX_WEIGHT = 25,
- STR_NEEDED = 32,
- AGI_NEEDED = 33,
- VIT_NEEDED = 34,
- INT_NEEDED = 35,
- DEX_NEEDED = 36,
- LUK_NEEDED = 37,
- ATK = 41,
- ATK_MOD = 42,
- MATK = 43,
- MATK_MOD = 44,
- DEF = 45,
- DEF_MOD = 46,
- MDEF = 47,
- MDEF_MOD = 48,
+ WEIGHT = 24,
+ MAXWEIGHT = 25,
+ USTR = 32,
+ UAGI = 33,
+ UVIT = 34,
+ UINT = 35,
+ UDEX = 36,
+ ULUK = 37,
+ ATK1 = 41,
+ ATK2 = 42,
+ MATK1 = 43,
+ MATK2 = 44,
+ DEF1 = 45,
+ DEF2 = 46,
+ MDEF1 = 47,
+ MDEF2 = 48,
HIT = 49,
- FLEE = 50,
- FLEE_MOD = 51,
- CRIT = 52,
- ATTACK_DELAY = 53,
- JOB = 55,
+ FLEE1 = 50,
+ FLEE2 = 51,
+ CRITICAL = 52,
+ ASPD = 53,
+ JOBLEVEL = 55,
GM_LEVEL = 500
};