Refine resurrection flow

This commit is contained in:
Kelsi 2026-02-07 21:47:14 -08:00
parent ca867f5c83
commit 4a8a78c50d
7 changed files with 120 additions and 20 deletions

View file

@ -197,6 +197,10 @@ public:
uint32_t getUnitFlags() const { return unitFlags; }
void setUnitFlags(uint32_t f) { unitFlags = f; }
// Dynamic flags (UNIT_DYNAMIC_FLAGS, index 147)
uint32_t getDynamicFlags() const { return dynamicFlags; }
void setDynamicFlags(uint32_t f) { dynamicFlags = f; }
// NPC flags (UNIT_NPC_FLAGS, index 82)
uint32_t getNpcFlags() const { return npcFlags; }
void setNpcFlags(uint32_t f) { npcFlags = f; }
@ -222,6 +226,7 @@ protected:
uint32_t displayId = 0;
uint32_t mountDisplayId = 0;
uint32_t unitFlags = 0;
uint32_t dynamicFlags = 0;
uint32_t npcFlags = 0;
uint32_t factionTemplate = 0;
bool hostile = false;

View file

@ -912,6 +912,10 @@ private:
float preMountRunSpeed_ = 0.0f;
float serverRunSpeed_ = 7.0f;
bool playerDead_ = false;
uint64_t pendingSpiritHealerGuid_ = 0;
bool resurrectPending_ = false;
bool repopPending_ = false;
uint64_t lastRepopRequestMs_ = 0;
};
} // namespace game

View file

@ -242,7 +242,10 @@ enum class Opcode : uint16_t {
// ---- Death/Respawn ----
CMSG_REPOP_REQUEST = 0x015A,
CMSG_SPIRIT_HEALER_ACTIVATE = 0x0176,
SMSG_SPIRIT_HEALER_CONFIRM = 0x0222,
SMSG_RESURRECT_REQUEST = 0x0222,
CMSG_RESURRECT_RESPONSE = 0x0223,
SMSG_RESURRECT_RESULT = 0x029D,
SMSG_RESURRECT_CANCEL = 0x0390,
// ---- Teleport / Transfer ----
MSG_MOVE_TELEPORT_ACK = 0x0C7,

View file

@ -1727,5 +1727,11 @@ public:
static network::Packet build(uint64_t npcGuid);
};
/** CMSG_RESURRECT_RESPONSE packet builder */
class ResurrectResponsePacket {
public:
static network::Packet build(uint64_t casterGuid, bool accept);
};
} // namespace game
} // namespace wowee