赞 | 1 |
VIP | 146 |
好人卡 | 13 |
积分 | 1 |
经验 | 26479 |
最后登录 | 2018-4-25 |
在线时间 | 5250 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 105
- 在线时间
- 5250 小时
- 注册时间
- 2011-10-7
- 帖子
- 1885
|
替换对应部分- #--------------------------------------------------------------------------
- # 更新物品窗口
- #--------------------------------------------------------------------------
- def update_item_window
- if Input.trigger?(Input::B)
- # 演奏取消 SE
- $game_system.se_play($data_system.cancel_se)
- @sorting_window.active = true
- @item_window.active = false
- @item_window.index = -1
- @help_window.set_text("")
- return
- end
- # 按下确定键
- if Input.trigger?(Input::C)
- # 获取物品数量
- $game_system.se_play($data_system.decision_se)
- if @item_window.item.is_a?(RPG::Item)
- if @action_window.index == 0
- i = $game_party.item_number(@item_window.item.id)
- else
- i = $game_party.get_warehouse(@item_window.item.id,"I")
- c = 99 - $game_party.item_number(@item_window.item.id)
- if c < i
- i = c
- end
- end
- elsif @item_window.item.is_a?(RPG::Weapon)
- if @action_window.index == 0
- i = $game_party.weapon_number(@item_window.item.id)
- else
- i = $game_party.get_warehouse(@item_window.item.id,"W")
- c = 99 - $game_party.weapon_number(@item_window.item.id)
- if c < i
- i = c
- end
- end
- else
- if @action_window.index == 0
- i = $game_party.armor_number(@item_window.item.id)
- else
- i = $game_party.get_warehouse(@item_window.item.id,"A")
- c = 99 - $game_party.armor_number(@item_window.item.id)
- if c < i
- i = c
- end
- end
- end
- @number_window.set(@item_window.item, i)
- @number_window.active = true
- @number_window.visible = true
- @item_window.active = false
- end
- @item_window.update
- if @action_window.index == 0
- @item_window.set_item(@sorting_window.commands[@sorting_window.index])
- elsif @action_window.index ==1
- @item_window.set_item_w(@sorting_window.commands[@sorting_window.index])
- end
-
- end
复制代码 |
|