diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-01 15:19:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-01 19:28:08 +0300 |
commit | a001d8490f6996d5228d0e86ef3b3c6ee1712c47 (patch) | |
tree | 4bf3fd6c98ed3cbab3271ba8283fa8e90fd188d4 /src/net | |
parent | 4fd1fb3701088b62b78e7c90bf4f7e825ff8259a (diff) | |
download | manaverse-a001d8490f6996d5228d0e86ef3b3c6ee1712c47.tar.gz manaverse-a001d8490f6996d5228d0e86ef3b3c6ee1712c47.tar.bz2 manaverse-a001d8490f6996d5228d0e86ef3b3c6ee1712c47.tar.xz manaverse-a001d8490f6996d5228d0e86ef3b3c6ee1712c47.zip |
In setStat remove type constants to numbers.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/playerhandler.cpp | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index b3e193e1f..831bc08e0 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -303,25 +303,6 @@ void PlayerHandler::setStat(const int type, { switch (type) { - case EA_STR: - setStatComplex(EA_STR); - break; - case EA_AGI: - setStatComplex(EA_AGI); - break; - case EA_VIT: - setStatComplex(EA_VIT); - break; - case EA_INT: - setStatComplex(EA_INT); - break; - case EA_DEX: - setStatComplex(EA_DEX); - break; - case EA_LUK: - setStatComplex(EA_LUK); - break; - case 0x0000: localPlayer->setWalkSpeed(Vector(static_cast<float>( base), static_cast<float>(base), 0)); @@ -356,7 +337,6 @@ void PlayerHandler::setStat(const int type, } } break; - case 0x0006: PlayerInfo::setAttribute(Attributes::MAX_HP, base); @@ -393,6 +373,24 @@ void PlayerHandler::setStat(const int type, if (skillDialog) skillDialog->update(); break; + case 0x000d: + setStatComplex(EA_STR); + break; + case 0x000e: + setStatComplex(EA_AGI); + break; + case 0x000f: + setStatComplex(EA_VIT); + break; + case 0x0010: + setStatComplex(EA_INT); + break; + case 0x0011: + setStatComplex(EA_DEX); + break; + case 0x0012: + setStatComplex(EA_LUK); + break; case 0x0014: { const int oldMoney = PlayerInfo::getAttribute(Attributes::MONEY); @@ -481,7 +479,6 @@ void PlayerHandler::setStat(const int type, case 0x0025: statusWindow->setPointsNeeded(EA_LUK, base); break; - case 0x0029: PlayerInfo::setStatBase(EA_ATK, base); PlayerInfo::updateAttrs(); @@ -490,7 +487,6 @@ void PlayerHandler::setStat(const int type, PlayerInfo::setStatMod(EA_ATK, base); PlayerInfo::updateAttrs(); break; - case 0x002b: PlayerInfo::setStatBase(EA_MATK, base); break; @@ -503,18 +499,15 @@ void PlayerHandler::setStat(const int type, case 0x002e: PlayerInfo::setStatMod(EA_DEF, base); break; - case 0x002f: PlayerInfo::setStatBase(EA_MDEF, base); break; case 0x0030: PlayerInfo::setStatMod(EA_MDEF, base); break; - case 0x0031: PlayerInfo::setStatBase(EA_HIT, base); break; - case 0x0032: PlayerInfo::setStatBase(EA_FLEE, base); break; @@ -524,7 +517,6 @@ void PlayerHandler::setStat(const int type, case 0x0034: PlayerInfo::setStatBase(EA_CRIT, base); break; - case 0x0035: localPlayer->setAttackSpeed(base); PlayerInfo::setStatBase(Attributes::ATTACK_DELAY, base); |