Skip to content

Commit d2cdabc

Browse files
committed
More fixes for Midnight
1 parent 2584453 commit d2cdabc

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

Transcriptor.lua

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,9 @@ function sh.PLAYER_TARGET_CHANGED()
11711171
end
11721172

11731173
function sh.UNIT_TARGETABLE_CHANGED(unit)
1174-
return format("-%s- [CanAttack:%s#Exists:%s#IsVisible:%s#Name:%s#GUID:%s#Classification:%s#Health:%s]", tostringall(unit, UnitCanAttack("player", unit), UnitExists(unit), UnitIsVisible(unit), TSUnitName(unit), UnitGUID(unit), UnitClassification(unit), (UnitHealth(unit))))
1174+
if not issecretvalue(unit) then
1175+
return format("-%s- [CanAttack:%s#Exists:%s#IsVisible:%s#Name:%s#GUID:%s#Classification:%s#Health:%s]", tostringall(unit, UnitCanAttack("player", unit), UnitExists(unit), UnitIsVisible(unit), TSUnitName(unit), UnitGUID(unit), UnitClassification(unit), (UnitHealth(unit))))
1176+
end
11751177
end
11761178

11771179
do
@@ -1184,8 +1186,10 @@ do
11841186
}
11851187
function sh.UNIT_POWER_UPDATE(unit, typeName)
11861188
if not allowedPowerUnits[unit] then return end
1189+
local currentPower = UnitPower(unit)
1190+
if issecretvalue(currentPower) then return end
11871191
local powerType = format("TYPE:%s/%d", typeName, UnitPowerType(unit))
1188-
local mainPower = format("MAIN:%d/%d", UnitPower(unit), UnitPowerMax(unit))
1192+
local mainPower = format("MAIN:%d/%d", currentPower, UnitPowerMax(unit))
11891193
local altPower = format("ALT:%d/%d", UnitPower(unit, 10), UnitPowerMax(unit, 10))
11901194
return strjoin("#", unit, TSUnitName(unit), powerType, mainPower, altPower)
11911195
end
@@ -1289,7 +1293,7 @@ function sh.CHAT_MSG_ADDON(prefix, msg, channel, sender)
12891293
end
12901294

12911295
function sh.CHAT_MSG_RAID_BOSS_EMOTE(msg, npcName, ...)
1292-
if issecretvalue(msg) then return "SECRET" end
1296+
if issecretvalue(msg) then return "<secret value>" end
12931297
local id = strmatch(msg, "|Hspell:([^|]+)|h")
12941298
if id then
12951299
local spellId = tonumber(id)
@@ -1310,12 +1314,12 @@ function sh.CHAT_MSG_RAID_BOSS_EMOTE(msg, npcName, ...)
13101314
end
13111315

13121316
function sh.CHAT_MSG_RAID_BOSS_WHISPER(msg, npcName, ...)
1313-
if issecretvalue(msg) then return "SECRET" end
1317+
if issecretvalue(msg) then return "<secret value>" end
13141318
return strjoin("#", msg, npcName, tostringall(...))
13151319
end
13161320

13171321
function sh.CHAT_MSG_MONSTER_YELL(msg, ...)
1318-
if issecretvalue(msg) then return "SECRET" end
1322+
if issecretvalue(msg) then return "<secret value>" end
13191323
return strjoin("#", msg, tostringall(...))
13201324
end
13211325
sh.CHAT_MSG_MONSTER_EMOTE = sh.CHAT_MSG_MONSTER_YELL
@@ -1511,6 +1515,10 @@ local eventCategories = {
15111515
ENCOUNTER_START = "COMBAT",
15121516
ENCOUNTER_END = "COMBAT",
15131517
BOSS_KILL = "COMBAT",
1518+
ENCOUNTER_TIMELINE_EVENT_ADDED = "ENCOUNTER",
1519+
ENCOUNTER_TIMELINE_EVENT_REMOVED = "ENCOUNTER",
1520+
ENCOUNTER_TIMELINE_EVENT_STATE_CHANGED = "ENCOUNTER",
1521+
ENCOUNTER_WARNING = "ENCOUNTER",
15141522
INSTANCE_ENCOUNTER_ENGAGE_UNIT = "COMBAT",
15151523
UNIT_TARGETABLE_CHANGED = "COMBAT",
15161524
CHAT_MSG_MONSTER_EMOTE = "MONSTER",
@@ -2036,15 +2044,15 @@ do
20362044
local auraTbl = GetAuraDataByIndex(unit, i, "HELPFUL")
20372045
if not auraTbl then
20382046
break
2039-
elseif not hiddenAuraEngageList[auraTbl.spellId] then
2047+
elseif not issecretvalue(auraTbl.spellId) and not hiddenAuraEngageList[auraTbl.spellId] then
20402048
hiddenAuraEngageList[auraTbl.spellId] = true
20412049
end
20422050
end
20432051
for i = 1, 100 do
20442052
local auraTbl = GetAuraDataByIndex(unit, i, "HARMFUL")
20452053
if not auraTbl then
20462054
break
2047-
elseif not hiddenAuraEngageList[auraTbl.spellId] then
2055+
elseif not issecretvalue(auraTbl.spellId) and not hiddenAuraEngageList[auraTbl.spellId] then
20482056
hiddenAuraEngageList[auraTbl.spellId] = true
20492057
end
20502058
end

0 commit comments

Comments
 (0)