fix: query corpse position on ghost login for accurate minimap marker
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run

When logging in while already dead (reconnect/crash recovery), send
MSG_CORPSE_QUERY to get the server-authoritative corpse location.
Without this, the minimap corpse marker would be missing or point to
the wrong position after reconnecting as a ghost.
This commit is contained in:
Kelsi 2026-03-21 14:13:03 -07:00
parent 42222e4095
commit 3103662528

View file

@ -12050,6 +12050,11 @@ void GameHandler::applyUpdateObjectBlock(const UpdateBlock& block, bool& newItem
playerDead_ = true;
LOG_INFO("Player logged in as ghost (PLAYER_FLAGS)");
if (ghostStateCallback_) ghostStateCallback_(true);
// Query corpse position so minimap marker is accurate on reconnect
if (socket) {
network::Packet cq(wireOpcode(Opcode::MSG_CORPSE_QUERY));
socket->send(cq);
}
}
}
// Classic: rebuild playerAuras from UNIT_FIELD_AURAS on initial object create