- 精华
- 阅读权限
- 60
- 好友
- 相册
- 分享
- 听众
- 收听
- 注册时间
- 2016-1-28
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
发表于 2025-10-26 22:49:58
|
显示全部楼层
关于单人进副本的第三个要改的函数function on_select_2(player, npc, line)
local event_stream = line.Event2
local event_func = line.Event2_Func
if event_stream ~= 0 and event_stream ~= nil then
local scn = player.scn_unit
quest_cmn.start(scn, player, npc, still, event_stream)
elseif event_func ~= L("") and event_func ~= nil then
local scn = player.scn_unit
bo2.RunScript(event_func, scn, player, npc, still)
else
-- 修改:直接进入,不进行双人检查
local scn_id = line.Event2_scn
local cd_id = line.scn2_cd
-- 检查CD
if cd_id ~= 0 and get_share_cd_state(player, nil, cd_id) ~= true then
return
end
-- 检查付费物品
if line.pay_id ~= 0 then
local paystate, itemtext = get_payitem_state(player, line)
if paystate == true then
local v = sys.variant()
v:set(packet.key.multi_item, itemtext)
player:SafeAward(v, nil, nil, 2151)
else
return
end
end
-- 直接传送
player:ChgScn(2, scn_id, "playerbegin", 0, 0, true)
-- 添加CD
if cd_id ~= 0 then
local cd_line = bo2.gv_define:find(cd_id)
if cd_line ~= nil and cd_line.value.v_int ~= 0 then
local id = cd_line.value.v_int
player:AddCooldown(id)
end
end
-- 日志记录
if line.wuguan_log == 1 then
local event_id = bo2.CreateGlobalOnlyID()
local npc_info = "," .. npc.excel_id .. "," .. npc.alias
wuguan_need_log(player.scn_unit, player, npc, line, 2, event_id, npc_info)
end
end
end修改原因:原本这个函数会发送组队邀请,现在改为直接单人进入副本。上述三个加上这个,89端就可以单人进副本了,不需要从控制台进入。 |
评分
-
查看全部评分
|