Пример #1
0
        private uint AdjustRelaxChance(uint relaxChance, ref TCitizen citizen)
        {
            ushort visitBuilding = CitizenProxy.GetCurrentBuilding(ref citizen);

            if (BuildingMgr.GetBuildingSubService(visitBuilding) == ItemClass.SubService.BeautificationParks)
            {
                return(relaxChance * 2);
            }
            else if (CitizenProxy.GetAge(ref citizen) == Citizen.AgeGroup.Senior &&
                     BuildingMgr.IsBuildingServiceLevel(visitBuilding, ItemClass.Service.HealthCare, ItemClass.Level.Level3))
            {
                return(relaxChance * 4);
            }
            else
            {
                return(relaxChance);
            }
        }