summaryrefslogtreecommitdiff
path: root/src/net/manaserv/npchandler.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-04-09 00:11:54 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-04-09 17:54:12 +0200
commit1e1f619b9ae5aa26058c499c988f45d1fb1b6d53 (patch)
tree1fe58c53388054ced122b5327e33fc2851a0606a /src/net/manaserv/npchandler.cpp
parent30d4b0adf4f17f05d1d62fc3428c896ef1079b6b (diff)
downloadmana-client-1e1f619b9ae5aa26058c499c988f45d1fb1b6d53.tar.gz
mana-client-1e1f619b9ae5aa26058c499c988f45d1fb1b6d53.tar.bz2
mana-client-1e1f619b9ae5aa26058c499c988f45d1fb1b6d53.tar.xz
mana-client-1e1f619b9ae5aa26058c499c988f45d1fb1b6d53.zip
Moved Channels to Mana::Event::Channel
Acked-by: Jared Adams
Diffstat (limited to 'src/net/manaserv/npchandler.cpp')
-rw-r--r--src/net/manaserv/npchandler.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/net/manaserv/npchandler.cpp b/src/net/manaserv/npchandler.cpp
index 91e57c72..2642067c 100644
--- a/src/net/manaserv/npchandler.cpp
+++ b/src/net/manaserv/npchandler.cpp
@@ -75,7 +75,7 @@ void NpcHandler::handleMessage(Net::MessageIn &msg)
event->setString("choice" + toString(count), msg.readString());
}
event->setInt("choiceCount", count);
- event->trigger(CHANNEL_NPC);
+ event->trigger(Mana::Event::NpcChannel);
break;
case GPMSG_NPC_NUMBER:
@@ -84,43 +84,43 @@ void NpcHandler::handleMessage(Net::MessageIn &msg)
event->setInt("min", msg.readInt32());
event->setInt("max", msg.readInt32());
event->setInt("default", msg.readInt32());
- event->trigger(CHANNEL_NPC);
+ event->trigger(Mana::Event::NpcChannel);
break;
case GPMSG_NPC_STRING:
event = new Mana::Event(Mana::Event::StringInput);
event->setInt("id", npcId);
- event->trigger(CHANNEL_NPC);
+ event->trigger(Mana::Event::NpcChannel);
break;
case GPMSG_NPC_POST:
event = new Mana::Event(Mana::Event::Post);
event->setInt("id", npcId);
- event->trigger(CHANNEL_NPC);
+ event->trigger(Mana::Event::NpcChannel);
break;
case GPMSG_NPC_ERROR:
event = new Mana::Event(Mana::Event::End);
event->setInt("id", npcId);
- event->trigger(CHANNEL_NPC);
+ event->trigger(Mana::Event::NpcChannel);
break;
case GPMSG_NPC_MESSAGE:
event = new Mana::Event(Mana::Event::Message);
event->setInt("id", npcId);
event->setString("text", msg.readString(msg.getUnreadLength()));
- event->trigger(CHANNEL_NPC);
+ event->trigger(Mana::Event::NpcChannel);
delete event;
event = new Mana::Event(Mana::Event::Next);
event->setInt("id", npcId);
- event->trigger(CHANNEL_NPC);
+ event->trigger(Mana::Event::NpcChannel);
break;
case GPMSG_NPC_CLOSE:
event = new Mana::Event(Mana::Event::Close);
event->setInt("id", npcId);
- event->trigger(CHANNEL_NPC);
+ event->trigger(Mana::Event::NpcChannel);
break;
}
@@ -171,7 +171,7 @@ void NpcHandler::talk(int npcId)
Mana::Event event(Mana::Event::TalkSent);
event.setInt("npcId", npcId);
- event.trigger(CHANNEL_NPC);
+ event.trigger(Mana::Event::NpcChannel);
}
void NpcHandler::nextDialog(int npcId)
@@ -182,7 +182,7 @@ void NpcHandler::nextDialog(int npcId)
Mana::Event event(Mana::Event::NextSent);
event.setInt("npcId", npcId);
- event.trigger(CHANNEL_NPC);
+ event.trigger(Mana::Event::NpcChannel);
}
void NpcHandler::closeDialog(int npcId)
@@ -193,7 +193,7 @@ void NpcHandler::closeDialog(int npcId)
Mana::Event event(Mana::Event::CloseSent);
event.setInt("npcId", npcId);
- event.trigger(CHANNEL_NPC);
+ event.trigger(Mana::Event::NpcChannel);
}
void NpcHandler::menuSelect(int npcId, int choice)
@@ -206,7 +206,7 @@ void NpcHandler::menuSelect(int npcId, int choice)
Mana::Event event(Mana::Event::MenuSent);
event.setInt("npcId", npcId);
event.setInt("choice", choice);
- event.trigger(CHANNEL_NPC);
+ event.trigger(Mana::Event::NpcChannel);
}
void NpcHandler::integerInput(int npcId, int value)
@@ -219,7 +219,7 @@ void NpcHandler::integerInput(int npcId, int value)
Mana::Event event(Mana::Event::IntegerInputSent);
event.setInt("npcId", npcId);
event.setInt("value", value);
- event.trigger(CHANNEL_NPC);
+ event.trigger(Mana::Event::NpcChannel);
}
void NpcHandler::stringInput(int npcId, const std::string &value)
@@ -232,7 +232,7 @@ void NpcHandler::stringInput(int npcId, const std::string &value)
Mana::Event event(Mana::Event::StringInputSent);
event.setInt("npcId", npcId);
event.setString("value", value);
- event.trigger(CHANNEL_NPC);
+ event.trigger(Mana::Event::NpcChannel);
}
void NpcHandler::sendLetter(int npcId, const std::string &recipient,
@@ -247,7 +247,7 @@ void NpcHandler::sendLetter(int npcId, const std::string &recipient,
event.setInt("npcId", npcId);
event.setString("recipient", recipient);
event.setString("text", text);
- event.trigger(CHANNEL_NPC);
+ event.trigger(Mana::Event::NpcChannel);
}
} // namespace ManaServ