mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +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;
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace lfg
|
||||
LFG_TELEPORTERROR_IN_VEHICLE = 3,
|
||||
LFG_TELEPORTERROR_FATIGUE = 4,
|
||||
LFG_TELEPORTERROR_INVALID_LOCATION = 6,
|
||||
LFG_TELEPORTERROR_CHARMING = 8 // FIXME - It can be 7 or 8 (Need proper data)
|
||||
LFG_TELEPORTERROR_COMBAT = 8 // FIXME - It can be 7 or 8 (Need proper data)
|
||||
};
|
||||
|
||||
/// Queue join results
|
||||
|
||||
Reference in New Issue
Block a user