查看: 1853|回复: 1

[已经过期] 装备扩张导致更换装备时候很卡,求助!

[复制链接]
梦石
0
星屑
632
在线时间
921 小时
注册时间
2013-3-13
回帖
503
发表于 2015-3-25 13:56:56 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 crow2006 于 2015-3-25 13:59 编辑

[pre lang="ruby"]class Scene_Equip < Scene_Base
def update_status_window
    if @equip_window.active
      @status_window.set_new_parameters(nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil)
    elsif @item_window.active
      temp_actor = Marshal.load(Marshal.dump(@actor)) #@actor.clone #
      temp_actor.change_equip(@equip_window.index, @item_window.item, true)
      new_atk = temp_actor.atk
      new_def = temp_actor.def
      new_spi = temp_actor.spi
      new_agi = temp_actor.agi
      new_hit = temp_actor.hit
      new_eva = temp_actor.eva
      new_cri = temp_actor.cri
      new_maxhp = temp_actor.maxhp
      new_maxmp = temp_actor.maxmp
      new_sx9  = temp_actor.sx9
      new_sx10 = temp_actor.sx10
      new_sx11 = temp_actor.sx11
      new_sx12 = temp_actor.sx12
      new_sx13 = temp_actor.sx13
      new_sx14 = temp_actor.sx14
      new_sx15 = temp_actor.sx15
      new_sx16 = temp_actor.sx16
      new_sx17 = temp_actor.sx17
      new_sx18 = temp_actor.sx18
      new_sx19 = temp_actor.sx19
      new_sx20 = temp_actor.sx20
      new_sx21 = temp_actor.sx21
      new_sx22 = temp_actor.sx22
      new_sx23 = temp_actor.sx23
      new_sx24 = temp_actor.sx24
      new_sx25 = temp_actor.sx25
      new_sx26 = temp_actor.sx26
      new_sx27 = temp_actor.sx27
      new_sx28 = temp_actor.sx28
      new_sx29 = temp_actor.sx29
      new_sx30 = temp_actor.sx30
      @status_window.set_new_parameters(new_atk, new_def, new_spi, new_agi, new_maxhp, new_maxmp, new_hit, new_eva, new_cri, new_sx9,new_sx10, new_sx11, new_sx12, new_sx13, new_sx14, new_sx15, new_sx16, new_sx17, new_sx18, new_sx19, new_sx20, new_sx21, new_sx22, new_sx23, new_sx24, new_sx25, new_sx26, new_sx27, new_sx28, new_sx29, new_sx30)
    end
    @status_window.update
  end
end[/pre]

卡的原因就在这句:temp_actor = Marshal.load(Marshal.dump(@actor))
如果改成          temp_actor = @actor.clone
虽然不再卡,但是会产生穿上的装备仍然留在包裹中不消失的BUG。
求助。

…あたしは天

梦石
0
星屑
2308
在线时间
4033 小时
注册时间
2010-10-4
回帖
10548

开拓者贵宾

发表于 2015-3-26 17:27:35 来自手机 | 显示全部楼层
仅在数据发生变化时读取数据并刷新。

点评

我没有VX,我也不知道  发表于 2015-3-28 09:57
求教。。。不知道写在哪儿  发表于 2015-3-28 09:19
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部