summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/ministatuswindow.cpp10
-rw-r--r--src/gui/statuswindow.cpp8
-rw-r--r--src/net/tmwa/protocol.h4
3 files changed, 22 insertions, 0 deletions
diff --git a/src/gui/ministatuswindow.cpp b/src/gui/ministatuswindow.cpp
index 8173082f..fac8b35f 100644
--- a/src/gui/ministatuswindow.cpp
+++ b/src/gui/ministatuswindow.cpp
@@ -37,6 +37,8 @@
#include "net/playerhandler.h"
#include "net/gamehandler.h"
+#include "net/tmwa/protocol.h"
+
#include "resources/theme.h"
#include "utils/gettext.h"
@@ -138,6 +140,14 @@ void MiniStatusWindow::event(Event::Channel channel,
StatusWindow::updateXPBar(mXpBar);
}
}
+ if (event.getType() == Event::UpdateStat)
+ {
+ if (Net::getNetworkType() == ServerInfo::TMWATHENA &&
+ event.getInt("id") == TmwAthena::MATK)
+ {
+ StatusWindow::updateMPBar(mMpBar);
+ }
+ }
}
else if (channel == Event::ActorSpriteChannel)
{
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index 310e6b9b..ebd54f33 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -39,6 +39,8 @@
#include "net/playerhandler.h"
#include "net/gamehandler.h"
+#include "net/tmwa/protocol.h"
+
#include "resources/theme.h"
#include "utils/gettext.h"
@@ -288,6 +290,12 @@ void StatusWindow::event(Event::Channel channel,
{
it->second->update();
}
+
+ if (Net::getNetworkType() == ServerInfo::TMWATHENA &&
+ id == TmwAthena::MATK)
+ {
+ updateMPBar(mMpBar, true);
+ }
}
}
}
diff --git a/src/net/tmwa/protocol.h b/src/net/tmwa/protocol.h
index 0c250f60..768d6061 100644
--- a/src/net/tmwa/protocol.h
+++ b/src/net/tmwa/protocol.h
@@ -22,6 +22,8 @@
#ifndef TA_PROTOCOL_H
#define TA_PROTOCOL_H
+namespace TmwAthena {
+
enum {
JOB = 0xa,
@@ -305,4 +307,6 @@ static const int STORAGE_OFFSET = 1;
#define CMSG_GUILD_OPPOSITION 0x0180
#define CMSG_GUILD_ALLIANCE_DELETE 0x0183
+}
+
#endif