mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-17 09:14:34 +00:00
fix(Core/LFG): Prevent leaving LFG if in combat (#9466)
This commit is contained in:
@@ -2104,15 +2104,25 @@ namespace lfg
|
||||
LfgTeleportError error = LFG_TELEPORTERROR_OK;
|
||||
|
||||
if (!player->IsAlive())
|
||||
{
|
||||
error = LFG_TELEPORTERROR_PLAYER_DEAD;
|
||||
}
|
||||
else if (player->IsFalling() || player->HasUnitState(UNIT_STATE_JUMPING))
|
||||
{
|
||||
error = LFG_TELEPORTERROR_FALLING;
|
||||
}
|
||||
else if (player->IsMirrorTimerActive(FATIGUE_TIMER))
|
||||
{
|
||||
error = LFG_TELEPORTERROR_FATIGUE;
|
||||
}
|
||||
else if (player->GetVehicle())
|
||||
{
|
||||
error = LFG_TELEPORTERROR_IN_VEHICLE;
|
||||
else if (player->GetCharmGUID())
|
||||
error = LFG_TELEPORTERROR_CHARMING;
|
||||
}
|
||||
else if (player->GetCharmGUID() || player->IsInCombat())
|
||||
{
|
||||
error = LFG_TELEPORTERROR_COMBAT;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 mapid = dungeon->map;
|
||||
|
||||
Reference in New Issue
Block a user