设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索

怪物图鉴和新获得道具提示脚本冲突求教怎么改

查看数: 2879 | 评论数: 1 | 收藏 1
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2019-7-4 19:40

正文摘要:

附件是范例工程 这是新获得道具提示脚本 RUBY 代码复制#===============================================================================# ■ 新获得道具提示# by :VIPArcher [em ...

回复

百里_飞柳 发表于 2019-7-4 19:40:27
本帖最后由 百里_飞柳 于 2019-7-5 14:31 编辑

因为怪物图鉴中的敌人列表,借用了物品列表……
获得道具提示中的45~46行之间加一句判定,
一次性解决任何其他可能的借用
  1.   #--------------------------------------------------------------------------
  2.   # ● 移除新道具
  3.   #--------------------------------------------------------------------------
  4.   def remove_new_icon(item)
  5.     return unless item
  6.     return if @new_icon_list.nil? || @new_icon_list[item.class].nil? # 新增
  7.     @new_icon_list[item.class].delete(item.id)
  8.   end
复制代码

点评

打错了……应该是 return if @new_icon_list.nil? || @new_icon_list[item.class].nil?  发表于 2019-7-5 14:31
return if @new_icon_list.nil? || [item.class].nil? # 新增  发表于 2019-7-5 14:30
试了一下加入了这一句还是会报错呀~  发表于 2019-7-5 11:54
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-7-18 13:36

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表