summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/beinghandler.cpp28
-rw-r--r--src/net/tmwa/beinghandler.h2
2 files changed, 30 insertions, 0 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 2a9b31c0f..a8fe157da 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -1589,4 +1589,32 @@ void BeingHandler::processPlaterStatusChange(Net::MessageIn &msg) const
BLOCK_END("BeingHandler::processPlayerStop")
}
+void BeingHandler::processBeingResurrect(Net::MessageIn &msg) const
+{
+ BLOCK_START("BeingHandler::processBeingResurrect")
+ if (!actorManager || !localPlayer)
+ {
+ BLOCK_END("BeingHandler::processBeingResurrect")
+ return;
+ }
+
+ // A being changed mortality status
+
+ const int id = msg.readInt32("being id");
+ Being *const dstBeing = actorManager->findBeing(id);
+ if (!dstBeing)
+ {
+ BLOCK_END("BeingHandler::processBeingResurrect")
+ return;
+ }
+
+ // If this is player's current target, clear it.
+ if (dstBeing == localPlayer->getTarget())
+ localPlayer->stopAttack();
+
+ if (msg.readUInt8("flag?") == 1U)
+ dstBeing->setAction(BeingAction::STAND, 0);
+ BLOCK_END("BeingHandler::processBeingResurrect")
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h
index f6bbcffae..2087b5c53 100644
--- a/src/net/tmwa/beinghandler.h
+++ b/src/net/tmwa/beinghandler.h
@@ -83,6 +83,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
void processPlaterStatusChange(Net::MessageIn &msg) const;
+ void processBeingResurrect(Net::MessageIn &msg) const;
+
static void setServerGender(Being *const being,
const uint8_t gender);