mirror of
https://github.com/waynebian01/Shigure.git
synced 2026-09-03 07:15:24 +08:00
更新 Rogue 和 Warrior 类的配置,添加增压层数字段;在核心模块中注册新的事件并更新相关逻辑
This commit is contained in:
@@ -25,6 +25,7 @@ Fuyutsui.ClassBlocks = {
|
||||
},
|
||||
["能量"] = {
|
||||
"能量值",
|
||||
"增压层数",
|
||||
},
|
||||
["目标"] = {
|
||||
"类型",
|
||||
@@ -87,6 +88,7 @@ Fuyutsui.ClassBlocks = {
|
||||
},
|
||||
["能量"] = {
|
||||
"能量值",
|
||||
"增压层数",
|
||||
},
|
||||
["目标"] = {
|
||||
"类型",
|
||||
@@ -151,6 +153,7 @@ Fuyutsui.ClassBlocks = {
|
||||
},
|
||||
["能量"] = {
|
||||
"能量值",
|
||||
"增压层数",
|
||||
},
|
||||
["目标"] = {
|
||||
"类型",
|
||||
|
||||
@@ -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 = "英勇打击" },
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user