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
Landon Wu
VuhDo
Commits
284aea25
Commit
284aea25
authored
5 years ago
by
Ivaria
Browse files
Options
Download
Email Patches
Plain Diff
Use LibThreatClassic for UnitDetailedThreatSituation impl
parent
46678a88
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
VuhDoEventHandler.lua
VuhDoEventHandler.lua
+3
-3
VuhDoToolbox.lua
VuhDoToolbox.lua
+20
-0
No files found.
VuhDoEventHandler.lua
View file @
284aea25
...
...
@@ -43,7 +43,7 @@ local GetTime = GetTime;
local
CheckInteractDistance
=
CheckInteractDistance
;
local
UnitInRange
=
UnitInRange
;
local
IsSpellInRange
=
IsSpellInRange
;
local
U
nitDetailedThreatSituation
=
U
nitDetailedThreatSituation
;
local
VUHDO_u
nitDetailedThreatSituation
=
VUHDO_u
nitDetailedThreatSituation
;
local
UnitIsCharmed
=
UnitIsCharmed
;
local
UnitCanAttack
=
UnitCanAttack
;
local
UnitName
=
UnitName
;
...
...
@@ -1052,7 +1052,7 @@ local function VUHDO_updateAllAggro()
tTarget
=
tInfo
[
"targetUnit"
];
if
UnitIsEnemy
(
tUnit
,
tTarget
)
then
if
VUHDO_INTERNAL_TOGGLES
[
14
]
then
-- VUHDO_UPDATE_AGGRO
_
,
_
,
tThreatPerc
=
U
nitDetailedThreatSituation
(
tUnit
,
tTarget
);
_
,
_
,
tThreatPerc
=
VUHDO_u
nitDetailedThreatSituation
(
tUnit
,
tTarget
);
tInfo
[
"threatPerc"
]
=
tThreatPerc
or
0
;
end
...
...
@@ -1060,7 +1060,7 @@ local function VUHDO_updateAllAggro()
if
tAggroUnit
then
if
VUHDO_INTERNAL_TOGGLES
[
14
]
then
-- VUHDO_UPDATE_AGGRO
_
,
_
,
tThreatPerc
=
U
nitDetailedThreatSituation
(
tAggroUnit
,
tTarget
);
_
,
_
,
tThreatPerc
=
VUHDO_u
nitDetailedThreatSituation
(
tAggroUnit
,
tTarget
);
VUHDO_RAID
[
tAggroUnit
][
"threatPerc"
]
=
tThreatPerc
or
0
;
end
...
...
This diff is collapsed.
Click to expand it.
VuhDoToolbox.lua
View file @
284aea25
...
...
@@ -1173,6 +1173,26 @@ end
function
VUHDO_unitDetailedThreatSituation
(
aUnit
,
aOtherUnit
)
if
not
aUnit
or
not
aOtherUnit
then
return
nil
;
end
if
not
UnitDetailedThreatSituation
then
if
VUHDO_LibThreatClassic
then
return
VUHDO_LibThreatClassic
:
UnitDetailedThreatSituation
(
aUnit
,
aOtherUnit
);
else
return
nil
;
end
else
return
UnitDetailedThreatSituation
(
aUnit
,
aOtherUnit
);
end
end
function
VUHDO_unitIsWarModePhased
(
...
)
if
not
UnitIsWarModePhased
then
...
...
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