public ItemStackTemplate(Asda2ItemId id, int amount) { this = new ItemStackTemplate(ItemMgr.GetTemplate(id), amount); if (m_Template == null) { throw new ArgumentException("id " + id + " is invalid."); } }
public ItemStackTemplate(Asda2ItemId id) { this = new ItemStackTemplate(ItemMgr.GetTemplate(id), 1); if (this.m_Template == null) { throw new ArgumentException("ItemId " + (object)id + " is invalid."); } }
/// <summary> /// Creates an array of LootItems from the given array of ItemStackDescriptions /// </summary> /// <param name="descs"></param> /// <returns></returns> public static LootItem[] Create(ItemStackTemplate[] descs) { var items = new LootItem[descs.Length]; for (uint i = 0; i < descs.Length; i++) { var desc = descs[i]; items[i] = new LootItem(desc.Template, desc.Amount, i, desc.Template.RandomPropertiesId); } return items; }
public NPCLoot(ILootable looted, uint money, ItemStackTemplate[] items) : base(looted, money, LootItem.Create(items)) { }
public ItemStackTemplate(ItemTemplate templ) { this = new ItemStackTemplate(templ, templ.MaxAmount); }