Skip to content

Commit 344faa7

Browse files
committed
Update for patch 10.0
1 parent 05aa3cc commit 344faa7

File tree

4 files changed

+40
-24
lines changed

4 files changed

+40
-24
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Version 1.10
2+
3+
- Updated ToC version for patch 9.2
4+
15
Version 1.09
26

37
- Updated ToC version for patch 9.15

CHANGES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
- Updated ToC version for patch 9.2
1+
- Updated ToC version for patch 10.0
2+
- Fixed errors from 10.0 changes

CantTouchThis.lua

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ local LINE = ({
2222

2323
-- Register events
2424
Addon.frame = CreateFrame("Frame")
25-
Addon.frame:SetScript("OnEvent", function (self, e, ...) Addon[e](...) end)
25+
Addon.frame:SetScript("OnEvent", function(self, e, ...) Addon[e](...) end)
2626
Addon.frame:RegisterEvent("ADDON_LOADED")
2727
Addon.frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
2828

@@ -50,30 +50,33 @@ function Addon.COMBAT_LOG_EVENT_UNFILTERED()
5050
if not (info and details) then return end
5151

5252
-- Check if it's a CC we are interested in
53-
if bit.band(info, PS.constants.CROWD_CTRL) > 0 and bit.band(details, Addon.CC_TYPES) > 0 then
54-
local npcId = Addon.GetNPCId(destGUID)
55-
if npcId and not Addon.immuneKnown[npcId] then
56-
if event == "SPELL_AURA_APPLIED" then
57-
Addon.stunned[npcId] = true
58-
Addon.immuneFound[npcId] = nil
59-
elseif event == "SPELL_MISSED" and not Addon.stunned[npcId] then
60-
Addon.immuneFound[npcId] = true
61-
end
62-
end
53+
if bit.band(info, PS.constants.CROWD_CTRL) == 0 or bit.band(details, Addon.CC_TYPES) == 0 then return end
54+
55+
-- Check if the NPC is valid and if we know its immunity yet
56+
local npcId = Addon.GetNPCId(destGUID)
57+
if not npcId then return end
58+
59+
if event == "SPELL_AURA_APPLIED" then
60+
Addon.stunned[npcId] = true
61+
Addon.immuneFound[npcId] = Addon.immuneKnown[npcId] and false or nil
62+
elseif event == "SPELL_MISSED" and not Addon.stunned[npcId] then
63+
Addon.immuneFound[npcId] = true
6364
end
6465
end
6566

6667
-- Unit tooltip
67-
GameTooltip:HookScript('OnTooltipSetUnit', function(self)
68-
local name, unit = GameTooltip:GetUnit()
69-
if unit or name then
70-
local guid = UnitGUID(unit or name)
71-
if guid then
72-
local npcId = Addon.GetNPCId(guid)
73-
if npcId and Addon.immuneFound[npcId] or Addon.immuneKnown[npcId] then
74-
GameTooltip:AddLine(LINE)
75-
end
76-
end
68+
TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Unit, function(tooltip)
69+
local name, unit = tooltip:GetUnit()
70+
if not (unit or name) then return end
71+
72+
local guid = UnitGUID(unit or name)
73+
if not guid then return end
74+
75+
local npcId = Addon.GetNPCId(guid)
76+
if not npcId then return end
77+
78+
if Addon.immuneFound[npcId] or Addon.immuneFound[npcId] ~= false and Addon.immuneKnown[npcId] then
79+
tooltip:AddLine(LINE)
7780
end
7881
end)
7982

@@ -432,6 +435,7 @@ Addon.immuneKnown = {
432435
[118462] = true,
433436
[118523] = true,
434437
[118729] = true,
438+
[118791] = true,
435439
[119107] = true,
436440
[120019] = true,
437441
[120021] = true,
@@ -886,6 +890,7 @@ Addon.immuneKnown = {
886890
[154564] = true,
887891
[154565] = true,
888892
[154583] = true,
893+
[154586] = true,
889894
[154641] = true,
890895
[154727] = true,
891896
[154816] = true,
@@ -1077,12 +1082,14 @@ Addon.immuneKnown = {
10771082
[166140] = true,
10781083
[166142] = true,
10791084
[166146] = true,
1085+
[166266] = true,
10801086
[166393] = true,
10811087
[166521] = true,
10821088
[166644] = true,
10831089
[166969] = true,
10841090
[166970] = true,
10851091
[167111] = true,
1092+
[167524] = true,
10861093
[167527] = true,
10871094
[167533] = true,
10881095
[167534] = true,
@@ -1113,6 +1120,7 @@ Addon.immuneKnown = {
11131120
[168934] = true,
11141121
[168942] = true,
11151122
[168973] = true,
1123+
[168988] = true,
11161124
[169035] = true,
11171125
[169102] = true,
11181126
[169157] = true,
@@ -1152,6 +1160,7 @@ Addon.immuneKnown = {
11521160
[173195] = true,
11531161
[173276] = true,
11541162
[173280] = true,
1163+
[173360] = true,
11551164
[173444] = true,
11561165
[173445] = true,
11571166
[173446] = true,
@@ -1181,4 +1190,6 @@ Addon.immuneKnown = {
11811190
[175877] = true,
11821191
[175992] = true,
11831192
[176173] = true,
1184-
}
1193+
[179472] = true,
1194+
[179760] = true,
1195+
}

CantTouchThis.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Interface: 90200
1+
## Interface: 100002
22
## Title: CantTouchThis
33
## Notes: Remember and show if mobs are immune to crowd control.
44
## Notes-deDE: Merke und zeige, wenn Gegner gegen Kontrolleffekte immun sind.

0 commit comments

Comments
 (0)