mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[11783] Let scripting library decide if an encounter is in progress in instances
Replace wrong Group::InCombatToInstance check, this was preventing entering when any member is in any combat. Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
7c49e4afb6
commit
aa40cf687f
2 changed files with 3 additions and 4 deletions
|
|
@ -1261,9 +1261,8 @@ bool DungeonMap::CanEnter(Player *player)
|
|||
return false;
|
||||
}
|
||||
|
||||
// cannot enter while players in the instance are in combat
|
||||
Group *pGroup = player->GetGroup();
|
||||
if(pGroup && pGroup->InCombatToInstance(GetInstanceId()) && player->isAlive() && player->GetMapId() != GetId())
|
||||
// cannot enter while an encounter in the instance is in progress
|
||||
if (!player->isGameMaster() && GetInstanceData() && GetInstanceData()->IsEncounterInProgress() && player->GetMapId() != GetId())
|
||||
{
|
||||
player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT);
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue