Block access to instances if encounter is in progress only for raids (not for
5 player dungeons). Don't count GMs for instance full block --HG-- branch : trunk
This commit is contained in:
1 parent
7d8af67268
commit
334a6c4162
2 files changed
+11
-6
No files matched your search
@@ -252,7 +252,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
|
||||
}
|
||||
|
||||
//Encounters in progress
|
||||
if (((InstanceMap*)boundedMap)->GetInstanceData() && ((InstanceMap*)boundedMap)->GetInstanceData()->IsEncounterInProgress())
|
||||
if (entry->map_type == MAP_RAID && ((InstanceMap*)boundedMap)->GetInstanceData() && ((InstanceMap*)boundedMap)->GetInstanceData()->IsEncounterInProgress())
|
||||
{
|
||||
sLog.outDebug("MAP: Player '%s' can't enter instance '%s' while an encounter is in progress.", player->GetName(), mapName);
|
||||
player->SendTransferAborted(mapid, TRANSFER_ABORT_ZONE_IN_COMBAT);
|
||||
@@ -263,7 +263,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
|
||||
int8 maxPlayers = (player->GetDifficulty() == DIFFICULTY_HEROIC) ? instance->maxPlayersHeroic : instance->maxPlayers;
|
||||
if (maxPlayers != -1) //-1: unlimited access
|
||||
{
|
||||
if (boundedMap->GetPlayers().getSize() >= maxPlayers)
|
||||
if (boundedMap->GetPlayersCountExceptGMs() >= maxPlayers)
|
||||
{
|
||||
sLog.outDebug("MAP: Player '%s' can't enter instance '%s' because it's full.", player->GetName(), mapName);
|
||||
player->SendTransferAborted(mapid, TRANSFER_ABORT_MAX_PLAYERS);
|
||||
|
||||
Reference in new issue
Block a user