mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
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:
parent
b3d3814ce9
commit
fe61d6acce
2 changed files with 76 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue