wow-addons/WA-ChannelSpy/ChannelSpy.table

141 lines
5.5 KiB
Plaintext
Raw Normal View History

2021-05-26 22:29:43 +02:00
{
"d": {
"actions": {
"finish": [],
"init": {
"custom": "-- Config\naura_env.lastUpdate = 0\nlocal channelRoster = {}\nlocal chatFrame = DEFAULT_CHAT_FRAME\nfor i = 1, NUM_CHAT_WINDOWS do\n local frame = getglobal(\"ChatFrame\"..i)\n if frame.name == \"ChannelSpy\" then\n chatFrame = frame\n break\n end\nend\n\n\nlocal function log(s)\n local timestamp = date(\"%H|cFF808080:|r%M|cFF808080:|r%S\")\n chatFrame:AddMessage(string.format(\"[|cFFAAAAFFChannelSpy|r] %s %s\", timestamp, s))\n if ChannelSpyDB ~= nil then\n table.insert(ChannelSpyDB, date() .. \" \" .. s)\n end\nend\n\n\nlocal function classColoredName(guid)\n local _, englishClass, _, _, _, name = GetPlayerInfoByGUID(guid)\n return RAID_CLASS_COLORS[englishClass]:WrapTextInColorCode(name)\nend\n\n\naura_env.eventHandlers = {}\n\n\nfunction aura_env.eventHandlers.PLAYER_ENTERING_WORLD(isInitialLogin, isReloadingUi)\n ChannelFrame:Show()\n C_Timer.After(3, function()\n ChannelFrame:Hide()\n end)\n return true\nend\n\n\nfunction aura_env.eventHandlers.WA_CHANNELSPY_UPDATE()\n ChannelFrame.ChannelList:SelectChannelByName(\"General\")\n ChannelFrame.ChannelList:SelectChannelByName(\"world\")\n return true\nend\n\n\nfunction aura_env.eventHandlers.CHANNEL_ROSTER_UPDATE(channelIndex, count)\n if GetChannelDisplayInfo(channelIndex):lower() ~= \"world\" then\n return false\n end\n \n for guid, isOnline in pairs(channelRoster) do\n channelRoster[guid] = false\n end\n \n local rosterIndex = 1\n while true do\n local name, _, _, guid = C_ChatInfo.GetChannelRosterInfo(channelIndex, rosterIndex)\n if guid == nil then\n break\n end\n \n if channelRoster[guid] == nil then\n log(classColoredName(guid) .. \" |cFF00FF00joined|r.\")\n end\n \n channelRoster[guid] = true\n rosterIndex = rosterIndex + 1\n end\n \n for guid, isOnline in pairs(channelRoster) do\n if not isOnline then\n log(classColoredName(guid) .. \" |cFFFF0000left|r.\")\n channelRoster[guid] = nil\n end\n end\n \n return true\nend\n\n\nfunction aura_env.eventHandlers.OPTIONS()\n return false\nend",
"do_custom": true
},
"start": []
},
"anchorFrameType": "SCREEN",
"anchorPoint": "CENTER",
"animation": {
"finish": {
"duration_type": "seconds",
"easeStrength": 3,
"easeType": "none",
"type": "none"
},
"main": {
"duration_type": "seconds",
"easeStrength": 3,
"easeType": "none",
"type": "none"
},
"start": {
"duration_type": "seconds",
"easeStrength": 3,
"easeType": "none",
"type": "none"
}
},
"authorOptions": [],
"automaticWidth": "Auto",
"color": [
1,
1,
1,
1
],
"conditions": [],
"config": [],
"customTextUpdate": "event",
"displayText": "",
"displayText_format_p_format": "timed",
"displayText_format_p_time_dynamic_threshold": 60,
"displayText_format_p_time_format": 0,
"displayText_format_p_time_precision": 1,
"fixedWidth": 200,
"font": "Friz Quadrata TT",
"fontSize": 12,
"frameStrata": 1,
"id": "ChannelSpy",
"information": {
"ignoreOptionsEventErrors": false
},
"internalVersion": 45,
"justify": "LEFT",
"load": {
"class": {
"multi": []
},
"namerealm": "Acb",
"size": {
"multi": []
},
"spec": {
"multi": []
},
"talent": {
"multi": []
},
"use_namerealm": true,
"use_never": true,
"zoneIds": ""
},
"outline": "OUTLINE",
"regionType": "text",
"selfPoint": "BOTTOM",
"semver": "1.0.0",
"shadowColor": [
0,
0,
0,
1
],
"shadowXOffset": 1,
"shadowYOffset": -1,
"subRegions": [],
"tocversion": 11307,
"triggers": {
"1": {
"trigger": {
"custom": "function(event, ...)\n return aura_env.eventHandlers[event](...)\nend",
"custom_hide": "custom",
"custom_type": "event",
"debuffType": "HELPFUL",
"event": "Health",
"events": "PLAYER_ENTERING_WORLD WA_CHANNELSPY_UPDATE CHANNEL_ROSTER_UPDATE",
"names": [],
"spellIds": [],
"subeventPrefix": "SPELL",
"subeventSuffix": "_CAST_START",
"type": "custom",
"unit": "player"
},
"untrigger": []
},
"2": {
"trigger": {
"check": "update",
"custom": "function()\n local time = GetTime()\n if time > aura_env.lastUpdate + 1 then\n WeakAuras.ScanEvents(\"WA_CHANNELSPY_UPDATE\")\n aura_env.lastUpdate = time\n return true\n end\n return false\nend",
"custom_hide": "timed",
"custom_type": "status",
"debuffType": "HELPFUL",
"event": "Health",
"names": [],
"spellIds": [],
"subeventPrefix": "SPELL",
"subeventSuffix": "_CAST_START",
"type": "custom",
"unit": "player"
},
"untrigger": []
},
"activeTriggerMode": -10,
"disjunctive": "any"
},
"uid": "eMepiRFVRMj",
"url": "https://wago.io/uZvB1CEF6/1",
"version": 1,
"wagoID": "uZvB1CEF6",
"wordWrap": "WordWrap",
"xOffset": 0,
"yOffset": 0
},
"m": "d",
"s": "3.3.0",
"v": 1421,
"wagoID": "uZvB1CEF6"
}