你的_playerInRange一直都没有赋值,一直都是false,肯定就没法释放技能了。改动两个位置:
[Lua] 纯文本查看 复制代码
local spells = { --技能库
--General
--Marksmanship
Volley = {id = 27022, name = GetSpellInfo(27022)},
ArcaneShot = {id = 14287, name = GetSpellInfo(14287)},
--Survival
MongooseBite = {id = 14270, name = GetSpellInfo(14270)},
}
把ArcaneShot和MongooseBite两个技能加上(InRange函数要用)
[Lua] 纯文本查看 复制代码
local abilities = {
["Cache"] = function()
_playerInRange = InRange("target")
end,
--queue是依次运行的
["Volley"] = function()
if enables["乱射"] then
local nearby = #ni.unit.enemiesinrange("target", 8)
local n = UnitChannelInfo("player")
if n ~= nil and n == spells.Volley.name
and nearby >= values["乱射目标"] then
return true
end
if ni.spell.available(spells.Volley.id)
and _playerInRange
and nearby >= values["乱射目标"] then
ni.spell.castat(spells.Volley.name, "target", 1)
return true
end
end
end,
}
在判断乱射之前,先更新_playerInRange的状态 |