public uint[] GetRequiredBuildings(uint id) { if (Unit_To_RequiredBuildings.TryGetValue(id, out var result)) { return(result); } return(new uint[0]); }
public IEnumerable <UnitTypeData> GetRequiredBuildings(UnitTypeData unit) { if (Unit_To_RequiredBuildings.TryGetValue(unit.UnitId, out var ids)) { return(ids.Select(i => unitTypeRepository.Get(i))); } return(Enumerable.Empty <UnitTypeData>()); }