summaryrefslogtreecommitdiff
path: root/src/gui/status.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-09-17 13:51:37 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-09-17 13:51:37 +0000
commite846d4502b59a1a3b8d658a37ae5b5ce4aa1c00c (patch)
tree8feb8b51d731057412a59aeddbbe83b75b09912a /src/gui/status.cpp
parent3bfcee0d9c033a46fe1b13795d89909c8fb6a239 (diff)
downloadMana-e846d4502b59a1a3b8d658a37ae5b5ce4aa1c00c.tar.gz
Mana-e846d4502b59a1a3b8d658a37ae5b5ce4aa1c00c.tar.bz2
Mana-e846d4502b59a1a3b8d658a37ae5b5ce4aa1c00c.tar.xz
Mana-e846d4502b59a1a3b8d658a37ae5b5ce4aa1c00c.zip
Completed transition to use MessageOut.
Diffstat (limited to 'src/gui/status.cpp')
-rw-r--r--src/gui/status.cpp42
1 files changed, 25 insertions, 17 deletions
diff --git a/src/gui/status.cpp b/src/gui/status.cpp
index 9bdb95a6..5a117982 100644
--- a/src/gui/status.cpp
+++ b/src/gui/status.cpp
@@ -30,7 +30,10 @@
#include "progressbar.h"
#include "../playerinfo.h"
+
+#include "../net/messageout.h"
#include "../net/network.h"
+#include "../net/protocol.h"
StatusWindow::StatusWindow():
Window(player_info->name)
@@ -415,31 +418,36 @@ void StatusWindow::draw(gcn::Graphics *graphics)
void StatusWindow::action(const std::string& eventId)
{
// Stats Part
- if ( eventId.length() == 3 )
+ if (eventId.length() == 3)
{
- writeWord(0, 0x00bb);
+ MessageOut outMsg;
+ outMsg.writeShort(CMSG_STAT_UPDATE_REQUEST);
- if (eventId == "STR") {
- writeWord(2, 0x000d);
+ if (eventId == "STR")
+ {
+ outMsg.writeShort(0x000d);
}
- if (eventId == "AGI") {
- writeWord(2, 0x000e);
+ if (eventId == "AGI")
+ {
+ outMsg.writeShort(0x000e);
}
- if (eventId == "VIT") {
- writeWord(2, 0x000f);
+ if (eventId == "VIT")
+ {
+ outMsg.writeShort(0x000f);
}
- if (eventId == "INT") {
- writeWord(2, 0x0010);
+ if (eventId == "INT")
+ {
+ outMsg.writeShort(0x0010);
}
- if (eventId == "DEX") {
- writeWord(2, 0x0011);
+ if (eventId == "DEX")
+ {
+ outMsg.writeShort(0x0011);
}
- if (eventId == "LUK") {
- writeWord(2, 0x0012);
+ if (eventId == "LUK")
+ {
+ outMsg.writeShort(0x0012);
}
-
- flush();
- writeByte(4, 1);
+ outMsg.writeByte(1);
writeSet(5);
}
}