Skip to content

Commit 462f319

Browse files
committed
Merge branch 'develop'
2 parents bc6b8a8 + a83f3cf commit 462f319

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

Core.lua

-1
Original file line numberDiff line numberDiff line change
@@ -1752,7 +1752,6 @@ addon.groupieLDB = LibStub("LibDataBroker-1.1"):NewDataObject(addonName, {
17521752
addon.OpenConfig()
17531753
else
17541754
addon.LFGMode = not addon.LFGMode
1755-
--TODO: Change minimap icon, play LFG sound
17561755
if addon.LFGMode then
17571756
PlaySound(8458)
17581757
addon.icon:ChangeTexture("Interface\\AddOns\\" .. addonName .. "\\Images\\lfg64.tga", "GroupieLDB")

GroupBrowser.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ function GroupieGroupBrowser:MapResultToListing(resultID, resultData, leader, me
10591059
GroupieGroupBrowser:SendMessage("GROUPIE_GROUPBROWSER_UPDATE", resultID)
10601060
-- We can Groupie:RegisterMessage("GROUPIE_GROUPBROWSER_UPDATE", callback) and do something in our callback function when a listing is added from this module
10611061

1062-
if isNewListing then --If the listing is new, we can autoRespond
1062+
if isNewListing and Groupie.LFGMode then --If the listing is new, we can autoRespond
10631063
--Find the group type string for auto response options
10641064
local optionsGroupType = nil
10651065
if lootType == "PVP" then

Listener.lua

+11-3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ function addon.CanRespondOrSound(author, order, minlevel, maxlevel)
3333
--Dont auto respond if:--
3434
-------------------------
3535

36+
--LFG mode is off
37+
if not addon.LFGMode then return false end
38+
3639
--Its our own group
3740
if myname == author then return false end
3841

@@ -69,7 +72,9 @@ end
6972
--Decide whether to auto respond
7073
function addon.ShouldAutoRespond(author, groupType)
7174

72-
local resting = IsResting()
75+
--Return if LFG mode is off
76+
if not addon.LFGMode then return false end
77+
7378
local responseType = addon.db.char.autoResponseOptions[groupType].responseType
7479
--Responses are disabled for this group type
7580
if responseType == 7 then return false end
@@ -90,7 +95,10 @@ end
9095

9196
--Decide whether to play an alert sound
9297
function addon.ShouldPlaySound(author, groupType)
93-
local resting = IsResting()
98+
99+
--Return if LFG mode is off
100+
if not addon.LFGMode then return false end
101+
94102
local soundType = addon.db.char.autoResponseOptions[groupType].soundType
95103

96104
--Responses are disabled for this group type
@@ -482,7 +490,7 @@ local function ParseMessage(event, msg, author, _, channel, guid)
482490
addon.db.global.listingTable[author].classColor = classColor
483491
addon.db.global.listingTable[author].resultID = nil -- Required to prevent /4 listings from being overwritten by LFG listings
484492

485-
if isNewListing and addon.LFGMode == true then --If the listing is new, we can autoRespond
493+
if isNewListing and addon.LFGMode then --If the listing is new, we can autoRespond
486494
--Find the group type string for auto response options
487495
local optionsGroupType = nil
488496
if lootType == "PVP" then

0 commit comments

Comments
 (0)