@@ -61,8 +61,8 @@ local GetZoneText, GetRealZoneText, GetSubZoneText = GetZoneText, GetRealZoneTex
6161local GetSpellName = C_Spell .GetSpellName
6262local GetBestMapForUnit = C_Map .GetBestMapForUnit
6363local C_GossipInfo_GetOptions = C_GossipInfo .GetOptions
64- local issecretvalue = issecretvalue or function () return false end
65- local ShouldAurasBeSecret = C_Secrets and C_Secrets .ShouldAurasBeSecret or function () return false end
64+ local issecretvalue = issecretvalue
65+ local ShouldAurasBeSecret = C_Secrets .ShouldAurasBeSecret
6666local mapvalues = mapvalues
6767local function ReplaceSecrets (value ) if issecretvalue (value ) then return " <secret>" else return value end end
6868
@@ -1234,11 +1234,7 @@ do
12341234
12351235 function sh .UNIT_TARGET (unit )
12361236 if safeUnit (unit ) then
1237- if mapvalues then
1238- return format (" %s#%s#Target: %s#TargetOfTarget: %s" , unit , tostringall (mapvalues (ReplaceSecrets , TSUnitName (unit ), TSUnitName (unit .. " target" ), TSUnitName (unit .. " targettarget" ))))
1239- else
1240- return format (" %s#%s#Target: %s#TargetOfTarget: %s" , unit , tostring (TSUnitName (unit )), tostring (TSUnitName (unit .. " target" )), tostring (TSUnitName (unit .. " targettarget" )))
1241- end
1237+ return format (" %s#%s#Target: %s#TargetOfTarget: %s" , unit , tostringall (mapvalues (ReplaceSecrets , TSUnitName (unit ), TSUnitName (unit .. " target" ), TSUnitName (unit .. " targettarget" ))))
12421238 end
12431239 end
12441240end
@@ -1253,24 +1249,12 @@ function sh.PLAYER_TARGET_CHANGED()
12531249 local creatureType = UnitCreatureType (" target" ) or " nil"
12541250 local typeclass = classification == " normal" and creatureType or (classification .. " " .. creatureType )
12551251 local name = TSUnitName (" target" )
1256- if mapvalues then
1257- return (format (" %s %s (%s) - %s # %s" , tostringall (mapvalues (ReplaceSecrets , level , reaction , typeclass , name , guid ))))
1258- else
1259- return (format (" %s %s (%s) - %s # %s" , tostring (level ), tostring (reaction ), tostring (typeclass ), tostring (name ), tostring (guid )))
1260- end
1252+ return (format (" %s %s (%s) - %s # %s" , tostringall (mapvalues (ReplaceSecrets , level , reaction , typeclass , name , guid ))))
12611253 end
12621254end
12631255
12641256function sh .UNIT_TARGETABLE_CHANGED (unit )
1265- if not issecretvalue (unit ) then
1266- if mapvalues then
1267- return format (" -%s- [CanAttack:%s#Exists:%s#IsVisible:%s#Name:%s#GUID:%s#Classification:%s#Health:%s]" , tostringall (unit , mapvalues (ReplaceSecrets , UnitCanAttack (" player" , unit ), UnitExists (unit ), UnitIsVisible (unit ), TSUnitName (unit ), TSUnitGUID (unit ), UnitClassification (unit ), (UnitHealth (unit )))))
1268- else
1269- 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 ), TSUnitGUID (unit ), UnitClassification (unit ), (UnitHealth (unit ))))
1270- end
1271- else
1272- return " <secret>"
1273- end
1257+ return format (" -%s- [CanAttack:%s#Exists:%s#IsVisible:%s#Name:%s#GUID:%s#Classification:%s#Health:%s]" , tostringall (unit , mapvalues (ReplaceSecrets , UnitCanAttack (" player" , unit ), UnitExists (unit ), UnitIsVisible (unit ), TSUnitName (unit ), TSUnitGUID (unit ), UnitClassification (unit ), (UnitHealth (unit )))))
12741258end
12751259
12761260do
@@ -1384,7 +1368,7 @@ function sh.CINEMATIC_START(...)
13841368end
13851369
13861370function sh .CHAT_MSG_ADDON (prefix , msg , channel , sender )
1387- if not issecretvalue ( msg ) and prefix == " Transcriptor" and (channel == " RAID" or channel == " PARTY" or channel == " INSTANCE_CHAT" ) then
1371+ if prefix == " Transcriptor" and (channel == " RAID" or channel == " PARTY" or channel == " INSTANCE_CHAT" ) then
13881372 return strjoin (" #" , " RAID_BOSS_WHISPER_SYNC" , msg , sender )
13891373 end
13901374end
@@ -1414,19 +1398,11 @@ function sh.CHAT_MSG_RAID_BOSS_EMOTE(msg, npcName, ...)
14141398end
14151399
14161400function sh .CHAT_MSG_RAID_BOSS_WHISPER (...)
1417- if mapvalues then
1418- return strjoin (" #" , tostringall (mapvalues (ReplaceSecrets , ... )))
1419- else
1420- return strjoin (" #" , tostringall (... ))
1421- end
1401+ return strjoin (" #" , tostringall (mapvalues (ReplaceSecrets , ... )))
14221402end
14231403
14241404function sh .CHAT_MSG_MONSTER_YELL (...)
1425- if mapvalues then
1426- return strjoin (" #" , tostringall (mapvalues (ReplaceSecrets , ... )))
1427- else
1428- return strjoin (" #" , tostringall (... ))
1429- end
1405+ return strjoin (" #" , tostringall (mapvalues (ReplaceSecrets , ... )))
14301406end
14311407sh .CHAT_MSG_MONSTER_EMOTE = sh .CHAT_MSG_MONSTER_YELL
14321408sh .CHAT_MSG_MONSTER_SAY = sh .CHAT_MSG_MONSTER_YELL
@@ -2131,26 +2107,14 @@ init:RegisterEvent("PLAYER_LOGIN")
21312107local function BWEventHandler (event , module , ...)
21322108 if type (module ) == " table" then
21332109 if module .baseName == " BigWigs_CommonAuras" then return end
2134- if mapvalues then
2135- eventHandler (eventFrame , event , module .moduleName , mapvalues (ReplaceSecrets , ... ))
2136- else
2137- eventHandler (eventFrame , event , module .moduleName , ... )
2138- end
2110+ eventHandler (eventFrame , event , module .moduleName , mapvalues (ReplaceSecrets , ... ))
21392111 else
2140- if mapvalues then
2141- eventHandler (eventFrame , event , module , mapvalues (ReplaceSecrets , ... ))
2142- else
2143- eventHandler (eventFrame , event , module , ... )
2144- end
2112+ eventHandler (eventFrame , event , module , mapvalues (ReplaceSecrets , ... ))
21452113 end
21462114end
21472115
21482116local function DBMEventHandler (...)
2149- if mapvalues then
2150- eventHandler (eventFrame , mapvalues (ReplaceSecrets , ... ))
2151- else
2152- eventHandler (eventFrame , ... )
2153- end
2117+ eventHandler (eventFrame , mapvalues (ReplaceSecrets , ... ))
21542118end
21552119
21562120do
0 commit comments