* Merge public repo

--HG--
branch : trunk
This commit is contained in:
Brian
2010-07-09 02:35:08 -06:00
2 changed files with 6 additions and 4 deletions

View File

@@ -2369,7 +2369,7 @@ bool InstanceMap::CanEnter(Player *player)
if (player->GetMapRef().getTarget() == this)
{
sLog.outError("InstanceMap::CanEnter - player %s(%u) already in map %d,%d,%d!", player->GetName(), player->GetGUIDLow(), GetId(), GetInstanceId(), GetSpawnMode());
//assert(false);
assert(false);
return false;
}

View File

@@ -931,11 +931,13 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
if (!at)
return;
if (!GetPlayer()->Satisfy(objmgr.GetAccessRequirement(at->access_id), at->target_mapId, true))
return;
// MapManager::CanPlayerEnter() calls players->Satisfy() so this is not needed here
// if (!GetPlayer()->Satisfy(objmgr.GetAccessRequirement(at->access_id), at->target_mapId, true))
// return;
// Check only if target map != current player's map
// check if player can enter instance : instance not full, and raid instance not in encounter fight
if (!sMapMgr.CanPlayerEnter(at->target_mapId, GetPlayer(), false))
if (GetPlayer()->GetMapId() != at->target_mapId && !sMapMgr.CanPlayerEnter(at->target_mapId, GetPlayer(), false))
return;
GetPlayer()->TeleportTo(at->target_mapId,at->target_X,at->target_Y,at->target_Z,at->target_Orientation,TELE_TO_NOT_LEAVE_TRANSPORT);