Exemple #1
0
 public int getSlotNumber(ShopEntryInstance sei)
 {
     for (int i = 0; i < this.Inventory.Count; i++)
     {
         if (this.Inventory[i] == sei)
         {
             return(i + 1);
         }
     }
     return(-1);
 }
Exemple #2
0
 public void enforceInventoryLegality()
 {
     for (int i = this.Inventory.Count - 1; i >= 0; i--)
     {
         ShopEntryInstance item = this.Inventory[i];
         if (item.ShopEntry == null)
         {
             this.Inventory.Remove(item);
         }
         else if ((item.ShopEntry.Type == ShopEntryType.SpecialChest) && (item.PrerolledChestType == ChestType.NONE))
         {
             this.Inventory.Remove(item);
         }
         else if ((item.ShopEntry.Type == ShopEntryType.BossBundle) && !App.Binder.ConfigMeta.BOSS_POTIONS_ENABLED)
         {
             this.Inventory.Remove(item);
         }
     }
     if (this.Inventory.Count != App.Binder.ConfigMeta.VENDOR_INVENTORY_SIZE)
     {
         CmdRefreshVendorInventory.ExecuteStatic(this.Player, false);
     }
 }
Exemple #3
0
 public ShopEntryInstance(ShopEntryInstance another)
 {
     this.ShopEntryId = another.ShopEntryId;
     this.Sold        = another.Sold;
     this.postDeserializeInitialization();
 }