summaryrefslogtreecommitdiff
path: root/src/gui/stats.cpp
diff options
context:
space:
mode:
authorMateusz Kaduk <mateusz.kaduk@gmail.com>2004-12-28 19:27:15 +0000
committerMateusz Kaduk <mateusz.kaduk@gmail.com>2004-12-28 19:27:15 +0000
commitb9f65e717acb7848f5bbb2450d854d87df92793e (patch)
tree20daeefc1838090c1fcb0370ebaf5d0349c3b7da /src/gui/stats.cpp
parentff63c0e4a73f56558de77f255765e68b662008f6 (diff)
downloadmana-b9f65e717acb7848f5bbb2450d854d87df92793e.tar.gz
mana-b9f65e717acb7848f5bbb2450d854d87df92793e.tar.bz2
mana-b9f65e717acb7848f5bbb2450d854d87df92793e.tar.xz
mana-b9f65e717acb7848f5bbb2450d854d87df92793e.zip
action method sends info to server when stats increased.
Diffstat (limited to 'src/gui/stats.cpp')
-rw-r--r--src/gui/stats.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/gui/stats.cpp b/src/gui/stats.cpp
index 54fbfaff..37eb7e63 100644
--- a/src/gui/stats.cpp
+++ b/src/gui/stats.cpp
@@ -49,8 +49,8 @@ StatsWindow::StatsWindow(gcn::Container *parent)
// Set position
for (i = 0; i < 6; i++) {
- statsLabel[i]->setPosition(10,(i*22)+10);
- statsButton[i]->setPosition(170,(i*22)+10);
+ statsLabel[i]->setPosition(10,(i*23)+10);
+ statsButton[i]->setPosition(170,(i*23)+10);
}
// Assemble
@@ -100,29 +100,32 @@ StatsWindow * StatsWindow::create_statswindow() {
}
void StatsWindow::action(const std::string& eventId) {
- //TODO: update char_info
+ WFIFOW(0) = net_w_value(0x00bb);
+
if (eventId == "STR") {
- puts("STR");
+ WFIFOW(2) = net_w_value(0x000d);
update();
}
if (eventId == "AGI") {
- puts("AGI");
+ WFIFOW(2) = net_w_value(0x000e);
update();
}
if (eventId == "VIT") {
- puts("VIT");
+ WFIFOW(2) = net_w_value(0x000f);
update();
}
if (eventId == "INT") {
- puts("INT");
- update();
+ WFIFOW(2) = net_w_value(0x0010);
+ update();
}
if (eventId == "DEX") {
- puts("DEX");
+ WFIFOW(2) = net_w_value(0x0011);
update();
}
if (eventId == "LUK") {
- puts("LUK");
+ WFIFOW(2) = net_w_value(0x0012);
update();
}
+ WFIFOW(4) = net_b_value(1);
+ WFIFOSET(5);
}