Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Rayford
Tukui
Commits
9489f9e9
Commit
9489f9e9
authored
Mar 25, 2019
by
Tukz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a tooltip target of target bug being displayed 2 times.
parent
47c445d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
Tukui/Modules/Tooltips/Core.lua
Tukui/Modules/Tooltips/Core.lua
+14
-7
No files found.
Tukui/Modules/Tooltips/Core.lua
View file @
9489f9e9
...
...
@@ -216,9 +216,16 @@ function Tooltip:OnTooltipSetUnit()
end
if
(
UnitExists
(
Unit
..
"target"
))
then
local
Hex
,
R
,
G
,
B
=
Tooltip
:
GetColor
(
Unit
..
"target"
)
if
(
not
R
)
and
(
not
G
)
and
(
not
B
)
then
local
UnitTarget
=
Unit
..
"target"
local
Class
=
select
(
2
,
UnitClass
(
UnitTarget
))
local
Reaction
=
UnitReaction
(
UnitTarget
,
"player"
)
local
R
,
G
,
B
if
(
UnitIsPlayer
(
UnitTarget
)
and
not
UnitHasVehicleUI
(
UnitTarget
))
then
R
,
G
,
B
=
unpack
(
T
.
Colors
.
class
[
Class
])
elseif
Reaction
then
R
,
G
,
B
=
unpack
(
T
.
Colors
.
reaction
[
Reaction
])
else
R
,
G
,
B
=
1
,
1
,
1
end
...
...
@@ -369,12 +376,12 @@ function Tooltip:Enable()
for
_
,
Tooltip
in
pairs
(
Tooltip
.
Tooltips
)
do
if
Tooltip
==
GameTooltip
then
Tooltip
:
Hook
Script
(
"OnUpdate"
,
self
.
OnUpdate
)
Tooltip
:
Hook
Script
(
"OnTooltipSetUnit"
,
self
.
OnTooltipSetUnit
)
Tooltip
:
Hook
Script
(
"OnTooltipSetItem"
,
self
.
OnTooltipSetItem
)
Tooltip
:
Set
Script
(
"OnUpdate"
,
self
.
OnUpdate
)
Tooltip
:
Set
Script
(
"OnTooltipSetUnit"
,
self
.
OnTooltipSetUnit
)
Tooltip
:
Set
Script
(
"OnTooltipSetItem"
,
self
.
OnTooltipSetItem
)
end
Tooltip
:
Hook
Script
(
"OnShow"
,
self
.
Skin
)
Tooltip
:
Set
Script
(
"OnShow"
,
self
.
Skin
)
end
ItemRefCloseButton
:
SkinCloseButton
()
...
...
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