diff --git a/Fuyutsui/class/Rogue.lua b/Fuyutsui/class/Rogue.lua index 73f6def3..49baff2a 100644 --- a/Fuyutsui/class/Rogue.lua +++ b/Fuyutsui/class/Rogue.lua @@ -25,6 +25,7 @@ Fuyutsui.ClassBlocks = { }, ["能量"] = { "能量值", + "增压层数", }, ["目标"] = { "类型", @@ -87,6 +88,7 @@ Fuyutsui.ClassBlocks = { }, ["能量"] = { "能量值", + "增压层数", }, ["目标"] = { "类型", @@ -151,6 +153,7 @@ Fuyutsui.ClassBlocks = { }, ["能量"] = { "能量值", + "增压层数", }, ["目标"] = { "类型", diff --git a/Fuyutsui/class/Warrior.lua b/Fuyutsui/class/Warrior.lua index 339c85e3..9ebb8545 100644 --- a/Fuyutsui/class/Warrior.lua +++ b/Fuyutsui/class/Warrior.lua @@ -294,5 +294,6 @@ Fuyutsui.spellsList = { [335096] = { index = 36, name = "浴血奋战" }, [335100] = { index = 37, name = "碎甲猛击" }, [228920] = { index = 38, name = "破坏者" }, - [280735] = { index = 39, name = "斩杀(点了屠杀天赋)" }, + [280735] = { index = 39, name = "斩杀" }, + [1269382] = { index = 40, name = "英勇打击" }, } diff --git a/Fuyutsui/core/core.lua b/Fuyutsui/core/core.lua index 989ac0e1..ce9980ca 100644 --- a/Fuyutsui/core/core.lua +++ b/Fuyutsui/core/core.lua @@ -112,6 +112,7 @@ function Fuyutsui:OnEnable() self:RegisterEvent("UNIT_SPELLCAST_EMPOWER_STOP") self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED") self:RegisterEvent("UNIT_POWER_UPDATE") + self:RegisterEvent("UNIT_POWER_POINT_CHARGE") self:RegisterEvent("UNIT_HEALTH") self:RegisterEvent("UNIT_MAXHEALTH") self:RegisterEvent("UNIT_HEAL_ABSORB_AMOUNT_CHANGED") diff --git a/Fuyutsui/core/events.lua b/Fuyutsui/core/events.lua index f4b24f4e..d5f3f16d 100644 --- a/Fuyutsui/core/events.lua +++ b/Fuyutsui/core/events.lua @@ -28,6 +28,7 @@ function Fuyutsui:PLAYER_ENTERING_WORLD() self:UpdateHolyArmaments(375576) self:UpdateHeroTalent() self:GetMountsInfo() + self:UpdateChargedComboPoints() C_Timer.After(5, function() self:UpdateGroup() end) @@ -36,6 +37,7 @@ end function Fuyutsui:PLAYER_TALENT_UPDATE() self:UpdatePlayerSpecInfo() self:UpdateGroup() + self:UpdateChargedComboPoints() end function Fuyutsui:RefreshPlayerDeathValid() @@ -265,6 +267,18 @@ end function Fuyutsui:UNIT_POWER_UPDATE(_, unit, powerType) if unit ~= "player" then return end self:UpdatePlayerPower(powerType) + if powerType == "COMBO_POINTS" then + C_Timer.After(0, function() + self:UpdateChargedComboPoints() + end) + end +end + +function Fuyutsui:UNIT_POWER_POINT_CHARGE(_, unit) + if unit ~= "player" then return end + C_Timer.After(0, function() + self:UpdateChargedComboPoints() + end) end function Fuyutsui:SPELL_UPDATE_USES(_, spellID, baseSpellID) diff --git a/Fuyutsui/core/player.lua b/Fuyutsui/core/player.lua index 4b8d914f..70c4aeed 100644 --- a/Fuyutsui/core/player.lua +++ b/Fuyutsui/core/player.lua @@ -123,6 +123,12 @@ function Fuyutsui:UpdatePlayerPower(powerType) self:UpdateBareStateBlock(powerName, { "能量", "状态" }) end +function Fuyutsui:UpdateChargedComboPoints() + local chargedPoints = GetUnitChargedPowerPoints("player") + state.chargedComboPoints = (chargedPoints and #chargedPoints or 0) / 255 + self:UpdateStateBlock("能量", "增压层数") +end + function Fuyutsui:UpdatePlayerPowerType() state.power = {} for powerType in pairs(EnumPowerType) do diff --git a/Fuyutsui/core/stateblocks.lua b/Fuyutsui/core/stateblocks.lua index 5528d612..23c7f1b6 100644 --- a/Fuyutsui/core/stateblocks.lua +++ b/Fuyutsui/core/stateblocks.lua @@ -214,6 +214,7 @@ local stateBlockGetters = { }, ["能量"] = { ["符文"] = function() return GetRunePixel() end, + ["增压层数"] = function() return state.chargedComboPoints or 0 end, }, ["物品"] = { ["治疗药水"] = function(self) return GetItemCooldownPixel(self, "HealthPotionCount", 241304) end,