diff options
Diffstat (limited to 'src/game/Map.cpp')
-rw-r--r-- | src/game/Map.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 04d7e028479..87bd6344c38 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -1419,13 +1419,6 @@ InstanceMap::~InstanceMap() */ bool InstanceMap::CanEnter(Player *player) { - if(!player->isGameMaster() && i_data && i_data->IsEncounterInProgress()) - { - sLog.outDebug("InstanceMap::CanEnter - Player '%s' can't enter instance '%s' while an encounter is in progress.", player->GetName(), GetMapName()); - player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT); - return false; - } - if(std::find(i_Players.begin(),i_Players.end(),player)!=i_Players.end()) { sLog.outError("InstanceMap::CanEnter - player %s(%u) already in map %d,%d,%d!", player->GetName(), player->GetGUIDLow(), GetId(), GetInstanceId(), GetSpawnMode()); @@ -1444,12 +1437,19 @@ bool InstanceMap::CanEnter(Player *player) // cannot enter while players in the instance are in combat Group *pGroup = player->GetGroup(); - if(pGroup && pGroup->InCombatToInstance(GetInstanceId()) && player->isAlive() && player->GetMapId() != GetId()) + if(!player->isGameMaster() && pGroup && pGroup->InCombatToInstance(GetInstanceId()) && player->isAlive() && player->GetMapId() != GetId()) { player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT); return false; } + /*if(!player->isGameMaster() && i_data && i_data->IsEncounterInProgress()) + { + sLog.outDebug("InstanceMap::CanEnter - Player '%s' can't enter instance '%s' while an encounter is in progress.", player->GetName(), GetMapName()); + player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT); + return false; + }*/ + return Map::CanEnter(player); } |