diff options
Diffstat (limited to 'src/net/manaserv/effecthandler.cpp')
-rw-r--r-- | src/net/manaserv/effecthandler.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/net/manaserv/effecthandler.cpp b/src/net/manaserv/effecthandler.cpp index d0aaf081..22d1f9cf 100644 --- a/src/net/manaserv/effecthandler.cpp +++ b/src/net/manaserv/effecthandler.cpp @@ -23,6 +23,7 @@ #include "actorspritemanager.h" #include "effectmanager.h" +#include "localplayer.h" #include "log.h" #include "gui/viewport.h" @@ -37,6 +38,7 @@ EffectHandler::EffectHandler() static const uint16_t _messages[] = { GPMSG_CREATE_EFFECT_POS, GPMSG_CREATE_EFFECT_BEING, + GPMSG_CREATE_TEXT_PARTICLE, GPMSG_SHAKE, 0 }; @@ -53,6 +55,9 @@ void EffectHandler::handleMessage(MessageIn &msg) case GPMSG_CREATE_EFFECT_BEING: handleCreateEffectBeing(msg); break; + case GPMSG_CREATE_TEXT_PARTICLE: + handleCreateTextParticle(msg); + break; case GPMSG_SHAKE: handleShake(msg); break; @@ -80,6 +85,13 @@ void EffectHandler::handleCreateEffectBeing(MessageIn &msg) logger->log("Warning: CreateEffect called for unknown being #%d", bid); } +void EffectHandler::handleCreateTextParticle(MessageIn &msg) +{ + const std::string &text = msg.readString(); + if (local_player) + local_player->addMessageToQueue(text); +} + void EffectHandler::handleShake(MessageIn &msg) { int16_t intensityX = 0; |