private static T LoadDelayedConfig <T>(ConfigDatabase cfgDB) where T : Configuration, new() { string str; if (delayLoadFileDel == null) { return(default(T)); } int fileFormat = 0; IFileLoader fileLoader = delayLoadFileDel(typeof(T), out str, out fileFormat); return(LoadConfig <T>(cfgDB, fileLoader, fileFormat, str)); }
public static string GetDisplayNameByType(int type, ConfigDatabase cfgDB) { if (cfgDB.StringsConfig != null) { foreach (KeyValuePair <string, KeyValuePair <int, string> > pair in TypeNameContainer <Type> .container) { if (pair.Value.Key == type) { return(cfgDB.StringsConfig.GetString(TypeNameContainer <Type> .textSectionName, pair.Value.Value)); } } } return(""); }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (Position position in this._positions) { if (this.dic_Positions.ContainsKey(position.Id)) { Logger.Error(base.GetType().Name + " ContainsKey 0x" + position.Id.ToString("X8"), new object[0]); } else { this.dic_Positions.Add(position.Id, position); } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (Domineer domineer in this._domineers) { if (this.dic_domineer.ContainsKey(domineer.DomineerId)) { Logger.Error(base.GetType().Name + " Contains 0x" + domineer.DomineerId.ToString("X8"), new object[0]); } else { this.dic_domineer.Add(domineer.DomineerId, domineer); } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (Illustration illustration in this._illustrations) { if (!this.illustrationMap.ContainsKey(illustration.Id)) { this.illustrationMap.Add(illustration.Id, illustration); } if (!this.dic_fragments.ContainsKey(illustration.FragmentId)) { this.dic_fragments.Add(illustration.FragmentId, illustration); } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (Good good in this._goods) { if (good != null) { if (this.id_goodMap.ContainsKey(good.id)) { Logger.Error(base.GetType().Name + " ContainsKey 0x" + good.id.ToString("X"), new object[0]); } else { this.id_goodMap.Add(good.id, good); if (good.groupId != 0) { List <Good> list = null; if (!this.groupId_goodMap.TryGetValue(good.groupId, out list)) { list = new List <Good> { good }; this.groupId_goodMap.Add(good.groupId, list); } else { list.Add(good); } } } } } foreach (AssetGood good2 in this._assetGoods) { if (good2 != null) { if (this.assetGoodMap.ContainsKey(good2.assetId)) { Logger.Error(base.GetType().Name + " ContainsKey 0x" + good2.assetId.ToString("X"), new object[0]); } else { this.assetGoodMap.Add(good2.assetId, good2.goodId); } } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (UpgradeReward reward in this.upgradeRewards) { if (reward != null) { if (this.id_upgradeReward.ContainsKey(reward.id)) { Logger.Error(base.GetType().Name + " ContainsKey 0x" + reward.id.ToString("X"), new object[0]); } else { this.id_upgradeReward.Add(reward.id, reward); } } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (FileInfo info in this._fileInfos) { if (info != null) { if (this._name_fileDict.ContainsKey(info.assetName)) { Logger.Error(base.GetType().Name + " ContainsKey " + info.assetName, new object[0]); } else { this._name_fileDict.Add(info.assetName, info); } } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (DialogueSet set in this._dialogueSets) { if (set != null) { if (this._id_DialogueSet.ContainsKey(set.dialogueSetId)) { Logger.Error(base.GetType().Name + " ContainsKey 0x" + set.dialogueSetId.ToString("X"), new object[0]); } else { this._id_DialogueSet.Add(set.dialogueSetId, set); } } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (Item item in this._items) { if (item != null) { if (this.id_itemMap.ContainsKey(item.id)) { Logger.Error(base.GetType().Name + " ContainsKey 0x" + item.id.ToString("X"), new object[0]); } else { this.id_itemMap.Add(item.id, item); } } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (Npc npc in this._npcs) { if (npc != null) { if (this.id_npcMap.ContainsKey(npc.id)) { Logger.Error(base.GetType().Name + " ContainsKey 0x" + npc.id.ToString("X"), new object[0]); } else { this.id_npcMap.Add(npc.id, npc); } } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (MonthReward reward in this._monthRewards) { if (reward != null) { if (this.monthRewardMap.ContainsKey(reward.month)) { Logger.Error(base.GetType().Name + " ContainsKey " + reward.month.ToString(), new object[0]); } else { this.monthRewardMap.Add(reward.month, reward); } } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (Skill skill in this._skills) { if (skill != null) { if (this.id_skillMap.ContainsKey(skill.id)) { Logger.Error(base.GetType().Name + " ContainsKey 0x" + skill.id.ToString("X"), new object[0]); } else { this.id_skillMap.Add(skill.id, skill); } } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (Tavern tavern in this._taverns) { if (tavern != null) { if (this.id_tavernMap.ContainsKey(tavern.Id)) { Logger.Error(base.GetType().Name + " ContainsKey 0x" + tavern.Id.ToString("X"), new object[0]); } else { this.id_tavernMap.Add(tavern.Id, tavern); } } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (Quest quest in this._quests) { if (quest != null) { if (this.id_questMap.ContainsKey(quest.questId)) { Logger.Error(base.GetType().Name + " ContainsKey 0x" + quest.questId.ToString("X"), new object[0]); } else { this.id_questMap.Add(quest.questId, quest); } } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (Vip vip in this._vipList) { if (vip != null) { if (this.id_vipMap.ContainsKey(vip.id)) { Logger.Error(base.GetType().Name + " ContainsKey 0x" + vip.id.ToString("X"), new object[0]); } else if (vip.vipLimitCount != null) { this.id_vipMap.Add(vip.id, vip); } } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (GuildPrivateGoods goods in this._goods) { if (goods != null) { if (this.goodsMap.ContainsKey(goods.GoodsId)) { Logger.Error(base.GetType().Name + " ContainsKey " + goods.GoodsId.ToString(), new object[0]); } else { this.goodsMap.Add(goods.GoodsId, goods); } } } }
public static T LoadConfig <T>(ConfigDatabase cfgDB, IFileLoader fileLoader, int fileFormat, string filePath) where T : Configuration, new() { T local = default(T); switch (fileFormat) { case 1: local = Activator.CreateInstance <T>(); local.LoadFromXml(fileLoader.LoadAsXML(filePath)); break; case 2: local = (T)DataSerializer.Deserialize(fileLoader.LoadAsSteam(filePath), typeof(T)); break; } if (local != null) { local.ConstructLogicData(cfgDB, fileFormat); } return(local); }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (SellGeneralReward reward in this.sellGeneralRewards) { this.level_sellGeneralRewardMap.Add(reward.level, reward); } foreach (Equipment equipment in this._equipments) { if (equipment != null) { if (this.id_equipMap.ContainsKey(equipment.id)) { Logger.Error(base.GetType().Name + " ContainsKey 0x" + equipment.id.ToString("X"), new object[0]); } else { foreach (EquipBreakthrough breakthrough in equipment.equipBreakthroughs) { foreach (GrowthAttribute attribute in equipment.equipBreakthroughs[0].baseGrowthAttributes) { for (int i = 0; i < breakthrough.breakThrough.growthAttributes.Count; i++) { GrowthAttribute attribute2 = breakthrough.breakThrough.growthAttributes[i]; if (attribute.type == attribute2.type) { break; } if (i == (breakthrough.breakThrough.growthAttributes.Count - 1)) { breakthrough.breakThrough.growthAttributes.Add(attribute); } } } } this.id_equipMap.Add(equipment.id, equipment); } } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); for (int i = 0; i < this.animations.Count; i++) { Animation animation = this.animations[i]; foreach (Event event2 in animation.events) { if (event2 != null) { if (animation.id_EventMap.ContainsKey(event2.id)) { Logger.Error(base.GetType().Name + " ContainsKey 0x" + event2.id.ToString("X"), new object[0]); } else { animation.id_EventMap.Add(event2.id, event2); } } } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (SellGeneralReward reward in this.sellGeneralRewards) { this.level_sellGeneralRewardMap.Add(reward.level, reward); } for (int i = 0; i < this._avatars.Count; i++) { Avatar avatar = this._avatars[i]; if (this.id_avatarDict.ContainsKey(avatar.id)) { Logger.Error(string.Format("Duplicate avatar Id : {0:X}", avatar.id), new object[0]); } else { foreach (AvatarBreakthrough breakthrough in avatar.breakThroughs) { foreach (GrowthAttribute attribute in avatar.breakThroughs[0].baseGrowthAttributes) { for (int j = 0; j < breakthrough.breakThrough.growthAttributes.Count; j++) { GrowthAttribute attribute2 = breakthrough.breakThrough.growthAttributes[j]; if (attribute.type == attribute2.type) { break; } if (j == (breakthrough.breakThrough.growthAttributes.Count - 1)) { breakthrough.breakThrough.growthAttributes.Add(attribute); } } } } this.id_avatarDict.Add(avatar.id, avatar); } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (AssetDescSet set in this.assetDescSets) { if (set != null) { foreach (AssetDesc desc in set.assetDescs) { if (desc != null) { if (this.id_assetDescMap.ContainsKey(desc.id)) { Logger.Error(base.GetType().Name + " ContainsKey 0x" + desc.id.ToString("X"), new object[0]); } else { this.id_assetDescMap.Add(desc.id, desc); } } } } } foreach (CombineSetting setting in this._combineSettings) { if (setting != null) { if (this.output_CombineSettingMap.ContainsKey(setting.outputIcon)) { Logger.Error(base.GetType().Name + " ContainsKey " + setting.outputIcon, new object[0]); } else { this.output_CombineSettingMap.Add(setting.outputIcon, setting); } } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); this.maxConfigedFloorLayer = 0; foreach (Floor floor in this._floors) { if (floor != null) { if (this.floorMap.ContainsKey(floor.Layer)) { Logger.Error(base.GetType().Name + " ContainsKey " + floor.Layer.ToString(), new object[0]); } else { if (floor.Layer > this.maxConfigedFloorLayer) { this.maxConfigedFloorLayer = floor.Layer; } this.floorMap.Add(floor.Layer, floor); } } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (DinerBag bag in this.DinerBags) { if (!this.dic_dinerBags.ContainsKey(bag.QualityType)) { this.dic_dinerBags.Add(bag.QualityType, new List <DinerBag>()); } this.dic_bags.Add(bag.BagId, bag); this.dic_dinerBags[bag.QualityType].Add(bag); } foreach (Diner diner in this.Diners) { if (this.dic_diners.ContainsKey(diner.DinerId)) { Logger.Error(base.GetType().Name + " ContainsDinerId 0x" + diner.DinerId.ToString("X"), new object[0]); } else { this.dic_diners.Add(diner.DinerId, diner); } } }
public override void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { base.ConstructLogicData(cfgDB, fileFormat); foreach (Shop shop in this._shopSet) { if (shop != null) { if (this.shopMap.ContainsKey(shop.shopType)) { Logger.Error(base.GetType().Name + " ContainsShopType 0x" + shop.shopType.ToString(), new object[0]); } else { this.shopMap.Add(shop.shopType, shop); foreach (Refresh refresh in shop.refreshSet) { if (refresh != null) { if (shop.GetRefreshMap().ContainsKey(refresh.refreshId)) { Logger.Error(base.GetType().Name + " ContainsKey RefreshId 0x" + refresh.refreshId.ToString("X"), new object[0]); } else { shop.GetRefreshMap().Add(refresh.refreshId, refresh); foreach (Counter counter in refresh.counters) { if (counter != null) { if (shop.GetCounterMap().ContainsKey(counter.counterId)) { Logger.Error(base.GetType().Name + " ContainsKey CounterId 0x" + counter.counterId.ToString("X"), new object[0]); } else { shop.GetCounterMap().Add(counter.counterId, counter); } } } } } } foreach (Goods goods in shop.goodsSet) { if (goods != null) { if (shop.GetGoodsMap().ContainsKey(goods.goodsId)) { Logger.Error(base.GetType().Name + " ContainsKey GoodsId 0x" + goods.goodsId.ToString("X"), new object[0]); } else { shop.GetGoodsMap().Add(goods.goodsId, goods); } } } foreach (CardPack pack in shop.cardPackSet) { if (pack != null) { if (shop.GetCardPackMap().ContainsKey(pack.cardPackId)) { Logger.Error(base.GetType().Name + " ContainsKey CardPackId 0x" + pack.cardPackId.ToString("X"), new object[0]); } else { shop.GetCardPackMap().Add(pack.cardPackId, pack); } } } } } } }
public virtual void ConstructLogicData(ConfigDatabase cfgDB, int fileFormat) { this.cfgDB = cfgDB; }