mirror of
https://github.com/waynebian01/Shigure.git
synced 2026-09-03 07:15:24 +08:00
优化光环组配置,新增自律状态支持
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
## Interface: 120000, 120001, 120005, 120007, 120010
|
||||
## Interface: 120000, 120001, 120005, 120007, 120010
|
||||
|
||||
## Title: Fuyutsui
|
||||
## Version: 1.2.1
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
if UnitClassBase("player") ~= "PALADIN" then return end
|
||||
local addon, ns = ...
|
||||
|
||||
local function isSpellKnown()
|
||||
local known = C_SpellBook.IsSpellKnownOrInSpellBook(432459) or C_SpellBook.IsSpellKnownOrInSpellBook(432472)
|
||||
return known
|
||||
end
|
||||
|
||||
Fuyutsui.ClassBlocks = {
|
||||
[1] = {
|
||||
states = {
|
||||
@@ -30,7 +25,8 @@ Fuyutsui.ClassBlocks = {
|
||||
"难度",
|
||||
"施法技能",
|
||||
"施法目标",
|
||||
"神圣军备"
|
||||
"神圣军备",
|
||||
"自律",
|
||||
},
|
||||
["能量"] = {
|
||||
"法力值",
|
||||
@@ -93,7 +89,8 @@ Fuyutsui.ClassBlocks = {
|
||||
{ spellId = 114165, name = "神圣棱镜" },
|
||||
{ spellId = 31821, name = "光环掌握" },
|
||||
{ spellId = 200025, name = "美德道标" },
|
||||
{ spellId = 432459, name = "神圣壁垒", charge = true, maxCharge = 4 },
|
||||
{ spellId = 432459, name = "神圣壁垒", charge = true, maxCharge = 2 },
|
||||
{ spellId = 391054, name = "代祷" },
|
||||
},
|
||||
group = {
|
||||
num = 6,
|
||||
@@ -128,6 +125,7 @@ Fuyutsui.ClassBlocks = {
|
||||
"队伍人数",
|
||||
"首领战",
|
||||
"难度",
|
||||
"自律",
|
||||
},
|
||||
["能量"] = {
|
||||
"法力值",
|
||||
@@ -209,6 +207,7 @@ Fuyutsui.ClassBlocks = {
|
||||
"首领战",
|
||||
"难度",
|
||||
"敌人数量",
|
||||
"自律",
|
||||
},
|
||||
["能量"] = {
|
||||
"法力值",
|
||||
@@ -341,4 +340,7 @@ Fuyutsui.spellsList = {
|
||||
[200025] = { index = 24, name = "美德道标" },
|
||||
[114165] = { index = 25, name = "神圣棱镜" },
|
||||
[53595] = { index = 26, name = "正义之锤" },
|
||||
[6940] = { index = 27, name = "牺牲祝福" },
|
||||
[391054] = { index = 28, name = "代祷" },
|
||||
[633] = { index = 29, name = "圣疗术" },
|
||||
}
|
||||
|
||||
@@ -187,15 +187,11 @@ function Fuyutsui:UNIT_SPELLCAST_SUCCEEDED(_, unitTarget, castGUID, spellID, cas
|
||||
end
|
||||
end
|
||||
|
||||
local test = {}
|
||||
function Fuyutsui:SPELL_UPDATE_COOLDOWN(_, spellID, baseSpellID)
|
||||
if issecretvalue(spellID) then return end
|
||||
if spellID and not test[spellID] then
|
||||
test[spellID] = true
|
||||
local spellLink = C_Spell.GetSpellLink(spellID)
|
||||
if spellLink then
|
||||
print(spellID, spellLink)
|
||||
end
|
||||
|
||||
if spellID == 25771 then
|
||||
self:UpdatePlayerForbearance()
|
||||
end
|
||||
self:UpdateKnightStatus(spellID)
|
||||
end
|
||||
@@ -435,7 +431,7 @@ function Fuyutsui:OnUpdate(elapsed)
|
||||
end
|
||||
|
||||
self.timeElapsed1 = self.timeElapsed1 + elapsed
|
||||
if self.timeElapsed1 > 1 then
|
||||
if self.timeElapsed1 >= 1 then
|
||||
self:UpdatePlayerCombatTime()
|
||||
self:UpdateKnightStatusCount()
|
||||
self.timeElapsed1 = 0
|
||||
|
||||
@@ -419,3 +419,25 @@ function Fuyutsui:UpdateMountCasting(spellID, casting)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
local forbearanceTimer = nil
|
||||
|
||||
function Fuyutsui:UpdatePlayerForbearance() -- 25771 自律
|
||||
if forbearanceTimer then
|
||||
forbearanceTimer:Cancel()
|
||||
forbearanceTimer = nil
|
||||
end
|
||||
|
||||
local remaining = 30
|
||||
state.forbearance = remaining / 255
|
||||
self:UpdateStateBlock("状态", "自律")
|
||||
|
||||
forbearanceTimer = C_Timer.NewTicker(1, function()
|
||||
remaining = remaining - 1
|
||||
state.forbearance = remaining > 0 and (remaining / 255) or 0
|
||||
self:UpdateStateBlock("状态", "自律")
|
||||
if remaining <= 0 then
|
||||
forbearanceTimer = nil
|
||||
end
|
||||
end, 30)
|
||||
end
|
||||
|
||||
@@ -69,6 +69,7 @@ function Fuyutsui:GetUnitInterruptiblePixel(unit, mode)
|
||||
if not channel then return 0 end
|
||||
local _, _, _, _, _, _, notInterruptible, _, _, _, castBarID = UnitChannelInfo(unit)
|
||||
if not castBarID then return nil end
|
||||
---@diagnostic disable-next-line: param-type-mismatch
|
||||
local interruptibleColor = EvaluateColorFromBoolean(notInterruptible, ColorValue0, ColorValue1)
|
||||
local _, _, interruptible = interruptibleColor:GetRGB()
|
||||
return interruptible
|
||||
@@ -76,6 +77,7 @@ function Fuyutsui:GetUnitInterruptiblePixel(unit, mode)
|
||||
|
||||
if not UnitCastingDuration(unit) then return 0 end
|
||||
local _, _, _, _, _, _, _, notInterruptible = UnitCastingInfo(unit)
|
||||
---@diagnostic disable-next-line: param-type-mismatch
|
||||
local interruptibleColor = EvaluateColorFromBoolean(notInterruptible, ColorValue0, ColorValue1)
|
||||
local _, _, interruptible = interruptibleColor:GetRGB()
|
||||
return interruptible
|
||||
@@ -126,6 +128,7 @@ local stateBlockGetters = {
|
||||
["符文"] = function() return GetRunePixel() end,
|
||||
["姿态"] = function() return state.shapeshiftFormID or 0 end,
|
||||
["天启骑士数量"] = function() return state.knightCount or 0 end,
|
||||
["自律"] = function() return state.forbearance or 0 end,
|
||||
|
||||
["爆发开关"] = function(self) return GetConfigPixel(self, "cooldowns") end,
|
||||
["AOE开关"] = function(self) return GetConfigPixel(self, "aoeMode") end,
|
||||
|
||||
@@ -32,7 +32,7 @@ internal static class ClassStateCatalog
|
||||
"首领战", "难度", "英雄天赋", "施法目标", "施法技能",
|
||||
"敌人数量", "敌人数-无仇恨", "敌人数-有仇恨","施法",
|
||||
"引导", "蓄力", "蓄力层数", "酒池", "符文", "姿态",
|
||||
"救赎之魂1", "救赎之魂2", "神圣军备"
|
||||
"救赎之魂1", "救赎之魂2", "神圣军备", "自律"
|
||||
]),
|
||||
(CategoryConfig,
|
||||
[
|
||||
|
||||
@@ -776,7 +776,7 @@ public sealed class StatusForm : Form
|
||||
"队伍类型", "队伍人数", "首领战", "难度", "英雄天赋", "施法目标",
|
||||
"施法技能", "敌人数量", "敌人数-无仇恨", "敌人数-有仇恨", "施法",
|
||||
"引导", "蓄力", "蓄力层数", "酒池", "符文", "姿态",
|
||||
"救赎之魂1", "救赎之魂2", "神圣军备"
|
||||
"救赎之魂1", "救赎之魂2", "神圣军备", "自律"
|
||||
],
|
||||
150), 0, 0);
|
||||
fields.Controls.Add(CreateAboutFieldCard(
|
||||
|
||||
Reference in New Issue
Block a user