/// <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)); }
/// <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); }
/// <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)); }
/// <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()); }
/// <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())); }