fix(Core/LFG): Prevent leaving LFG if in combat (#9466)
This commit is contained in:
parent
d6e8697efe
commit
09a087aed8
2 changed files with 13 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue