From a6f6dc9c2db87ed852cac1f8a3047f9b1d3efac0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 27 Apr 2014 16:24:12 +0300 Subject: Add StatListener. --- src/gui/windows/ministatuswindow.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/gui/windows/ministatuswindow.cpp') diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index 6fb330bbf..2320ac08a 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -112,8 +112,6 @@ MiniStatusWindow::MiniStatusWindow() : mTextPopup->postInit(); mStatusPopup->postInit(); - listen(CHANNEL_ATTRIBUTES); - StatusWindow::updateHPBar(mHpBar); if (Net::getGameHandler()->canUseMagicBar() && statusWindow) @@ -251,14 +249,13 @@ void MiniStatusWindow::drawIcons(Graphics *const graphics) } } -void MiniStatusWindow::processEvent(const Channels channel A_UNUSED, - const DepricatedEvent &event) +void MiniStatusWindow::statChanged(const int id, + const int oldVal1 A_UNUSED, + const int oldVal2 A_UNUSED) { - if (event.getName() == EVENT_UPDATESTAT) - { + if (statusWindow) statusWindow->updateMPBar(mMpBar); - StatusWindow::updateJobBar(mJobBar); - } + StatusWindow::updateJobBar(mJobBar); } void MiniStatusWindow::attributeChanged(const int id, -- cgit v1.2.3-70-g09d2