diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-02-07 14:31:14 +0100 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-02-07 17:40:29 +0100 |
commit | 5d45a5ee002a1a6d67e88e7eece2b5a650baf8cf (patch) | |
tree | d2133e655408c80449a34943a3693f8058b963c2 | |
parent | 46d9cbb6d287a8744dbf400aaefa6b5f29274529 (diff) | |
download | mana-5d45a5ee002a1a6d67e88e7eece2b5a650baf8cf.tar.gz mana-5d45a5ee002a1a6d67e88e7eece2b5a650baf8cf.tar.bz2 mana-5d45a5ee002a1a6d67e88e7eece2b5a650baf8cf.tar.xz mana-5d45a5ee002a1a6d67e88e7eece2b5a650baf8cf.zip |
Fixed color updates of magic bar
Resolves: Mana-Mantis #457.
Reviewed-by: Bertram.
-rw-r--r-- | src/gui/ministatuswindow.cpp | 10 | ||||
-rw-r--r-- | src/gui/statuswindow.cpp | 8 | ||||
-rw-r--r-- | src/net/tmwa/protocol.h | 4 |
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 |