summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/ea/playerhandler.cpp74
-rw-r--r--src/net/ea/playerhandler.h2
-rw-r--r--src/net/eathena/playerhandler.cpp76
-rw-r--r--src/net/eathena/playerhandler.h3
-rw-r--r--src/net/tmwa/playerhandler.cpp76
-rw-r--r--src/net/tmwa/playerhandler.h3
6 files changed, 158 insertions, 76 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index b44b793cb..437f1fe27 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -469,80 +469,6 @@ void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg)
BLOCK_END("PlayerHandler::processPlayerStatUpdate4")
}
-void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg)
-{
- BLOCK_START("PlayerHandler::processPlayerStatUpdate5")
- PlayerInfo::setAttribute(Attributes::CHAR_POINTS, msg.readInt16());
-
- unsigned int val = msg.readUInt8();
- PlayerInfo::setStatBase(EA_STR, val);
- if (statusWindow)
- statusWindow->setPointsNeeded(EA_STR, msg.readUInt8());
- else
- msg.readUInt8();
-
- val = msg.readUInt8();
- PlayerInfo::setStatBase(EA_AGI, val);
- if (statusWindow)
- statusWindow->setPointsNeeded(EA_AGI, msg.readUInt8());
- else
- msg.readUInt8();
-
- val = msg.readUInt8();
- PlayerInfo::setStatBase(EA_VIT, val);
- if (statusWindow)
- statusWindow->setPointsNeeded(EA_VIT, msg.readUInt8());
- else
- msg.readUInt8();
-
- val = msg.readUInt8();
- PlayerInfo::setStatBase(EA_INT, val);
- if (statusWindow)
- statusWindow->setPointsNeeded(EA_INT, msg.readUInt8());
- else
- msg.readUInt8();
-
- val = msg.readUInt8();
- PlayerInfo::setStatBase(EA_DEX, val);
- if (statusWindow)
- statusWindow->setPointsNeeded(EA_DEX, msg.readUInt8());
- else
- msg.readUInt8();
-
- val = msg.readUInt8();
- PlayerInfo::setStatBase(EA_LUK, val);
- if (statusWindow)
- statusWindow->setPointsNeeded(EA_LUK, msg.readUInt8());
- else
- msg.readUInt8();
-
- PlayerInfo::setStatBase(EA_ATK, msg.readInt16(), false);
- PlayerInfo::setStatMod(EA_ATK, msg.readInt16());
- PlayerInfo::updateAttrs();
-
- val = msg.readInt16();
- PlayerInfo::setStatBase(EA_MATK, val, false);
-
- val = msg.readInt16();
- PlayerInfo::setStatMod(EA_MATK, val);
-
- PlayerInfo::setStatBase(EA_DEF, msg.readInt16(), false);
- PlayerInfo::setStatMod(EA_DEF, msg.readInt16());
-
- PlayerInfo::setStatBase(EA_MDEF, msg.readInt16(), false);
- PlayerInfo::setStatMod(EA_MDEF, msg.readInt16());
-
- PlayerInfo::setStatBase(EA_HIT, msg.readInt16());
-
- PlayerInfo::setStatBase(EA_FLEE, msg.readInt16(), false);
- PlayerInfo::setStatMod(EA_FLEE, msg.readInt16());
-
- PlayerInfo::setStatBase(EA_CRIT, msg.readInt16());
-
- msg.readInt16(); // manner
- BLOCK_END("PlayerHandler::processPlayerStatUpdate5")
-}
-
void PlayerHandler::processPlayerStatUpdate6(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processPlayerStatUpdate6")
diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h
index 0c8afd72e..d58930237 100644
--- a/src/net/ea/playerhandler.h
+++ b/src/net/ea/playerhandler.h
@@ -69,8 +69,6 @@ class PlayerHandler notfinal : public Net::PlayerHandler
static void processPlayerStatUpdate4(Net::MessageIn &msg);
- static void processPlayerStatUpdate5(Net::MessageIn &msg);
-
static void processPlayerStatUpdate6(Net::MessageIn &msg);
static void processPlayerArrowMessage(Net::MessageIn &msg);
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 81068b959..1a3a18d8a 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -24,6 +24,8 @@
#include "being/attributes.h"
+#include "gui/windows/statuswindow.h"
+
#include "net/net.h"
#include "net/eathena/attrs.h"
@@ -241,4 +243,78 @@ void PlayerHandler::processPlayerShowEquip(Net::MessageIn &msg)
msg.readUInt8(); // show equip
}
+void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg)
+{
+ BLOCK_START("PlayerHandler::processPlayerStatUpdate5")
+ PlayerInfo::setAttribute(Attributes::CHAR_POINTS, msg.readInt16());
+
+ unsigned int val = msg.readUInt8();
+ PlayerInfo::setStatBase(STR, val);
+ if (statusWindow)
+ statusWindow->setPointsNeeded(STR, msg.readUInt8());
+ else
+ msg.readUInt8();
+
+ val = msg.readUInt8();
+ PlayerInfo::setStatBase(AGI, val);
+ if (statusWindow)
+ statusWindow->setPointsNeeded(AGI, msg.readUInt8());
+ else
+ msg.readUInt8();
+
+ val = msg.readUInt8();
+ PlayerInfo::setStatBase(VIT, val);
+ if (statusWindow)
+ statusWindow->setPointsNeeded(VIT, msg.readUInt8());
+ else
+ msg.readUInt8();
+
+ val = msg.readUInt8();
+ PlayerInfo::setStatBase(INT, val);
+ if (statusWindow)
+ statusWindow->setPointsNeeded(INT, msg.readUInt8());
+ else
+ msg.readUInt8();
+
+ val = msg.readUInt8();
+ PlayerInfo::setStatBase(DEX, val);
+ if (statusWindow)
+ statusWindow->setPointsNeeded(DEX, msg.readUInt8());
+ else
+ msg.readUInt8();
+
+ val = msg.readUInt8();
+ PlayerInfo::setStatBase(LUK, val);
+ if (statusWindow)
+ statusWindow->setPointsNeeded(LUK, msg.readUInt8());
+ else
+ msg.readUInt8();
+
+ PlayerInfo::setStatBase(ATK, msg.readInt16(), false);
+ PlayerInfo::setStatMod(ATK, msg.readInt16());
+ PlayerInfo::updateAttrs();
+
+ val = msg.readInt16();
+ PlayerInfo::setStatBase(MATK, val, false);
+
+ val = msg.readInt16();
+ PlayerInfo::setStatMod(MATK, val);
+
+ PlayerInfo::setStatBase(DEF, msg.readInt16(), false);
+ PlayerInfo::setStatMod(DEF, msg.readInt16());
+
+ PlayerInfo::setStatBase(MDEF, msg.readInt16(), false);
+ PlayerInfo::setStatMod(MDEF, msg.readInt16());
+
+ PlayerInfo::setStatBase(HIT, msg.readInt16());
+
+ PlayerInfo::setStatBase(FLEE, msg.readInt16(), false);
+ PlayerInfo::setStatMod(FLEE, msg.readInt16());
+
+ PlayerInfo::setStatBase(CRIT, msg.readInt16());
+
+ msg.readInt16(); // manner
+ BLOCK_END("PlayerHandler::processPlayerStatUpdate5")
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h
index 3881150cb..6db5e5bce 100644
--- a/src/net/eathena/playerhandler.h
+++ b/src/net/eathena/playerhandler.h
@@ -59,6 +59,9 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler
void requestOnlineList() const override final;
void respawn() const override final;
+
+ protected:
+ void processPlayerStatUpdate5(Net::MessageIn &msg);
};
} // namespace EAthena
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index b13fffca3..a881f9dd4 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -29,6 +29,8 @@
#include "being/attributes.h"
#include "being/beingflag.h"
+#include "gui/windows/statuswindow.h"
+
#include "net/net.h"
#include "net/tmwa/attrs.h"
@@ -337,4 +339,78 @@ void PlayerHandler::processMapMusic(Net::MessageIn &msg)
map->setMusicFile(music);
}
+void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg)
+{
+ BLOCK_START("PlayerHandler::processPlayerStatUpdate5")
+ PlayerInfo::setAttribute(Attributes::CHAR_POINTS, msg.readInt16());
+
+ unsigned int val = msg.readUInt8();
+ PlayerInfo::setStatBase(STR, val);
+ if (statusWindow)
+ statusWindow->setPointsNeeded(STR, msg.readUInt8());
+ else
+ msg.readUInt8();
+
+ val = msg.readUInt8();
+ PlayerInfo::setStatBase(AGI, val);
+ if (statusWindow)
+ statusWindow->setPointsNeeded(AGI, msg.readUInt8());
+ else
+ msg.readUInt8();
+
+ val = msg.readUInt8();
+ PlayerInfo::setStatBase(VIT, val);
+ if (statusWindow)
+ statusWindow->setPointsNeeded(VIT, msg.readUInt8());
+ else
+ msg.readUInt8();
+
+ val = msg.readUInt8();
+ PlayerInfo::setStatBase(INT, val);
+ if (statusWindow)
+ statusWindow->setPointsNeeded(INT, msg.readUInt8());
+ else
+ msg.readUInt8();
+
+ val = msg.readUInt8();
+ PlayerInfo::setStatBase(DEX, val);
+ if (statusWindow)
+ statusWindow->setPointsNeeded(DEX, msg.readUInt8());
+ else
+ msg.readUInt8();
+
+ val = msg.readUInt8();
+ PlayerInfo::setStatBase(LUK, val);
+ if (statusWindow)
+ statusWindow->setPointsNeeded(LUK, msg.readUInt8());
+ else
+ msg.readUInt8();
+
+ PlayerInfo::setStatBase(ATK, msg.readInt16(), false);
+ PlayerInfo::setStatMod(ATK, msg.readInt16());
+ PlayerInfo::updateAttrs();
+
+ val = msg.readInt16();
+ PlayerInfo::setStatBase(MATK, val, false);
+
+ val = msg.readInt16();
+ PlayerInfo::setStatMod(MATK, val);
+
+ PlayerInfo::setStatBase(DEF, msg.readInt16(), false);
+ PlayerInfo::setStatMod(DEF, msg.readInt16());
+
+ PlayerInfo::setStatBase(MDEF, msg.readInt16(), false);
+ PlayerInfo::setStatMod(MDEF, msg.readInt16());
+
+ PlayerInfo::setStatBase(HIT, msg.readInt16());
+
+ PlayerInfo::setStatBase(FLEE, msg.readInt16(), false);
+ PlayerInfo::setStatMod(FLEE, msg.readInt16());
+
+ PlayerInfo::setStatBase(CRIT, msg.readInt16());
+
+ msg.readInt16(); // manner
+ BLOCK_END("PlayerHandler::processPlayerStatUpdate5")
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h
index 83dacf0ae..f70f59f58 100644
--- a/src/net/tmwa/playerhandler.h
+++ b/src/net/tmwa/playerhandler.h
@@ -59,6 +59,9 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler
static void processMapMusic(Net::MessageIn &msg);
void respawn() const override final;
+
+ protected:
+ void processPlayerStatUpdate5(Net::MessageIn &msg);
};
} // namespace TmwAthena