*Implement access_requirement table - by Iskander
- now check the requirements on teleport not only on areatrigger use - moved some columns from instance_template and areatrigger_teleport to access_requirement table --HG-- branch : trunk
This commit is contained in:
1 parent
6a577295d9
commit
fd2fd00c14
16 files changed
+419
-165
No files matched your search
@@ -209,14 +209,12 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: move this to a map dependent location
|
||||
/*if(i_data && i_data->IsEncounterInProgress())
|
||||
{
|
||||
sLog.outDebug("MAP: 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 true;
|
||||
// Requirements
|
||||
InstanceTemplate const* instance = objmgr.GetInstanceTemplate(mapid);
|
||||
if(!instance)
|
||||
return false;
|
||||
|
||||
return player->Satisfy(objmgr.GetAccessRequirement(instance->access_id), mapid, true);
|
||||
}
|
||||
else
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user