fix combo point detection
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
## Interface: 11200
|
||||
## Title: [|CFF33AAFFSUPERWOW|R] Cursive 2.5.0
|
||||
## Title-zhCN: [|CFF33AAFFSUPERWOW|R] Cursive 2.5.0
|
||||
## Title: [|CFF33AAFFSUPERWOW|R] Cursive 2.5.1
|
||||
## Title-zhCN: [|CFF33AAFFSUPERWOW|R] Cursive 2.5.1
|
||||
## Author: Pepopo
|
||||
## Notes: Uses SuperWoW GUIDs to show units in combat and track curses
|
||||
## Notes-zhCN: 使用SuperWoW的GUID功能来显示战斗中的单位并监视诅咒等
|
||||
|
||||
+16
-4
@@ -27,7 +27,8 @@ local curses = {
|
||||
resistSoundGuids = {},
|
||||
expiringSoundGuids = {},
|
||||
requestedExpiringSoundGuids = {}, -- guid added on spellcast, moved to expiringSoundGuids once rendered by ui
|
||||
lastComboPoints = 0,
|
||||
previousComboPoints = 0,
|
||||
comboPoints = 0,
|
||||
lastFerociousBiteTime = 0,
|
||||
lastFerociousBiteTargetGuid = 0,
|
||||
lastMoltenBlastTargetGuid = 0,
|
||||
@@ -53,6 +54,16 @@ local molten_blast_test = L["Your Molten Blast(.+)for .+ Fire damage"]
|
||||
|
||||
local lastGuid = nil
|
||||
|
||||
-- I think depending on ping the combo point used event can fire either before or after your ability cast
|
||||
function curses:GetComboPointsUsed()
|
||||
if curses.comboPoints == 0 then
|
||||
return curses.previousComboPoints
|
||||
else
|
||||
return curses.comboPoints
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function curses:LoadCurses()
|
||||
-- reset dicts
|
||||
curses.trackedCurseIds = {}
|
||||
@@ -115,10 +126,10 @@ function curses:LoadCurses()
|
||||
curses.trackedCurseIds[id].texture = texture
|
||||
end
|
||||
|
||||
if curses.isDruid then
|
||||
if curses.isDruid or curses.isRogue then
|
||||
Cursive:RegisterEvent("PLAYER_COMBO_POINTS", function()
|
||||
local currentComboPoints = GetComboPoints()
|
||||
if currentComboPoints > curses.lastComboPoints then
|
||||
if curses.isDruid and currentComboPoints >= curses.comboPoints then
|
||||
-- combo points did not decrease, check if Ferocious Bite was used is the last .5 sec
|
||||
if GetTime() - curses.lastFerociousBiteTime < 0.5 and
|
||||
curses.lastFerociousBiteTargetGuid and
|
||||
@@ -137,7 +148,8 @@ function curses:LoadCurses()
|
||||
end
|
||||
end
|
||||
end
|
||||
curses.lastComboPoints = currentComboPoints
|
||||
curses.previousComboPoints = curses.comboPoints
|
||||
curses.comboPoints = currentComboPoints
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
function getRipDuration()
|
||||
return 8 + GetComboPoints() * 2
|
||||
return 8 + Cursive.curses.GetComboPointsUsed() * 2
|
||||
end
|
||||
|
||||
local L = AceLibrary("AceLocale-2.2"):new("Cursive")
|
||||
|
||||
+2
-3
@@ -9,8 +9,7 @@ function getGougeDuration()
|
||||
end
|
||||
|
||||
function getRuptureDuration()
|
||||
local duration = 6 + GetComboPoints() * 2
|
||||
|
||||
local duration = 6 + Cursive.curses.GetComboPointsUsed() * 2
|
||||
local _, _, _, _, count = GetTalentInfo(1, 10)
|
||||
if count and count > 0 then
|
||||
return duration + (count * 2)
|
||||
@@ -20,7 +19,7 @@ function getRuptureDuration()
|
||||
end
|
||||
|
||||
function getKidneyShotDuration()
|
||||
return 1 + GetComboPoints()
|
||||
return 1 + Cursive.curses.GetComboPointsUsed()
|
||||
end
|
||||
|
||||
local L = AceLibrary("AceLocale-2.2"):new("Cursive")
|
||||
|
||||
Reference in New Issue
Block a user