施法队列相关

Viewed 89

战斗日志提示施法队列中有一次释放失败,到下一次释放有一百到几百毫秒延迟,这个时间是必须的还是没有充分调试?

如果把下面例子中的 11:23:35.866 SPELL_CAST_FAILED调整到下一毫秒,是不是可以把时间压缩的更短?

10/16 11:23:35.866 SPELL_CAST_SUCCESS,Player-1-0000F4EF,"娜玛拉-",0x511,0x0,Creature-0-1-0-0-20284-0000011979,"砰砰博士",0x10a48,0x0,32231,"烧尽",0x4,0000000000000000,0000000000000000,0,0,0,0,0,-1,0,0,0,0.00,0.00,1953,0.0000,0
10/16 11:23:35.866 SPELL_CAST_FAILED,Player-1-0000F4EF,"娜玛拉-",0x511,0x0,0000000000000000,nil,0x80000000,0x80000000,32231,"烧尽",0x4,"另外一个动作正在进行中"
10/16 11:23:35.967 SPELL_CAST_START,Player-1-0000F4EF,"娜玛拉-",0x511,0x0,0000000000000000,nil,0x80000000,0x80000000,32231,"烧尽",0x4

上面这个例子是开启了Advanced Interface Options插件的,关闭之后是下面的

10/16 12:33:27.562 SPELL_CAST_SUCCESS,Player-1-0000F4EF,"娜玛拉-",0x511,0x0,Creature-0-1-0-0-21854-0000012AC7,"铁脊石化者",0x10a48,0x0,705,"暗影箭",0x20,0000000000000000,0000000000000000,0,0,0,0,0,-1,0,0,0,0.00,0.00,1955,0.0000,0
10/16 12:33:27.663 SPELL_CAST_START,Player-1-0000F4EF,"娜玛拉-",0x511,0x0,0000000000000000,nil,0x80000000,0x80000000,705,"暗影箭",0x20

没有施法失败的提示,但是有大约100ms的延迟。

我实际的施法延迟是应该用哪两个时间戳来算?

1 Answers

SPELL_CAST_START 不是你按下技能,是你按下技能后,服务器返回给你,表示它检查成功,要开始施法了

顺序是
CMSG_CAST_SPELL 客户端按键请求施法

  • 发送给服务器
  • 服务器接收到消息 处理
    SPELL_CAST_FAILED (SMSG_SPELL_FAILED)服务器发送成功或者失败给客户端
    如果失败了,到这里结束
    SPELL_CAST_START (SMSG_SPELL_START) 如果检查成功,有施法条件,会发送这个给客户端,表示我服务器开始施法了
    SPELL_CAST_SUCCESS (SMSG_SPELL_GO) 施法成功

那我实际的施法延迟是应该用哪两个时间戳来算?最小的施法延迟理论值是多少?

你目前得到的信息,我觉得应该是算不了。或许SPELL_CAST_START减去你的网络延迟 ,减去上一次施法成功时间。可以得到一个大约的数据