Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Blazeflack
ElvUI_CustomTags
Commits
9aedf650
Commit
9aedf650
authored
Mar 31, 2016
by
Blazeflack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a logic error in the num:targeting tag.
parent
a33a9fd0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
ElvUI_CustomTags/ElvUI_CustomTags.toc
ElvUI_CustomTags/ElvUI_CustomTags.toc
+1
-1
ElvUI_CustomTags/core.lua
ElvUI_CustomTags/core.lua
+8
-2
No files found.
ElvUI_CustomTags/ElvUI_CustomTags.toc
View file @
9aedf650
## Interface: 60200
## Author: Blazeflack
## Version: 1.0
1
## Version: 1.0
2
## Title: |cff1784d1ElvUI|r |cff4beb2cCustomTags|r
## Notes: A collection of custom unitframe tags requested by users.
## RequiredDeps: ElvUI
...
...
ElvUI_CustomTags/core.lua
View file @
9aedf650
...
...
@@ -22,14 +22,20 @@ local UnitIsUnit = UnitIsUnit
ElvUF
.
Tags
.
Events
[
'num:targeting'
]
=
"UNIT_TARGET PLAYER_TARGET_CHANGED GROUP_ROSTER_UPDATE"
ElvUF
.
Tags
.
Methods
[
'num:targeting'
]
=
function
(
unit
)
if
not
IsInGroup
()
then
return
""
end
local
targetedByNum
=
0
--Count the amount of other people targeting the unit
for
i
=
1
,
GetNumGroupMembers
()
do
local
groupUnit
=
(
IsInRaid
()
and
"raid"
..
i
or
"party"
..
i
);
if
(
UnitIsUnit
(
groupUnit
..
"target"
,
unit
)
and
not
UnitIsUnit
(
groupUnit
,
"player"
))
or
UnitIsUnit
(
"playertarget"
,
unit
)
then
if
(
UnitIsUnit
(
groupUnit
..
"target"
,
unit
)
and
not
UnitIsUnit
(
groupUnit
,
"player"
))
then
targetedByNum
=
targetedByNum
+
1
end
end
--Add 1 if we're targeting the unit too
if
UnitIsUnit
(
"playertarget"
,
unit
)
then
targetedByNum
=
targetedByNum
+
1
end
return
(
targetedByNum
>
0
and
targetedByNum
or
""
)
end
\ No newline at end of file
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