diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2011-04-09 00:11:54 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2011-04-09 17:54:12 +0200 |
commit | 1e1f619b9ae5aa26058c499c988f45d1fb1b6d53 (patch) | |
tree | 1fe58c53388054ced122b5327e33fc2851a0606a /src/playerinfo.cpp | |
parent | 30d4b0adf4f17f05d1d62fc3428c896ef1079b6b (diff) | |
download | mana-1e1f619b9ae5aa26058c499c988f45d1fb1b6d53.tar.gz mana-1e1f619b9ae5aa26058c499c988f45d1fb1b6d53.tar.bz2 mana-1e1f619b9ae5aa26058c499c988f45d1fb1b6d53.tar.xz mana-1e1f619b9ae5aa26058c499c988f45d1fb1b6d53.zip |
Moved Channels to Mana::Event::Channel
Acked-by: Jared Adams
Diffstat (limited to 'src/playerinfo.cpp')
-rw-r--r-- | src/playerinfo.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/playerinfo.cpp b/src/playerinfo.cpp index 9a1db45c..150a1ba1 100644 --- a/src/playerinfo.cpp +++ b/src/playerinfo.cpp @@ -61,7 +61,7 @@ void triggerAttr(int id, int old) event.setInt("id", id); event.setInt("oldValue", old); event.setInt("newValue", mData.mAttributes.find(id)->second); - event.trigger(CHANNEL_ATTRIBUTES); + event.trigger(Mana::Event::AttributesChannel); } void triggerStat(int id, const std::string &changed, int old1, int old2 = 0) @@ -76,7 +76,7 @@ void triggerStat(int id, const std::string &changed, int old1, int old2 = 0) event.setString("changed", changed); event.setInt("oldValue1", old1); event.setInt("oldValue2", old2); - event.trigger(CHANNEL_ATTRIBUTES); + event.trigger(Mana::Event::AttributesChannel); } // --- Attributes ------------------------------------------------------------- @@ -218,7 +218,7 @@ void setStorageCount(int count) Mana::Event event(Mana::Event::StorageCount); event.setInt("oldCount", old); event.setInt("newCount", count); - event.trigger(CHANNEL_STORAGE); + event.trigger(Mana::Event::StorageChannel); } } @@ -239,7 +239,7 @@ void setNPCInteractionCount(int count) Mana::Event event(Mana::Event::NpcCount); event.setInt("oldCount", old); event.setInt("newCount", count); - event.trigger(CHANNEL_NPC); + event.trigger(Mana::Event::NpcChannel); } } @@ -258,7 +258,7 @@ void setNPCPostCount(int count) Mana::Event event(Mana::Event::PostCount); event.setInt("oldCount", old); event.setInt("newCount", count); - event.trigger(CHANNEL_NPC); + event.trigger(Mana::Event::NpcChannel); } } @@ -279,7 +279,7 @@ void setBuySellState(BuySellState buySellState) Mana::Event event(Mana::Event::StateChange); event.setInt("oldState", old); event.setInt("newState", buySellState); - event.trigger(CHANNEL_BUYSELL); + event.trigger(Mana::Event::BuySellChannel); } } @@ -297,7 +297,7 @@ void setTrading(bool trading) { Mana::Event event(Mana::Event::Trading); event.setBool("trading", trading); - event.trigger(CHANNEL_STATUS); + event.trigger(Mana::Event::StatusChannel); } } @@ -353,13 +353,13 @@ class PlayerLogic : Mana::Listener public: PlayerLogic() { - listen(CHANNEL_CLIENT); - listen(CHANNEL_GAME); + listen(Mana::Event::ClientChannel); + listen(Mana::Event::GameChannel); } - void event(Channels channel, const Mana::Event &event) + void event(Mana::Event::Channel channel, const Mana::Event &event) { - if (channel == CHANNEL_CLIENT) + if (channel == Mana::Event::ClientChannel) { if (event.getType() == Mana::Event::StateChange) { @@ -375,7 +375,7 @@ public: } } } - else if (channel == CHANNEL_GAME) + else if (channel == Mana::Event::GameChannel) { if (event.getType() == Mana::Event::Destructed) { |