protected void FixedUpdate()
        {
            Player player = GameLogic.Binder.GameState.Player;

            if ((GameLogic.Binder.GameState.Player != null) && ((player.Vendor.Inventory.Count == 0) || (player.Vendor.getSecondsToNextVendorInventoryRefresh() <= 0L)))
            {
                CmdRefreshVendorInventory.ExecuteStatic(player, false);
            }
        }
 private void onRoomCompleted(Room room)
 {
     if ((room.ActiveDungeon.Floor + 1) == App.Binder.ConfigMeta.VENDOR_AND_SHOP_UNLOCK_FLOOR)
     {
         Player player = GameLogic.Binder.GameState.Player;
         if (!player.hasRetired())
         {
             CmdRefreshVendorInventory.ExecuteStatic(player, false);
         }
     }
 }
Exemple #3
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);
     }
 }