Implement corpse reclaim: store death position and show Resurrect button

When a player releases spirit, the server sends SMSG_DEATH_RELEASE_LOC
with the corpse map and position. Store this so the ghost can reclaim.

New flow:
- SMSG_DEATH_RELEASE_LOC now stores corpseMapId_/corpseX_/Y_/Z_ instead
  of logging and discarding
- canReclaimCorpse(): true when ghost is on same map within 40 yards of
  stored corpse position
- reclaimCorpse(): sends CMSG_RECLAIM_CORPSE (no payload)
- renderReclaimCorpseButton(): shows "Resurrect from Corpse" button at
  bottom-center when canReclaimCorpse() is true
This commit is contained in:
Kelsi 2026-03-09 22:31:56 -07:00
parent c6e39707de
commit c44477fbee
4 changed files with 61 additions and 6 deletions

View file

@ -736,6 +736,10 @@ public:
bool showDeathDialog() const { return playerDead_ && !releasedSpirit_; }
bool showResurrectDialog() const { return resurrectRequestPending_; }
const std::string& getResurrectCasterName() const { return resurrectCasterName_; }
/** True when ghost is within 40 yards of corpse position (same map). */
bool canReclaimCorpse() const;
/** Send CMSG_RECLAIM_CORPSE; noop if not a ghost or not near corpse. */
void reclaimCorpse();
void releaseSpirit();
void acceptResurrect();
void declineResurrect();
@ -2150,6 +2154,8 @@ private:
float serverPitchRate_ = 3.14159f;
bool playerDead_ = false;
bool releasedSpirit_ = false;
uint32_t corpseMapId_ = 0;
float corpseX_ = 0.0f, corpseY_ = 0.0f, corpseZ_ = 0.0f;
// Death Knight runes (class 6): slots 0-1=Blood, 2-3=Unholy, 4-5=Frost initially
std::array<RuneSlot, 6> playerRunes_ = [] {
std::array<RuneSlot, 6> r{};