diff options
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/beinghandler.cpp | 19 | ||||
-rw-r--r-- | src/net/ea/protocol.h | 1 |
2 files changed, 20 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()); diff --git a/src/net/ea/protocol.h b/src/net/ea/protocol.h index 0373dd8a..5362ab0c 100644 --- a/src/net/ea/protocol.h +++ b/src/net/ea/protocol.h @@ -86,6 +86,7 @@ static const int STORAGE_OFFSET = 1; #define SMSG_BEING_CHAT 0x008d /**< A being talks */ #define SMSG_BEING_NAME_RESPONSE 0x0095 /**< Has to be requested */ #define SMSG_BEING_CHANGE_DIRECTION 0x009c +#define SMSG_BEING_RESURRECT 0x0148 #define SMSG_PLAYER_STATUS_CHANGE 0x0119 #define SMSG_BEING_STATUS_CHANGE 0x0196 |