summaryrefslogtreecommitdiff
path: root/src/being/playerinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being/playerinfo.cpp')
-rw-r--r--src/being/playerinfo.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp
index 09604e971..ed52df6c0 100644
--- a/src/being/playerinfo.cpp
+++ b/src/being/playerinfo.cpp
@@ -39,6 +39,8 @@
#include "utils/delete2.h"
+#include "listeners/statlistener.h"
+
#include "debug.h"
namespace PlayerInfo
@@ -64,16 +66,7 @@ void triggerAttr(const int id, const int old)
void triggerStat(const int id, const int old1, const int old2)
{
- const StatMap::const_iterator it = mData.mStats.find(id);
- if (it == mData.mStats.end())
- return;
-
- DepricatedEvent event(EVENT_UPDATESTAT);
- event.setInt("id", id);
- const Stat &stat = it->second;
- event.setInt("oldValue1", old1);
- event.setInt("oldValue2", old2);
- DepricatedEvent::trigger(CHANNEL_ATTRIBUTES, event);
+ StatListener::distributeEvent(id, old1, old2);
}
// --- Attributes -------------------------------------------------------------