public static void Update() { try { if (IsDirty) { EffectTypes = EffectType.GetAllEffectTypes(); HeroBonuses = HeroBonus.GetAllHeroBonuses(); Traits = Trait.GetAllTraits(); TraitEffect.AddAllTraitEffectsToTraits(); AmmoTypes = AmmoType.GetAllAmmoTypes(); GunTypes = GunType.GetAllGunTypes(); Guns = Gun.GetAllGuns(); Items = Item.GetAllItems(); Maps = Map.GetAllMaps(); Sizes = Size.GetAllSizes(); Bases = Base.GetAllBases(); Facilities = Facility.GetAllFacilities(); MeleeTypes = MeleeType.GetAllMeleeTypes(); Melees = Melee.GetAllMelees(); PrebuiltFacilities = PrebuiltFacility.GetAllPrebuiltFacilities(); Mods = Mod.GetAllMods(); ModFiles = ModFile.GetAllModFiles(); AttachPrebuiltsToBases(); AttachFilesToMods(); IsDirty = false; } } catch (Exception ex) { NLog.LogManager.GetCurrentClassLogger().Error(ex, ex.Message + '\n' + ex.StackTrace); } }
public static Dictionary <int, MeleeType> GetAllMeleeTypes() { Dictionary <int, MeleeType> dicMeleeTypes = new Dictionary <int, MeleeType>(); DataTable dtMeleeTypes = MDatabaseUtilities.CreateDataTable("Select * from TMeleeTypes ", Hidden.ExternalConnection); foreach (DataRow drRow in dtMeleeTypes.Rows) { MeleeType clsNewMeleeType = new MeleeType { intID = (int)drRow["intMeleeTypeID"], strName = (string)drRow["strName"] }; dicMeleeTypes.Add(clsNewMeleeType.intID, clsNewMeleeType); } return(dicMeleeTypes); }