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
d8d1f4a0
Commit
d8d1f4a0
authored
Dec 11, 2022
by
Ivaria
Browse files
Fixed PLAYER_FOCUS_CHANGED event handling efficiency
parent
44aca3cf
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
7 deletions
+42
-7
VuhDoCombatLogParser.lua
VuhDoCombatLogParser.lua
+10
-0
VuhDoEventHandler.lua
VuhDoEventHandler.lua
+32
-7
No files found.
VuhDoCombatLogParser.lua
View file @
d8d1f4a0
...
...
@@ -80,6 +80,8 @@ end
--
function
VUHDO_clParserSetCurrentFocus
()
local
tOldFocus
=
sCurrentFocus
;
sCurrentFocus
=
nil
;
for
tUnit
,
tInfo
in
pairs
(
VUHDO_RAID
)
do
...
...
@@ -93,6 +95,14 @@ function VUHDO_clParserSetCurrentFocus()
end
end
if
tOldFocus
then
VUHDO_updateBouquetsForEvent
(
tOldFocus
,
23
);
-- VUHDO_UPDATE_PLAYER_FOCUS
end
if
sCurrentFocus
then
VUHDO_updateBouquetsForEvent
(
sCurrentFocus
,
23
);
-- VUHDO_UPDATE_PLAYER_FOCUS
end
end
...
...
VuhDoEventHandler.lua
View file @
d8d1f4a0
...
...
@@ -565,13 +565,38 @@ function VUHDO_OnEvent(_, anEvent, anArg1, anArg2, anArg3, anArg4, anArg5, anArg
end
elseif
"PLAYER_FOCUS_CHANGED"
==
anEvent
then
VUHDO_removeAllDebuffIcons
(
"focus"
);
VUHDO_quickRaidReload
();
VUHDO_clParserSetCurrentFocus
();
VUHDO_updateBouquetsForEvent
(
anArg1
,
23
);
-- VUHDO_UPDATE_PLAYER_FOCUS
if
VUHDO_RAID
[
"focus"
]
~=
nil
then
VUHDO_determineIncHeal
(
"focus"
);
VUHDO_updateHealth
(
"focus"
,
9
);
-- VUHDO_UPDATE_INC
if
VUHDO_VARIABLES_LOADED
then
if
VUHDO_RAID
[
"focus"
]
then
VUHDO_determineIncHeal
(
"focus"
);
VUHDO_updateHealth
(
"focus"
,
9
);
-- VUHDO_UPDATE_INC
end
VUHDO_clParserSetCurrentFocus
();
if
VUHDO_isModelConfigured
(
VUHDO_ID_FOCUS
)
or
(
VUHDO_isModelConfigured
(
VUHDO_ID_PRIVATE_TANKS
)
and
not
VUHDO_CONFIG
[
"OMIT_FOCUS"
])
then
if
UnitExists
(
"focus"
)
then
VUHDO_setHealth
(
"focus"
,
1
);
-- VUHDO_UPDATE_ALL
else
VUHDO_removeHots
(
"focus"
);
VUHDO_resetDebuffsFor
(
"focus"
);
VUHDO_removeAllDebuffIcons
(
"focus"
);
if
VUHDO_RAID
[
"focus"
]
then
table
.
wipe
(
VUHDO_RAID
[
"focus"
]);
end
VUHDO_RAID
[
"focus"
]
=
nil
;
end
VUHDO_updateHealthBarsFor
(
"focus"
,
1
);
-- VUHDO_UPDATE_ALL
VUHDO_initEventBouquetsFor
(
"focus"
);
end
VUHDO_updateBouquetsForEvent
(
"player"
,
23
);
-- VUHDO_UPDATE_PLAYER_FOCUS
VUHDO_updateBouquetsForEvent
(
"focus"
,
23
);
-- VUHDO_UPDATE_PLAYER_FOCUS
VUHDO_updatePanelVisibility
();
end
elseif
"PARTY_MEMBER_ENABLE"
==
anEvent
or
"PARTY_MEMBER_DISABLE"
==
anEvent
then
...
...
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