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
Matthieu Saint Aubin
VuhDo
Commits
89a2b287
Commit
89a2b287
authored
5 years ago
by
Ivaria
Browse files
Options
Download
Email Patches
Plain Diff
Fix HealComm callback handlers
parent
284aea25
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
6 deletions
+27
-6
VuhDoEventHandler.lua
VuhDoEventHandler.lua
+13
-2
VuhDoToolbox.lua
VuhDoToolbox.lua
+14
-4
No files found.
VuhDoEventHandler.lua
View file @
89a2b287
...
...
@@ -1588,8 +1588,19 @@ function VUHDO_OnLoad(anInstance)
VUHDO_LibClassicHealComm.RegisterCallback(anInstance, "
HealComm_HealStopped
", HealComm_HealUpdated);
VUHDO_LibClassicHealComm.RegisterCallback(anInstance, "
HealComm_HealDelayed
", HealComm_HealUpdated);
VUHDO_LibClassicHealComm.RegisterCallback(anInstance, "
HealComm_HealUpdated
", HealComm_HealUpdated);
VUHDO_LibClassicHealComm.RegisterCallback(anInstance, "
HealComm_ModifierChanged
", HealComm_HealUpdated);
VUHDO_LibClassicHealComm.RegisterCallback(anInstance, "
HealComm_GUIDDisappeared
", HealComm_HealUpdated);
local function HealComm_HealModified(aEvent, aTargetGUID)
local tTarget = VUHDO_RAID_GUIDS[aTargetGUID];
if (VUHDO_RAID or tEmptyRaid)[tTarget] then -- auch target, focus
VUHDO_updateHealth(tTarget, 9); -- VUHDO_UPDATE_INC
VUHDO_updateBouquetsForEvent(tTarget, 9); -- VUHDO_UPDATE_ALT_POWER
end
end
anInstance.HealComm_HealModified = HealComm_HealModified;
VUHDO_LibClassicHealComm.RegisterCallback(anInstance, "
HealComm_ModifierChanged
", HealComm_HealModified);
VUHDO_LibClassicHealComm.RegisterCallback(anInstance, "
HealComm_GUIDDisappeared
", HealComm_HealModified);
end
SLASH_VUHDO1 = "
/
vuhdo
";
...
...
This diff is collapsed.
Click to expand it.
VuhDoToolbox.lua
View file @
89a2b287
...
...
@@ -1104,18 +1104,28 @@ end
function
VUHDO_unitGetIncomingHeals
(
...
)
function
VUHDO_unitGetIncomingHeals
(
aUnit
,
aCasterUnit
)
if
not
aUnit
then
return
0
;
end
if
not
UnitGetIncomingHeals
then
if
VUHDO_LibClassicHealComm
then
local
targetGUID
=
UnitGUID
(
...
);
local
t
T
argetGUID
=
UnitGUID
(
aUnit
);
return
(
VUHDO_LibClassicHealComm
:
GetHealAmount
(
targetGUID
,
VUHDO_LibClassicHealComm
.
ALL_HEALS
)
or
0
)
*
(
VUHDO_LibClassicHealComm
:
GetHealModifier
(
targetGUID
)
or
1
);
if
aCasterUnit
then
local
tCasterGUID
=
UnitGUID
(
aCasterUnit
);
return
(
VUHDO_LibClassicHealComm
:
GetHealAmount
(
tTargetGUID
,
VUHDO_LibClassicHealComm
.
ALL_HEALS
,
nil
,
tCasterGUID
)
or
0
)
*
(
VUHDO_LibClassicHealComm
:
GetHealModifier
(
tTargetGUID
)
or
1
);
else
return
(
VUHDO_LibClassicHealComm
:
GetHealAmount
(
tTargetGUID
,
VUHDO_LibClassicHealComm
.
ALL_HEALS
)
or
0
)
*
(
VUHDO_LibClassicHealComm
:
GetHealModifier
(
tTargetGUID
)
or
1
);
end
else
return
0
;
end
else
return
UnitGetIncomingHeals
(
...
);
return
UnitGetIncomingHeals
(
aUnit
,
aCasterUnit
);
end
end
...
...
This diff is collapsed.
Click to expand it.
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