-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlfgPrintGroupName.lua
56 lines (44 loc) · 1.59 KB
/
lfgPrintGroupName.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
-------------------------------------------------------------------------------
-- init
local scan = _G['INK_PRINT_LFG_GROUP_NAME_INITIALIZED']
if scan == nil then
_G['INK_PRINT_LFG_GROUP_NAME_INITIALIZED'] = true
local popupFrame = LFGListInviteDialog
local callback = function()
WeakAuras.ScanEvents("INK_PRINT_LFG_GROUP_NAME",
popupFrame.ActivityName:GetText(),
popupFrame.GroupName:GetText())
end
popupFrame.AcceptButton:HookScript("OnClick", callback)
popupFrame.AcknowledgeButton:HookScript("OnClick", callback)
end
-------------------------------------------------------------------------------
-- TSU: INK_PRINT_LFG_GROUP_NAME
function(allstates, event, activityName, groupName)
if event ~= 'INK_PRINT_LFG_GROUP_NAME' then
return false
end
if aura_env.activityName ~= activityName
or aura_env.groupName ~= groupName then
aura_env.activityName = activityName
aura_env.groupName = groupName
allstates[''] = {
['show'] = true,
['changed'] = true,
['progressType'] = 'timed',
['expirationTime'] = GetTime() + 0.01,
['duration'] = 0.01,
['autoHide'] = true,
['activityName'] = activityName,
['groupName'] = groupName
}
return true
end
return false
end
-------------------------------------------------------------------------------
-- custom variables
{
['activityName'] = 'string',
['groupName'] = 'string'
}