private int GetGroupIndex(ItemClass.Service service, Citizen.Gender gender, Citizen.SubCulture subCulture) { int num; if (subCulture != Citizen.SubCulture.Generic) { num = subCulture + 20 - Citizen.SubCulture.Hippie; } else { num = service - ItemClass.Service.Residential; } num = (int)(num * 2 + gender); return((int)(num * 14)); }
public ZombieInfo GetGroupZombieInfo(ref Randomizer r, ItemClass.Service service, Citizen.Gender gender, Citizen.SubCulture subCulture) { if (!this.m_citizensRefreshed) { CODebugBase <LogChannel> .Error(LogChannel.Core, "Random citizens not refreshed yet!"); return(null); } int num = this.GetGroupIndex(service, gender, subCulture); FastList <ushort> fastList = this.m_groupZombies[num]; if (fastList == null) { return(null); } if (fastList.m_size == 0) { return(null); } num = r.Int32((uint)fastList.m_size); return(PrefabCollection <ZombieInfo> .GetPrefab((uint)fastList.m_buffer[num])); }