summaryrefslogtreecommitdiff
path: root/src/playerinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/playerinfo.cpp')
-rw-r--r--src/playerinfo.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/playerinfo.cpp b/src/playerinfo.cpp
index 769d24a16..e0f8aa494 100644
--- a/src/playerinfo.cpp
+++ b/src/playerinfo.cpp
@@ -68,7 +68,10 @@ void triggerAttr(int id, int old)
void triggerStat(int id, const std::string &changed, int old1, int old2)
{
- StatMap::iterator it = mData.mStats.find(id);
+ StatMap::const_iterator it = mData.mStats.find(id);
+ if (it == mData.mStats.end())
+ return;
+
Mana::Event event(Mana::EVENT_UPDATESTAT);
event.setInt("id", id);
event.setInt("base", it->second.base);
@@ -309,7 +312,7 @@ public:
listen(Mana::CHANNEL_GAME);
}
- void event(Mana::Channels channel, const Mana::Event &event)
+ void processEvent(Mana::Channels channel, const Mana::Event &event)
{
if (channel == Mana::CHANNEL_CLIENT)
{