public static void LoadAll() { if (Asda2ItemMgr.Loaded) { return; } ContentMgr.Load <ItemStatsInfo>(); ContentMgr.Load <RegularShopRecord>(); ContentMgr.Load <Asda2ItemTemplate>(); ContentMgr.Load <BoosterDrop>(); ContentMgr.Load <PackageDrop>(); ContentMgr.Load <DecompositionDrop>(); ContentMgr.Load <WarShopDataRecord>(); ContentMgr.Load <AvatarDisasembleRecord>(); ContentMgr.Load <Asda2BossSummonRecord>(); ContentMgr.Load <ItemCombineDataRecord>(); ContentMgr.Load <Asda2GuildWaveItemRecord>(); Asda2ItemMgr.OnLoaded(); foreach (Asda2ItemTemplate template in Asda2ItemMgr.Templates) { if (template != null) { template.InitializeTemplate(); } } Asda2ItemMgr.Loaded = true; }
public Asda2ItemStackTemplate(Asda2ItemId id, int amount) { this = new Asda2ItemStackTemplate(Asda2ItemMgr.GetTemplate(id), amount); if (m_Template == null) { throw new ArgumentException("id " + id + " is invalid."); } }
public Asda2ItemStackTemplate(Asda2ItemId id) : this(Asda2ItemMgr.GetTemplate(id), 1) { if (m_Template == null) { throw new ArgumentException("ItemId " + id + " is invalid."); } }
public Asda2ItemStackTemplate(Asda2ItemId id) { this = new Asda2ItemStackTemplate(Asda2ItemMgr.GetTemplate(id), 1); if (this.m_Template == null) { throw new ArgumentException("ItemId " + (object)id + " is invalid."); } }
public static void ForceInitialize() { if (Asda2ItemMgr.Loaded) { return; } Asda2ItemMgr.LoadAll(); }
public static int GetEnchantPrice(byte enchLevel, int itemLevel, Asda2ItemQuality rarity) { int startPrice = Asda2ItemMgr.GetStartPrice(itemLevel); int step = Asda2ItemMgr.GetStep(rarity); int num = startPrice; for (int index = 0; index < (int)enchLevel; ++index) { num += step * Asda2ItemMgr.GetMult(index + 1); } return(num); }
internal static void EnsureItemQuestRelations() { foreach (QuestTemplate template1 in QuestMgr.Templates) { if (template1 != null && template1.CollectableItems != null) { foreach (Asda2ItemStackDescription collectableItem in template1.CollectableItems) { Asda2ItemTemplate template2 = Asda2ItemMgr.GetTemplate(collectableItem.ItemId); if (template2 == null) { ContentMgr.OnInvalidDBData("QuestTemplate \"{0}\" refered to non-existing Item: {1}", (object)template1, (object)collectableItem); } else if (template2.CollectQuests == null) { template2.CollectQuests = new QuestTemplate[1] { template1 }; } else { int num = (int)ArrayUtil.AddOnlyOne <QuestTemplate>(ref template2.CollectQuests, template1); } } foreach (Asda2ItemStackDescription collectableSourceItem in template1.CollectableSourceItems) { Asda2ItemTemplate template2 = Asda2ItemMgr.GetTemplate(collectableSourceItem.ItemId); if (template2 == null) { ContentMgr.OnInvalidDBData("QuestTemplate \"{0}\" refered to non-existing Item: {1}", (object)template1, (object)collectableSourceItem); } else if (template2.CollectQuests == null) { template2.CollectQuests = new QuestTemplate[1] { template1 }; } else { int num = (int)ArrayUtil.AddOnlyOne <QuestTemplate>(ref template2.CollectQuests, template1); } } } } foreach (Asda2ItemTemplate template1 in Asda2ItemMgr.Templates) { if (template1 != null && template1.QuestId != 0U) { QuestTemplate template2 = QuestMgr.GetTemplate(template1.QuestId); if (template2 == null) { ContentMgr.OnInvalidDBData("Item {0} had invalid QuestId: {1}", (object)template1, (object)template1.QuestId); } else { template2.Starters.Add((IQuestHolderEntry)template1); } } } }
public static void Initialize() { Asda2ItemMgr.LoadAll(); Asda2CryptHelper.InitTransparations(); }