赞 | 3 |
VIP | 10 |
好人卡 | 10 |
积分 | 1 |
经验 | 8718 |
最后登录 | 2018-1-10 |
在线时间 | 131 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 55
- 在线时间
- 131 小时
- 注册时间
- 2012-7-3
- 帖子
- 121
|
约第870行(我用的是Ver.1.0.3 不行再告诉我- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- actor = data_i(index)
- r = item_rect(index)
- e = enable_i?(index)
- hh = (r.height+32)/2
- draw_actor_graphic(actor, 20, r.y + hh, e)
- return if @item.nil? or [email protected]_a?(RPG::EquipItem)
- return unless equip_ok?(actor, @item.obj)
- prms = @item.obj.is_a?(RPG::Weapon) ? [2,4] : [3,5]
- equips = actor.equips.select { |a| a != nil }
- equips = equips.select { |a| a.etype_id == @item.obj.etype_id }
- r.y += r.height / 2 - line_height
- prms.each_index do |i|
- diff = diff_item_param(equips, prms[i])
- draw_item_diff(28, r.y+i*(line_height),diff, e, prms[i])
- end
- end
- #--------------------------------------------------------------------------
- # ● グラフィックの描画
- #--------------------------------------------------------------------------
- def draw_actor_graphic(actor, x, y, enble)
- return if actor == nil
- bitmap = Cache.character(actor.character_name)
- sign = actor.character_name[/^[\!\$]./]
- if sign != nil and sign.include?(')
- cw = bitmap.width / 3
- ch = bitmap.height / 4
- else
- cw = bitmap.width / 12
- ch = bitmap.height / 8
- end
- n = actor.character_index
- src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
- self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, enble ? 255 : translucent_alpha)
- end
- #--------------------------------------------------------------------------
- # ● アイテムパラメータ差分取得
- #--------------------------------------------------------------------------
- def diff_item_param(equips, prm)
- e_items = equips.sort { |a, b| b.params[prm] - a.params[prm] }
- new_prm = e_items.empty? ? 0 : e_items[0].params[prm]
- return @item.obj.params[prm] - new_prm
- end
- #--------------------------------------------------------------------------
- # ● 装備差分値の描画
- #--------------------------------------------------------------------------
- def draw_item_diff(x, y, change, able, prm)
- change_color(param_change_color(change), able)
- draw_text(x, y, contents_width-x-4, line_height, Vocab::param(prm)+sprintf("%+d",change), 2)
- end
- end
复制代码 |
评分
-
查看全部评分
|