summaryrefslogtreecommitdiff
path: root/src/game-server/state.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-01-17 12:54:20 +0100
committerPhilipp Sehmisch <crush@themanaworld.org>2009-01-17 12:54:20 +0100
commit2f28f585b12880d3cddab9d634fedff2f5954485 (patch)
tree370433972f687616fad54dfbe0ab11bda7db1aff /src/game-server/state.cpp
parentba6a9e534cfab2ecab6e120af4ab6ae11aee26c4 (diff)
parentd1b73b1195f8e8b2ad64ff692e7ddb17ed0bbad1 (diff)
downloadmanaserv-2f28f585b12880d3cddab9d634fedff2f5954485.tar.gz
manaserv-2f28f585b12880d3cddab9d634fedff2f5954485.tar.bz2
manaserv-2f28f585b12880d3cddab9d634fedff2f5954485.tar.xz
manaserv-2f28f585b12880d3cddab9d634fedff2f5954485.zip
Merge branch 'master' of git@gitorious.org:tmwserv/mainline
Diffstat (limited to 'src/game-server/state.cpp')
-rw-r--r--src/game-server/state.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game-server/state.cpp b/src/game-server/state.cpp
index a42c689f..8202f7ca 100644
--- a/src/game-server/state.cpp
+++ b/src/game-server/state.cpp
@@ -715,3 +715,15 @@ void GameState::sayTo(Object *destination, Object *source, std::string const &te
gameHandler->sendTo(static_cast< Character * >(destination), msg);
}
+
+void GameState::sayToAll(const std::string &text)
+{
+ MessageOut msg(GPMSG_SAY);
+
+ // message will show as from server
+ msg.writeShort(0);
+ msg.writeString(text);
+
+ // sends to everyone connected to the game server
+ gameHandler->sendToEveryone(msg);
+}