| 赞 | 3 |
| VIP | 0 |
| 好人卡 | 0 |
| 积分 | 46 |
| 经验 | 13328 |
| 最后登录 | 2026-3-29 |
| 在线时间 | 281 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 4647
- 在线时间
- 281 小时
- 注册时间
- 2013-10-13
- 帖子
- 852
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
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
# 添加空白 #(@item_max + @column_max - 1) / @column_max
# @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-1
draw_item(i)
end
end
end
把 @data.push(nil)注释掉,再加判断@item_max > 0,为什么装备物品栏中没数据了? |
|