CMSG_REPORT_STUCK_IN_COMBAT, CMSG_GOSSIP_REFRESH_OPTIONS

This commit is contained in:
luis
2026-07-10 21:08:38 -03:00
parent e94e6baf07
commit 2ae478902e
6 changed files with 57 additions and 2 deletions
+14
View File
@@ -63,6 +63,9 @@
#include "ReferAFriendPackets.h"
#include "ReputationMgr.h"
//WowCommunity
#include "CombatManager.h"
//WowCommunity
void WorldSession::HandleRepopRequest(WorldPackets::Misc::RepopRequest& /*packet*/)
{
if (GetPlayer()->IsAlive() || GetPlayer()->HasPlayerFlag(PLAYER_FLAGS_GHOST))
@@ -1615,3 +1618,14 @@ void WorldSession::HandleToggleDifficulty(WorldPackets::Instance::ToggleDifficul
// Toggle difficulty is a simplified interface for switching between
// normal/heroic modes - not yet implemented
}
void WorldSession::HandleReportStuckInCombat(WorldPackets::Misc::ReportStuckInCombat& /*packet*/)
{
// The client reports it believes the player is wrongly stuck in combat. Re-validate the player's
// combat references and drop any that are no longer valid (dead / out of range / gone), which clears
// a desynced combat state without ending combat that is still legitimately ongoing.
if (!_player->IsInCombat())
return;
_player->GetCombatManager().RevalidateCombat();
}