mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
* Merge public repo
--HG-- branch : trunk
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user