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
Ven de Thiel
VuhDo
Commits
b5781be8
Commit
b5781be8
authored
6 years ago
by
Ivaria
Browse files
Options
Download
Email Patches
Plain Diff
Quick workaround for UnitDefense deprecation
parent
4f7c2a9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
28 deletions
+4
-28
VuhDoRoleChecker.lua
VuhDoRoleChecker.lua
+4
-28
No files found.
VuhDoRoleChecker.lua
View file @
b5781be8
...
...
@@ -17,7 +17,6 @@ local NotifyInspect = NotifyInspect;
local
GetSpecializationInfo
=
GetSpecializationInfo
;
local
ClearInspectPlayer
=
ClearInspectPlayer
;
local
UnitStat
=
UnitStat
;
local
UnitDefense
=
UnitDefense
;
local
UnitGroupRolesAssigned
=
UnitGroupRolesAssigned
;
local
UnitLevel
=
UnitLevel
;
local
UnitPowerType
=
UnitPowerType
;
...
...
@@ -320,15 +319,7 @@ function VUHDO_determineRole(aUnit)
end
elseif
20
==
tClassId
then
-- VUHDO_ID_WARRIORS
_
,
tDefense
=
UnitDefense
(
aUnit
);
tLevel
=
UnitLevel
(
aUnit
)
or
0
;
if
tLevel
<=
0
then
return
nil
;
end
tDefense
=
tDefense
/
tLevel
;
if
(
tDefense
>
2
or
VUHDO_isUnitInModel
(
aUnit
,
VUHDO_ID_MAINTANKS
))
then
if
(
0
>
2
)
then
-- FIXME: need replacement for UnitDefense check
return
60
;
-- VUHDO_ID_MELEE_TANK
else
return
61
;
-- VUHDO_ID_MELEE_DAMAGE
...
...
@@ -350,15 +341,7 @@ function VUHDO_determineRole(aUnit)
end
elseif
23
==
tClassId
then
-- VUHDO_ID_PALADINS
_
,
tDefense
=
UnitDefense
(
aUnit
);
tLevel
=
UnitLevel
(
aUnit
)
or
0
;
if
tLevel
<=
0
then
return
nil
;
end
tDefense
=
tDefense
/
tLevel
;
if
tDefense
>
2
then
if
0
>
2
then
-- FIXME: need replacement for UnitDefense check
return
60
;
-- VUHDO_ID_MELEE_TANK
else
tIntellect
=
UnitStat
(
aUnit
,
4
);
...
...
@@ -387,15 +370,8 @@ function VUHDO_determineRole(aUnit)
end
elseif
31
==
tClassId
then
-- VUHDO_ID_DEMON_HUNTERS
_
,
tDefense
=
UnitDefense
(
aUnit
);
tLevel
=
UnitLevel
(
aUnit
)
or
0
;
if
tLevel
<=
0
then
return
nil
;
end
tDefense
=
tDefense
/
tLevel
;
if
(
tDefense
>
2
or
VUHDO_isUnitInModel
(
aUnit
,
VUHDO_ID_MAINTANKS
))
then
tPowerType
=
UnitPowerType
(
aUnit
);
if
VUHDO_UNIT_POWER_PAIN
==
tPowerType
then
return
60
;
-- VUHDO_ID_MELEE_TANK
else
return
61
;
-- VUHDO_ID_MELEE_DAMAGE
...
...
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