def equipable?(item)
# 武器的情况
if item.is_a?(RPG::Weapon)
# 包含当前的职业可以装备武器的场合
if $data_classes[@class_id].weapon_set.include?(item.id) and item.level.to_i<=@level
if item.str.to_i<= str and item.dex.to_i<= dex and item.agi.to_i<= agi and item.int.to_i<= int
return true
end
end
end
我想问一下,这一块的item参数是属于临时参数对吧。那么它在后面的if语句里面有个item.id的调用。但是这个item没有id这个方法啊?求解