Add corpse direction indicator on minimap for ghost players

When the player is a ghost, shows a small X marker at the corpse
position on the minimap. If the corpse is off-screen, draws an edge
arrow on the minimap border pointing toward it.
This commit is contained in:
Kelsi 2026-03-11 23:19:48 -07:00
parent b3d3814ce9
commit fe61d6acce
2 changed files with 76 additions and 0 deletions

View file

@ -899,6 +899,14 @@ public:
float dz = movementInfo.z - corpseZ_;
return std::sqrt(dx*dx + dy*dy + dz*dz);
}
/** Corpse position in canonical WoW coords (X=north, Y=west).
* Returns false if no corpse data or on a different map. */
bool getCorpseCanonicalPos(float& outX, float& outY) const {
if (corpseMapId_ == 0 || currentMapId_ != corpseMapId_) return false;
outX = corpseY_; // server Y = canonical X (north)
outY = corpseX_; // server X = canonical Y (west)
return true;
}
/** Send CMSG_RECLAIM_CORPSE; noop if not a ghost or not near corpse. */
void reclaimCorpse();
void releaseSpirit();