fix(Core/Battlegrounds): don't block BG entry on a stale charm reference (#26487)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Andrew
2026-07-08 20:34:14 -03:00
committed by GitHub
parent 0f107f2cd4
commit edb3730f7a
2 changed files with 6 additions and 2 deletions
@@ -412,7 +412,9 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket& recvData)
return;
}
if (_player->GetCharmGUID() || _player->IsInCombat())
// GetCharm() validates the charmed unit still exists and clears a stale reference,
// unlike GetCharmGUID(); a despawned vehicle must not permanently block BG entry.
if (_player->GetCharm() || _player->IsInCombat())
{
ChatHandler(_player->GetSession()).SendNotification(LANG_YOU_IN_COMBAT);
return;