Skip to content

Commit 42da2e1

Browse files
committed
Added S3 support
1 parent 53743a6 commit 42da2e1

File tree

2 files changed

+42
-14
lines changed

2 files changed

+42
-14
lines changed

LazyCurve.lua

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,30 @@ LazyCurve.lastMsgTime = 0
2727

2828
--- @private
2929
function LazyCurve:OnCancel(CancelButton)
30-
if(self.DB.enableSimulation) then
30+
if (self.DB.enableSimulation) then
3131
LazyCurve:OnSignUp(CancelButton)
3232
end
3333
end
3434

3535
--- @private
3636
--- @param SignUpButton LFGListApplicationDialog_SignUpButton|LFGListApplicationDialog_CancelButton
3737
function LazyCurve:OnSignUp(SignUpButton)
38-
if(self.DB.whisperOnApply ~= true) then
38+
if (self.DB.whisperOnApply ~= true) then
3939
return
4040
end
4141
--- @type LFGListApplicationDialog
4242
local dialog = SignUpButton:GetParent()
4343
local resultID = dialog.resultID
4444
local resultInfo = C_LFGList.GetSearchResultInfo(resultID)
4545

46-
if(resultInfo) then
46+
if (resultInfo) then
4747
local leaderName = resultInfo.leaderName
4848
local activityInfo = C_LFGList.GetActivityInfoTable(resultInfo.activityID or resultInfo.activityIDs[1])
4949
local infoTable = activityInfo
5050
and activityInfo.groupFinderActivityGroupID
5151
and LazyCurve.utils.searchEntryMenu:GetInfoTableByActivityGroup(activityInfo.groupFinderActivityGroupID, true)
5252

53-
if(infoTable) then
53+
if (infoTable) then
5454
local achievementList = {}
5555

5656
for _, activityTable in ipairs(infoTable) do
@@ -67,15 +67,15 @@ function LazyCurve:OnSignUp(SignUpButton)
6767
message = message .. ' ' .. GetAchievementLink(achievementId)
6868
end
6969
if message == '' then
70-
if(self.DB.enableSimulation) then self:SimulationPrint('no achievements found to whisper') end
70+
if (self.DB.enableSimulation) then self:SimulationPrint('no achievements found to whisper') end
7171
return
7272
end
7373

74-
if(self.DB.advertise) then
74+
if (self.DB.advertise) then
7575
message = self.PREFIX .. message;
7676
end
7777

78-
if(self.DB.enableSimulation) then
78+
if (self.DB.enableSimulation) then
7979
self:SimulationPrint('Intent to whisper "', leaderName, '" with message:', message)
8080
return
8181
end
@@ -100,7 +100,7 @@ end
100100

101101
--- @private
102102
function LazyCurve:SimulationPrint(...)
103-
if(self.DB.enableSimulation) then
103+
if (self.DB.enableSimulation) then
104104
self:Print('[sim active]', ...)
105105
end
106106
end
@@ -130,11 +130,11 @@ function LazyCurve:ProcessMsg(message)
130130
message = self.utils.achievement.ReplaceKeywordWithAchievementLink(self, message, 'edge', edge);
131131
end
132132

133-
if(original ~= message and self.DB.advertise) then
133+
if (original ~= message and self.DB.advertise) then
134134
message = self.PREFIX .. message
135135
end
136136

137-
if(original ~= message and self.DB.enableSimulation) then
137+
if (original ~= message and self.DB.enableSimulation) then
138138
self:SimulationPrint('Intent to replace message with:', message)
139139
return original
140140
end
@@ -149,16 +149,20 @@ end
149149

150150
--- @private
151151
function LazyCurve:SendChatMessage(msg, chatType, language, channel)
152-
self.hooks.SendChatMessage(self:ProcessMsg(msg), chatType, language, channel);
152+
if C_ChatInfo.SendChatMessage then
153+
self.hooks[C_ChatInfo].SendChatMessage(self:ProcessMsg(msg), chatType, language, channel);
154+
else
155+
self.hooks.SendChatMessage(self:ProcessMsg(msg), chatType, language, channel);
156+
end
153157
end
154158

155159
--- @private
156160
function LazyCurve:SendAchievement(leaderName, achievementId)
157161
local message = GetAchievementLink(achievementId)
158-
if(self.DB.advertise) then
162+
if (self.DB.advertise) then
159163
message = self.PREFIX .. message
160164
end
161-
if(self.DB.enableSimulation) then
165+
if (self.DB.enableSimulation) then
162166
self:SimulationPrint('Intent to whisper "', leaderName, '" with message:', message)
163167
return
164168
end
@@ -173,7 +177,11 @@ function LazyCurve:OnInitialize()
173177

174178
self.Config:Initialize()
175179

176-
self:RawHook('SendChatMessage', true)
180+
if C_ChatInfo.SendChatMessage then
181+
self:RawHook(C_ChatInfo, 'SendChatMessage', true)
182+
else
183+
self:RawHook('SendChatMessage', true)
184+
end
177185
self:RawHook('BNSendWhisper', true)
178186
Menu.ModifyMenu('MENU_LFG_FRAME_SEARCH_ENTRY', function(owner, rootDescription)
179187
self:OnMenuOpen(owner, rootDescription)

modules/WarWithin/TheWarWIthin.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,26 @@ Module.shortName = "TWW"
1515
function Module:GetInfoTable()
1616
--- @type LazyCurveActivityTable[]
1717
local infoTable = {
18+
{
19+
shortName = "MFO",
20+
alternativeKeyword = "dimensius",
21+
groupId = 378,
22+
achievements = {
23+
normal = 41598,
24+
curve = 41624,
25+
edge = 41625,
26+
mythic = {
27+
41604, -- Plexus Sentinel
28+
41605, -- Loom'ithar
29+
41606, -- Soulbinder Naazindhri
30+
41607, -- Forgeweaver Araz
31+
41608, -- The Soul Hunters
32+
41609, -- Fractillus
33+
41610, -- Nexus-King Salhadaar
34+
41611, -- Dimensius, the All-Devouring
35+
},
36+
},
37+
},
1838
{
1939
shortName = "LoU",
2040
alternativeKeyword = "gallywix",

0 commit comments

Comments
 (0)