*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:
Blaymoira
2009-03-05 21:02:33 +01:00
parent 6a577295d9
commit fd2fd00c14
16 changed files with 419 additions and 165 deletions

View File

@@ -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;