diff options
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/being.cpp b/src/being.cpp index 95f2ecdd..c749d8ce 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -115,7 +115,7 @@ Being::Being(int id, Type type, int subtype, Map *map): setShowName(true); updateColors(); - listen("Chat"); + listen(CHANNEL_CHAT); } Being::~Being() @@ -1210,12 +1210,12 @@ void Being::talkTo() { Mana::Event event("doTalk"); event.setInt("npcId", mId); - event.trigger("NPC"); + event.trigger(CHANNEL_NPC); } -void Being::event(const std::string &channel, const Mana::Event &event) +void Being::event(Channels channel, const Mana::Event &event) { - if (channel == "Chat" && + if (channel == CHANNEL_CHAT && (event.getName() == "Being" || event.getName() == "Player") && event.getInt("permissions") & PlayerRelation::SPEECH_FLOAT) { |