[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:
Schmoozerd 2011-09-03 15:59:36 +02:00
parent 7c49e4afb6
commit aa40cf687f
2 changed files with 3 additions and 4 deletions

View file

@ -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;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11782"
#define REVISION_NR "11783"
#endif // __REVISION_NR_H__