| 赞 | 2  | 
 
| VIP | 0 | 
 
| 好人卡 | 0 | 
 
| 积分 | 28 | 
 
| 经验 | 11644 | 
 
| 最后登录 | 2025-10-31 | 
 
| 在线时间 | 654 小时 | 
 
 
 
 
 
Lv3.寻梦者 
	- 梦石
 - 0 
 
        - 星屑
 - 2769 
 
        - 在线时间
 - 654 小时
 
        - 注册时间
 - 2012-5-3
 
        - 帖子
 - 107
 
 
  
 
 | 
	
9楼
 
 
 楼主 |
发表于 2015-5-1 23:13:20
|
只看该作者
 
 
 
芯☆淡茹水 发表于 2015-4-28 22:32 ![]()  
最靠近 main 的那个类里修改。  
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这个方法啊?求解 |   
 
 
 
 |