diff options
author | Dennis Friis <peavey@inspircd.org> | 2009-05-22 22:00:21 +0200 |
---|---|---|
committer | Dennis Friis <peavey@inspircd.org> | 2009-05-22 22:00:21 +0200 |
commit | 18c1876454c9a82b5f4949e863316055a41000ba (patch) | |
tree | 3d5e94aab468b946d407e444cbaa5e8125b78711 /src/net/ea | |
parent | a9df0306b4949f10287657a229e1f8d33cfae5e9 (diff) | |
download | mana-client-18c1876454c9a82b5f4949e863316055a41000ba.tar.gz mana-client-18c1876454c9a82b5f4949e863316055a41000ba.tar.bz2 mana-client-18c1876454c9a82b5f4949e863316055a41000ba.tar.xz mana-client-18c1876454c9a82b5f4949e863316055a41000ba.zip |
Add rudimentary support for forced revive on athena.
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 |