| 
 
| 赞 | 0 |  
| VIP | 157 |  
| 好人卡 | 6 |  
| 积分 | 1 |  
| 经验 | 113829 |  
| 最后登录 | 2014-1-16 |  
| 在线时间 | 26 小时 |  
 Lv1.梦旅人 B 
	梦石0 星屑50 在线时间26 小时注册时间2007-8-26帖子3693 | 
| 复制代码class Window_Selectable < Window_Base
  attr_reader   :item_max
end
class Window_EquipItem < Window_Selectable
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    # 添加可以装备的武器
    if @equip_type == 0
      weapon_set = $data_classes[@actor.class_id].weapon_set
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
          @data.push($data_weapons[i])
        end
      end
    end
    # 添加可以装备的防具
    if @equip_type != 0
      armor_set = $data_classes[@actor.class_id].armor_set
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0 and armor_set.include?(i)
          if $data_armors[i].kind == @equip_type-1
            @data.push($data_armors[i])
          end
        end
      end
    end
    # 添加空白
    #@data.push(nil)
    # 生成位图、描绘全部项目
    @item_max = @data.size
    if @item_max > 0
    self.contents = Bitmap.new(width - 32, row_max * 32)
    for i in 0...@item_max
      draw_item(i)
    end
  end
end
end
class Scene_Equip
  alias one_update_right update_right 
  def update_right
    if Input.trigger?(Input::C)
      # 固定装备的情况下
      if @actor.equip_fix?(@right_window.index) or @item_window.item_max == 0
        # 演奏冻结 SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end    
    end
    one_update_right
  end
end
 | 
 |