mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-04 22:07:52 +00:00
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:
@@ -2257,7 +2257,9 @@ namespace lfg
|
||||
{
|
||||
error = LFG_TELEPORTERROR_IN_VEHICLE;
|
||||
}
|
||||
else 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 the teleport.
|
||||
else if (player->GetCharm() || player->IsInCombat())
|
||||
{
|
||||
error = LFG_TELEPORTERROR_COMBAT;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user