summaryrefslogtreecommitdiff
path: root/src/net/beinghandler.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2008-10-12 06:39:34 +0000
committerIra Rice <irarice@gmail.com>2008-10-12 06:39:34 +0000
commit9f5f8e5c6579f3ecc7a6c245e063d5f2d96c62ff (patch)
tree5d6ff477702930af474e2e49f860b47c7f8505fb /src/net/beinghandler.cpp
parentd5736cdc5700994520a53fdd560fd7ea946f6e63 (diff)
downloadmana-9f5f8e5c6579f3ecc7a6c245e063d5f2d96c62ff.tar.gz
mana-9f5f8e5c6579f3ecc7a6c245e063d5f2d96c62ff.tar.bz2
mana-9f5f8e5c6579f3ecc7a6c245e063d5f2d96c62ff.tar.xz
mana-9f5f8e5c6579f3ecc7a6c245e063d5f2d96c62ff.zip
This commit contains three things: one, after looking over how TMW was
handling the effects through the level up system, I determined that it wasn't bad, so I pulled it from TMW's SVN. Two, I edited the web page css so that it better matches the forum. And three, I patched text wrapping so that it'll fix up its display size based on all previous lines, except for the last line. That fix will come later, but for now, it'll be seen as a special case. While you'd like to think that just resending the string and starting the function over again would fix it, you'd be wrong. So it won't be patched until I think of a better way to handle that case.
Diffstat (limited to 'src/net/beinghandler.cpp')
-rw-r--r--src/net/beinghandler.cpp28
1 files changed, 9 insertions, 19 deletions
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp
index 87e4c8a4..baca0cfc 100644
--- a/src/net/beinghandler.cpp
+++ b/src/net/beinghandler.cpp
@@ -51,7 +51,7 @@ BeingHandler::BeingHandler(bool enableSync):
SMSG_BEING_MOVE2,
SMSG_BEING_REMOVE,
SMSG_BEING_ACTION,
- SMSG_BEING_LEVELUP,
+ SMSG_BEING_SELFEFFECT,
SMSG_BEING_EMOTION,
SMSG_BEING_CHANGE_LOOKS,
SMSG_BEING_CHANGE_LOOKS2,
@@ -263,27 +263,17 @@ void BeingHandler::handleMessage(MessageIn *msg)
}
break;
- case SMSG_BEING_LEVELUP:
+ case SMSG_BEING_SELFEFFECT: {
id = (Uint32)msg->readInt32();
+ if (!beingManager->findBeing(id))
+ break;
+
+ int effectType = msg->readInt32();
+
+ beingManager->findBeing(id)->triggerEffect(effectType);
- if (id == player_node->getId()) {
- logger->log("Level up");
- sound.playSfx("sfx/levelup.ogg");
- }
- else {
- logger->log("Someone else went level up");
- }
- Particle *levelupFX;
- if (msg->readInt32() == 0) { // type
- levelupFX = particleEngine->addEffect(
- "graphics/particles/levelup.particle.xml", 0, 0);
- }
- else {
- levelupFX = particleEngine->addEffect(
- "graphics/particles/skillup.particle.xml", 0, 0);
- }
- beingManager->findBeing(id)->controlParticle(levelupFX);
break;
+ }
case SMSG_BEING_EMOTION:
if (!(dstBeing = beingManager->findBeing(msg->readInt32())))