From 5d45a5ee002a1a6d67e88e7eece2b5a650baf8cf Mon Sep 17 00:00:00 2001 From: Erik Schilling Date: Tue, 7 Feb 2012 14:31:14 +0100 Subject: Fixed color updates of magic bar Resolves: Mana-Mantis #457. Reviewed-by: Bertram. --- src/gui/ministatuswindow.cpp | 10 ++++++++++ src/gui/statuswindow.cpp | 8 ++++++++ 2 files changed, 18 insertions(+) (limited to 'src/gui') 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); + } } } } -- cgit v1.2.3-70-g09d2