Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
VuhDo
VuhDo
Commits
855a6c61
Commit
855a6c61
authored
Nov 19, 2022
by
Ivaria
Browse files
Fixed tracking of ambiguously named HoTs by spell ID
parent
69a8ee71
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
17 deletions
+25
-17
VuhDoBarCustomizerHots.lua
VuhDoBarCustomizerHots.lua
+22
-15
VuhDoShieldAbsorb.lua
VuhDoShieldAbsorb.lua
+2
-1
VuhDoSpellEventHandler.lua
VuhDoSpellEventHandler.lua
+1
-1
No files found.
VuhDoBarCustomizerHots.lua
View file @
855a6c61
...
...
@@ -373,14 +373,20 @@ end
--
local
tAllButtons
;
local
tShieldCharges
;
local
tShieldCharges
,
tShieldName
;
local
tIsMatch
;
local
tIsMine
,
tIsOthers
;
local
function
VUHDO_updateHotIcons
(
aUnit
,
aHotName
,
aRest
,
aTimes
,
anIcon
,
aDuration
,
aMode
,
aColor
,
aHotSpellName
,
aClipL
,
aClipR
,
aClipT
,
aClipB
)
tAllButtons
=
VUHDO_getUnitButtons
(
VUHDO_resolveVehicleUnit
(
aUnit
));
if
not
tAllButtons
then
return
;
end
tShieldCharges
=
VUHDO_getShieldLeftCount
(
aUnit
,
aHotSpellName
or
aHotName
,
aMode
)
or
0
;
-- if not our shield don't show remaining absorption
tShieldName
=
aHotSpellName
or
aHotName
;
if
type
(
tonumber
(
tShieldName
))
==
"number"
then
tShieldName
=
GetSpellInfo
(
tonumber
(
tShieldName
));
end
tShieldCharges
=
VUHDO_getShieldLeftCount
(
aUnit
,
tShieldName
,
aMode
)
or
0
;
-- if not our shield don't show remaining absorption
for
tIndex
,
tHotName
in
pairs
(
sHotSlots
)
do
if
aHotName
==
tHotName
then
...
...
@@ -449,7 +455,6 @@ local tCount;
local
tHotInfo
;
local
tAlive
;
local
function
VUHDO_snapshotHot
(
aHotName
,
aRest
,
aStacks
,
anIcon
,
anIsMine
,
aDuration
,
aUnit
,
anExpiry
)
aStacks
=
aStacks
or
0
;
tCount
=
aStacks
==
0
and
1
or
aStacks
;
tAlive
=
GetTime
()
-
anExpiry
+
(
aDuration
or
0
);
...
...
@@ -512,7 +517,7 @@ local tStart, tEnabled;
local
tSmDuration
;
local
tDiffIcon
;
local
tHotFromBuff
;
local
tIsCastByPlayer
;
local
tIsCastByPlayer
,
tIsCacheByName
;
local
tDuration
;
local
tSpellId
,
tDebuffOffset
;
local
tNow
;
...
...
@@ -578,7 +583,9 @@ local function VUHDO_updateHots(aUnit, anInfo)
tExpiry
=
(
tNow
+
9999
);
end
if
not
VUHDO_CACHE_SPELL_ONLY_BY_ID
[
tBuffName
]
then
tIsCacheByName
=
not
VUHDO_CACHE_SPELL_ONLY_BY_ID
[
tBuffName
]
and
not
VUHDO_ACTIVE_HOTS
[
tostring
(
tSpellId
)];
if
tIsCacheByName
then
tHotFromBuff
=
sBuffs2Hots
[
tBuffName
..
tBuffIcon
]
or
sBuffs2Hots
[
tSpellId
];
else
tHotFromBuff
=
sBuffs2Hots
[
tSpellId
];
...
...
@@ -591,36 +598,36 @@ local function VUHDO_updateHots(aUnit, anInfo)
VUHDO_snapshotHot
(
tHotFromBuff
,
tRest
,
tStacks
,
tBuffIcon
,
tIsCastByPlayer
,
tDuration
,
aUnit
,
tExpiry
);
end
else
-- not yet scanned
if
not
VUHDO_CACHE_SPELL_ONLY_BY_ID
[
tBuff
Name
]
then
if
tIsCacheBy
Name
then
sBuffs2Hots
[
tBuffName
..
tBuffIcon
]
=
""
;
else
sBuffs2Hots
[
tSpellId
]
=
""
;
end
sBuffs2Hots
[
tSpellId
]
=
""
;
for
tHotCmpName
,
_
in
pairs
(
VUHDO_ACTIVE_HOTS
)
do
tDiffIcon
=
VUHDO_CAST_ICON_DIFF
[
tHotCmpName
];
if
tDiffIcon
==
tBuffIcon
or
(
tDiffIcon
==
nil
and
tBuffName
==
tHotCmpName
)
or
tostring
(
tSpellId
or
-
1
)
==
tHotCmpName
then
or
(
tDiffIcon
==
nil
and
tIsCacheByName
and
tBuffName
==
tHotCmpName
)
or
(
not
tIsCacheByName
and
tostring
(
tSpellId
or
-
1
)
==
tHotCmpName
)
then
tRest
=
tExpiry
-
tNow
;
if
tRest
>
0
then
VUHDO_snapshotHot
(
tHotCmpName
,
tRest
,
tStacks
,
tBuffIcon
,
tIsCastByPlayer
,
tDuration
,
aUnit
,
tExpiry
);
end
if
not
VUHDO_CACHE_SPELL_ONLY_BY_ID
[
tBuff
Name
]
then
if
tIsCacheBy
Name
then
sBuffs2Hots
[
tBuffName
..
tBuffIcon
]
=
tHotCmpName
;
else
sBuffs2Hots
[
tSpellId
]
=
tHotCmpName
;
end
sBuffs2Hots
[
tSpellId
]
=
tHotCmpName
;
break
;
end
end
end
if
not
tIsCastByPlayer
and
VUHDO_HEALING_HOTS
[
tBuffName
]
and
not
VUHDO_ACTIVE_HOTS_OTHERS
[
tBuffName
]
then
if
not
tIsCastByPlayer
and
((
tIsCacheByName
and
VUHDO_HEALING_HOTS
[
tBuffName
]
and
not
VUHDO_ACTIVE_HOTS_OTHERS
[
tBuffName
]
)
or
(
not
tIsCacheByName
and
VUHDO_HEALING_HOTS
[
tostring
(
tSpellId
)]
and
not
VUHDO_ACTIVE_HOTS_OTHERS
[
tostring
(
tSpellId
)]))
then
tOtherIcon
=
tBuffIcon
;
tOtherHotCnt
=
tOtherHotCnt
+
1
;
sOthersHotsInfo
[
aUnit
][
1
]
=
tOtherIcon
;
...
...
VuhDoShieldAbsorb.lua
View file @
855a6c61
...
...
@@ -27,6 +27,7 @@ local VUHDO_PUMP_SHIELDS = {
-- HoTs which we want to explicitly update on SPELL_AURA_APPLIED
-- This avoids any display delays on contingent auras (eg. Atonement)
-- Note: if adding by spell ID table key must be a string e.g. ["17"] not [17]
local
VUHDO_IMMEDIATE_HOTS
=
{
[
VUHDO_SPELL_ID
.
ATONEMENT
]
=
true
,
}
...
...
@@ -366,7 +367,7 @@ function VUHDO_parseCombatLogShieldAbsorb(aMessage, aSrcGuid, aDstGuid, aShieldN
VUHDO_SHIELD_EXPIRY
[
tUnit
]
=
nil
;
VUHDO_DEBUFF_SHIELDS
[
tUnit
]
=
nil
;
VUHDO_SHIELD_LAST_SOURCE_GUID
[
tUnit
]
=
nil
;
elseif
VUHDO_IMMEDIATE_HOTS
[
aShieldName
]
and
VUHDO_ACTIVE_HOTS
[
aShieldName
]
and
elseif
((
VUHDO_IMMEDIATE_HOTS
[
aShieldName
]
and
VUHDO_ACTIVE_HOTS
[
aShieldName
]
)
or
(
VUHDO_IMMEDIATE_HOTS
[
tostring
(
aSpellId
)]
and
VUHDO_ACTIVE_HOTS
[
tostring
(
aSpellId
)]))
and
(
"SPELL_AURA_APPLIED"
==
aMessage
or
"SPELL_AURA_REMOVED"
==
aMessage
or
"SPELL_AURA_REFRESH"
==
aMessage
or
"SPELL_AURA_BROKEN"
==
aMessage
or
"SPELL_AURA_BROKEN_SPELL"
==
aMessage
)
then
...
...
VuhDoSpellEventHandler.lua
View file @
855a6c61
...
...
@@ -75,7 +75,7 @@ function VUHDO_spellcastSucceeded(aUnit, aSpellId)
tSpellName
=
GetSpellInfo
(
aSpellId
);
end
if
tSpellName
and
VUHDO_ACTIVE_HOTS
[
tSpellName
]
then
if
tSpellName
and
(
VUHDO_ACTIVE_HOTS
[
tSpellName
]
or
VUHDO_ACTIVE_HOTS
[
tostring
(
aSpellId
)])
then
VUHDO_updateAllHoTs
();
VUHDO_updateAllCyclicBouquets
(
true
);
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment