mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: track PvP corpse-reclaim delay and show countdown in UI
SMSG_CORPSE_RECLAIM_DELAY is now stored as an absolute expiry timestamp (steady_clock ms) instead of being discarded after a chat message. GameHandler::getCorpseReclaimDelaySec() returns remaining seconds (0 when reclaim is available). The "Resurrect from Corpse" button now: - Disables and shows the remaining seconds when a PvP delay is active - Shows the usual "Corpse: N yards" helper text when available Also resets corpseReclaimAvailableMs_ on world/session teardown.
This commit is contained in:
parent
2acab47eee
commit
b0046fa777
3 changed files with 55 additions and 19 deletions
|
|
@ -1183,6 +1183,8 @@ public:
|
|||
void cancelPetUnlearn() { petUnlearnPending_ = false; }
|
||||
/** True when ghost is within 40 yards of corpse position (same map). */
|
||||
bool canReclaimCorpse() const;
|
||||
/** Seconds remaining on the PvP corpse-reclaim delay, or 0 if the reclaim is available now. */
|
||||
float getCorpseReclaimDelaySec() const;
|
||||
/** Distance (yards) from ghost to corpse, or -1 if no corpse data. */
|
||||
float getCorpseDistance() const {
|
||||
if (corpseMapId_ == 0 || currentMapId_ != corpseMapId_) return -1.0f;
|
||||
|
|
@ -3298,6 +3300,9 @@ private:
|
|||
uint32_t corpseMapId_ = 0;
|
||||
float corpseX_ = 0.0f, corpseY_ = 0.0f, corpseZ_ = 0.0f;
|
||||
uint64_t corpseGuid_ = 0;
|
||||
// Absolute time (ms since epoch) when PvP corpse-reclaim delay expires.
|
||||
// 0 means no active delay (reclaim allowed immediately upon proximity).
|
||||
uint64_t corpseReclaimAvailableMs_ = 0;
|
||||
// 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{};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue