mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix resurrect: correct packet routing and show caster name in dialog
Two bugs fixed: 1. acceptResurrect() was always sending CMSG_SPIRIT_HEALER_ACTIVATE even for player-cast resurrections (Priest/Paladin/Druid). That opcode is only the correct response to SMSG_SPIRIT_HEALER_CONFIRM. For SMSG_RESURRECT_REQUEST the server expects CMSG_RESURRECT_RESPONSE with accept=1. Added resurrectIsSpiritHealer_ to track which path triggered the dialog and send the right packet per type. 2. The resurrect dialog showed a generic "Return to life?" string regardless of who cast the resurrection. Parse the optional CString name from SMSG_RESURRECT_REQUEST (or fall back to playerNameCache) and display "X wishes to resurrect you." when the caster is known.
This commit is contained in:
parent
ede380ec60
commit
c6e39707de
3 changed files with 39 additions and 10 deletions
|
|
@ -735,6 +735,7 @@ public:
|
|||
bool isPlayerGhost() const { return releasedSpirit_; }
|
||||
bool showDeathDialog() const { return playerDead_ && !releasedSpirit_; }
|
||||
bool showResurrectDialog() const { return resurrectRequestPending_; }
|
||||
const std::string& getResurrectCasterName() const { return resurrectCasterName_; }
|
||||
void releaseSpirit();
|
||||
void acceptResurrect();
|
||||
void declineResurrect();
|
||||
|
|
@ -2160,7 +2161,9 @@ private:
|
|||
uint64_t pendingSpiritHealerGuid_ = 0;
|
||||
bool resurrectPending_ = false;
|
||||
bool resurrectRequestPending_ = false;
|
||||
bool resurrectIsSpiritHealer_ = false; // true = SMSG_SPIRIT_HEALER_CONFIRM, false = SMSG_RESURRECT_REQUEST
|
||||
uint64_t resurrectCasterGuid_ = 0;
|
||||
std::string resurrectCasterName_;
|
||||
bool repopPending_ = false;
|
||||
uint64_t lastRepopRequestMs_ = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue