diff options
Diffstat (limited to 'src/net/ea/beinghandler.cpp')
-rw-r--r-- | src/net/ea/beinghandler.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index 34a0d70a..f149f15f 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -65,6 +65,7 @@ BeingHandler::BeingHandler(bool enableSync): SMSG_PLAYER_MOVE_TO_ATTACK, SMSG_PLAYER_STATUS_CHANGE, SMSG_BEING_STATUS_CHANGE, + SMSG_BEING_RESURRECT, 0 }; handledMessages = _messages; @@ -260,6 +261,24 @@ void BeingHandler::handleMessage(MessageIn &msg) break; + case SMSG_BEING_RESURRECT: + // A being changed mortality status + id = msg.readInt32(); + + dstBeing = beingManager->findBeing(id); + + if (!dstBeing) + break; + + // If this is player's current target, clear it. + if (dstBeing == player_node->getTarget()) + player_node->stopAttack(); + + if (msg.readInt8() == 1) + dstBeing->setAction(Being::STAND); + + break; + case SMSG_BEING_ACTION: srcBeing = beingManager->findBeing(msg.readInt32()); dstBeing = beingManager->findBeing(msg.readInt32()); |