diff options
Diffstat (limited to 'src/net/eathena/playerhandler.cpp')
-rw-r--r-- | src/net/eathena/playerhandler.cpp | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index 5a7a1bada..eb320b041 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -23,6 +23,7 @@ #include "net/eathena/playerhandler.h" #include "being/attributes.h" +#include "being/localplayer.h" #include "gui/windows/statuswindow.h" @@ -250,69 +251,69 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg) msg.readInt16("char points")); unsigned int val = msg.readUInt8("str"); - PlayerInfo::setStatBase(EA_STR, val); + PlayerInfo::setStatBase(STR, val); if (statusWindow) - statusWindow->setPointsNeeded(EA_STR, msg.readUInt8("str cost")); + statusWindow->setPointsNeeded(STR, msg.readUInt8("str cost")); else msg.readUInt8("str need"); val = msg.readUInt8("agi"); - PlayerInfo::setStatBase(EA_AGI, val); + PlayerInfo::setStatBase(AGI, val); if (statusWindow) - statusWindow->setPointsNeeded(EA_AGI, msg.readUInt8("agi cost")); + statusWindow->setPointsNeeded(AGI, msg.readUInt8("agi cost")); else msg.readUInt8("agi cost"); val = msg.readUInt8("vit"); - PlayerInfo::setStatBase(EA_VIT, val); + PlayerInfo::setStatBase(VIT, val); if (statusWindow) - statusWindow->setPointsNeeded(EA_VIT, msg.readUInt8("vit cost")); + statusWindow->setPointsNeeded(VIT, msg.readUInt8("vit cost")); else msg.readUInt8("vit cost"); val = msg.readUInt8("int"); - PlayerInfo::setStatBase(EA_INT, val); + PlayerInfo::setStatBase(INT, val); if (statusWindow) - statusWindow->setPointsNeeded(EA_INT, msg.readUInt8("int cost")); + statusWindow->setPointsNeeded(INT, msg.readUInt8("int cost")); else msg.readUInt8("int cost"); val = msg.readUInt8("dex"); - PlayerInfo::setStatBase(EA_DEX, val); + PlayerInfo::setStatBase(DEX, val); if (statusWindow) - statusWindow->setPointsNeeded(EA_DEX, msg.readUInt8("dex cost")); + statusWindow->setPointsNeeded(DEX, msg.readUInt8("dex cost")); else msg.readUInt8("dex cost"); val = msg.readUInt8("luk"); - PlayerInfo::setStatBase(EA_LUK, val); + PlayerInfo::setStatBase(LUK, val); if (statusWindow) - statusWindow->setPointsNeeded(EA_LUK, msg.readUInt8("luk cost")); + statusWindow->setPointsNeeded(LUK, msg.readUInt8("luk cost")); else msg.readUInt8("luk cost"); - PlayerInfo::setStatBase(EA_ATK, msg.readInt16("left atk"), false); - PlayerInfo::setStatMod(EA_ATK, msg.readInt16("right atk")); + PlayerInfo::setStatBase(ATK, msg.readInt16("left atk"), false); + PlayerInfo::setStatMod(ATK, msg.readInt16("right atk")); PlayerInfo::updateAttrs(); val = msg.readInt16("right matk"); - PlayerInfo::setStatBase(EA_MATK, val, false); + PlayerInfo::setStatBase(MATK, val, false); val = msg.readInt16("left matk"); - PlayerInfo::setStatMod(EA_MATK, val); + PlayerInfo::setStatMod(MATK, val); - PlayerInfo::setStatBase(EA_DEF, msg.readInt16("left def"), false); - PlayerInfo::setStatMod(EA_DEF, msg.readInt16("right def")); + PlayerInfo::setStatBase(DEF, msg.readInt16("left def"), false); + PlayerInfo::setStatMod(DEF, msg.readInt16("right def")); - PlayerInfo::setStatBase(EA_MDEF, msg.readInt16("left mdef"), false); - PlayerInfo::setStatMod(EA_MDEF, msg.readInt16("right mdef")); + PlayerInfo::setStatBase(MDEF, msg.readInt16("left mdef"), false); + PlayerInfo::setStatMod(MDEF, msg.readInt16("right mdef")); - PlayerInfo::setStatBase(EA_HIT, msg.readInt16("hit")); + PlayerInfo::setStatBase(HIT, msg.readInt16("hit")); - PlayerInfo::setStatBase(EA_FLEE, msg.readInt16("flee"), false); - PlayerInfo::setStatMod(EA_FLEE, msg.readInt16("flee2/10")); + PlayerInfo::setStatBase(FLEE, msg.readInt16("flee"), false); + PlayerInfo::setStatMod(FLEE, msg.readInt16("flee2/10")); - PlayerInfo::setStatBase(EA_CRIT, msg.readInt16("crit/10")); + PlayerInfo::setStatBase(CRIT, msg.readInt16("crit/10")); const int speed = msg.readInt16("speed"); localPlayer->setWalkSpeed(Vector(static_cast<float>(speed), |