summaryrefslogtreecommitdiff
path: root/src/game-server/npc.cpp
diff options
context:
space:
mode:
authorBlue <bluesansdouze@gmail.com>2009-05-02 01:32:38 +0200
committerChuck Miller <shadowmil@gmail.com>2009-05-01 20:03:15 -0400
commit44c0334a9046db41db0b8dc281727218fe89c3f2 (patch)
tree3d831d714abf101b3c35af14844cec77bcb532fd /src/game-server/npc.cpp
parent7db58a9a70d8d2799525cf9eee94b826eaea198b (diff)
downloadmanaserv-44c0334a9046db41db0b8dc281727218fe89c3f2.tar.gz
manaserv-44c0334a9046db41db0b8dc281727218fe89c3f2.tar.bz2
manaserv-44c0334a9046db41db0b8dc281727218fe89c3f2.tar.xz
manaserv-44c0334a9046db41db0b8dc281727218fe89c3f2.zip
tmwserv NPC String input
Adding support for npc string input.
Diffstat (limited to 'src/game-server/npc.cpp')
-rw-r--r--src/game-server/npc.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/game-server/npc.cpp b/src/game-server/npc.cpp
index 60ba456d..99f34e7c 100644
--- a/src/game-server/npc.cpp
+++ b/src/game-server/npc.cpp
@@ -63,7 +63,22 @@ void NPC::select(Character *ch, int v)
mScript->execute();
}
-/*void NPC::integerRecepted()
+void NPC::integerRecepted(Character *ch, int v)
{
+ if (!mScript || !mEnabled) return;
+ mScript->prepare("npc_integer");
+ mScript->push(this);
+ mScript->push(ch);
+ mScript->push(v);
+ mScript->execute();
+}
-}*/
+void NPC::stringRecepted(Character *ch, std::string v)
+{
+ if (!mScript || !mEnabled) return;
+ mScript->prepare("npc_string");
+ mScript->push(this);
+ mScript->push(ch);
+ mScript->push(v);
+ mScript->execute();
+}