示例#1
0
        /// <summary>
        /// Processes the activity delta. (Forwards the data on to the relevant city)
        /// </summary>
        /// <param name="city">The city.</param>
        /// <param name="delta">The delta.</param>
        public static void ProcessActivityDelta(KinFactionCities city, KinFactionActivityTypes type)
        {
            KinCityData data = GetCityData(city);

            if (data == null)
            {
                return;
            }
            //log that shit
            Logging.ActivityGranular act = new Server.Engines.IOBSystem.Logging.ActivityGranular();
            act.ActivityType = type.ToString();
            act.City         = city.ToString();
            act.Kin          = data.ControlingKin.ToString();
            act.LogTime      = DateTime.Now;
            Logging.KinFactionLogs.Instance.AddEntityToSerialize(act);
            data.ProcessActivityDelta(GetActivityDeltaAmount(type));
        }
示例#2
0
        /// <summary>
        /// Returns the amount of slots assigned to this city when ownership transfers
        /// </summary>
        /// <returns></returns>
        public static int GetCityGuardPostSlots(KinFactionCities city)
        {
            int slots = KinSystemSettings.CityGuardSlots;

            //Default
            Type t = typeof(KinFactionCities);

            FieldInfo fi = t.GetField(city.ToString());

            foreach (KinFactionCityAttribute att in fi.GetCustomAttributes(typeof(KinFactionCityAttribute), true))
            {
                if (att.GuardSlots > 0)
                {
                    slots = att.GuardSlots;
                }
            }

            return(slots);
        }
示例#3
0
		/// <summary>
		/// Processes the activity delta. (Forwards the data on to the relevant city)
		/// </summary>
		/// <param name="city">The city.</param>
		/// <param name="delta">The delta.</param>
		public static void ProcessActivityDelta(KinFactionCities city, KinFactionActivityTypes type)
		{
			KinCityData data = GetCityData(city);
			if (data == null) return;
			//log that shit
			Logging.ActivityGranular act = new Server.Engines.IOBSystem.Logging.ActivityGranular();
			act.ActivityType = type.ToString();
			act.City = city.ToString();
			act.Kin = data.ControlingKin.ToString();
			act.LogTime = DateTime.Now;
			Logging.KinFactionLogs.Instance.AddEntityToSerialize(act);
			data.ProcessActivityDelta(GetActivityDeltaAmount(type));
		}
示例#4
0
		/// <summary>
		/// Gets the city spawners.
		/// </summary>
		/// <param name="city">The city.</param>
		/// <returns></returns>
		private static List<Spawner> GetCitySpawners(KinFactionCities city)
		{
			return SpawnerCache.GetSpawnersByRegion(city.ToString());
		}
示例#5
0
 /// <summary>
 /// Gets the city spawners.
 /// </summary>
 /// <param name="city">The city.</param>
 /// <returns></returns>
 private static List <Spawner> GetCitySpawners(KinFactionCities city)
 {
     return(SpawnerCache.GetSpawnersByRegion(city.ToString()));
 }