Skip to content

Commit

Permalink
LookingForGroup : update version
Browse files Browse the repository at this point in the history
  • Loading branch information
YellowDi committed Jul 27, 2017
1 parent c67986e commit 1aacf70
Show file tree
Hide file tree
Showing 18 changed files with 94 additions and 38 deletions.
5 changes: 3 additions & 2 deletions Interface/AddOns/LookingForGroup/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
------------------------------------------------------------------------
r270 | euloanty@live.com | 2017-07-24 10:07:12 -0500 (Mon, 24 Jul 2017) | 1 line
r277 | euloanty@live.com | 2017-07-25 06:55:35 -0500 (Tue, 25 Jul 2017) | 1 line
Changed paths:
M /trunk/Options/options/Core.lua
M /trunk/WQ/Core.lua

fix a bug which potential causes background search conflict with WQ
world quest adds auto leave party feature
------------------------------------------------------------------------

2 changes: 1 addition & 1 deletion Interface/AddOns/LookingForGroup/LookingForGroup.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 70200
## Author: cqwrteur
## Title: LookingForGroup
## Version: 271
## Version: 278
## SavedVariables: LookingForGroupDB

#@no-lib-strip@
Expand Down
2 changes: 1 addition & 1 deletion Interface/AddOns/LookingForGroup_AV/LookingForGroup_AV.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Author: cqwrteur
## Title: LookingForGroup Alterac Valley
## Dependencies: LookingForGroup
## Version: 271
## Version: 278
## SavedVariablesPerCharacter: LookingForGroup_AVCharacterDB
## LoadOnDemand: 1

Expand Down
2 changes: 1 addition & 1 deletion Interface/AddOns/LookingForGroup_CR/LookingForGroup_CR.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 70200
## Author: cqwrteur
## Title: LookingForGroup Cross Realm
## Version: 271
## Version: 278
## Dependencies: LookingForGroup
## LoadOnDemand: 1

Expand Down
33 changes: 22 additions & 11 deletions Interface/AddOns/LookingForGroup_Core/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,12 @@ function LookingForGroup_Core.GetSearchResultInfo(resultID)
concat_tb[#concat_tb+1] = "\n"
concat_tb[#concat_tb+1] = leaderName
end
if voiceChat and voiceChat~="" then
concat_tb[#concat_tb+1] = "\n"
concat_tb[#concat_tb+1] = LFG_LIST_VOICE_CHAT
concat_tb[#concat_tb+1] = " "
concat_tb[#concat_tb+1] = voiceChat
if voiceChat and voiceChat ~= "" then
table_insert(concat_tb,"\n")
table_insert(concat_tb,LFG_LIST_VOICE_CHAT)
table_insert(concat_tb," |c0000ff00")
table_insert(concat_tb,voiceChat)
table_insert(concat_tb,"|r")
end
if autoaccept then
concat_tb[#concat_tb+1] = "\n"
Expand Down Expand Up @@ -312,11 +313,12 @@ function LookingForGroup_Core.GetQuestSearchResultInfo(resultID)
concat_tb[#concat_tb+1] = "\n"
concat_tb[#concat_tb+1] = leaderName
end
if voiceChat and voiceChat~="" then
concat_tb[#concat_tb+1] = "\n"
concat_tb[#concat_tb+1] = LFG_LIST_VOICE_CHAT_INSTR
concat_tb[#concat_tb+1] = " "
concat_tb[#concat_tb+1] = voiceChat
if voiceChat and voiceChat ~= "" then
table_insert(concat_tb,"\n")
table_insert(concat_tb,LFG_LIST_VOICE_CHAT)
table_insert(concat_tb," |c0000ff00")
table_insert(concat_tb,voiceChat)
table_insert(concat_tb,"|r")
end
if autoaccept then
concat_tb[#concat_tb+1] = "\n"
Expand Down Expand Up @@ -402,7 +404,16 @@ function LookingForGroup_Core.GetActiveEntryInfo()
table_insert(concat_tb,"/")
table_insert(concat_tb,damager)
table_insert(concat_tb,")|r")
if questID == nil and comment ~= nil and comment ~= "" then

if voiceChat and voiceChat ~= "" then
table_insert(concat_tb,"\n")
table_insert(concat_tb,LFG_LIST_VOICE_CHAT)
table_insert(concat_tb," |c0000ff00")
table_insert(concat_tb,voiceChat)
table_insert(concat_tb,"|r")
end

if questID == nil and comment and comment ~= "" then
table_insert(concat_tb,"\n\n|cff8080cc")
table_insert(concat_tb,comment)
table_insert(concat_tb,"|r")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 70200
## Author: cqwrteur
## Title: LookingForGroup Core
## Version: 271
## Version: 278
## Dependencies: LookingForGroup
## LoadOnDemand: 1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 70200
## Author: cqwrteur
## Title: LookingForGroup Event
## Version: 271
## Version: 278
## Dependencies: LookingForGroup
## LoadOnDemand: 1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 70200
## Author: cqwrteur
## Title: LookingForGroup Hook
## Version: 271
## Version: 278
## Dependencies: LookingForGroup
## LoadOnDemand: 1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 70200
## Author: cqwrteur
## Title: LookingForGroup Icon
## Version: 271
## Version: 278
## Dependencies: LookingForGroup
## LoadOnDemand: 1
## SavedVariablesPerCharacter: LookingForGroup_IconCharacterDB
Expand Down
1 change: 0 additions & 1 deletion Interface/AddOns/LookingForGroup_Options/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function LookingForGroup_Options:OnInitialize()
start_a_group_voice_chat = "",
start_a_group_auto_accept = false,
start_a_group_private = false,
find_a_group_role = true,
find_a_group_filter = "",
find_a_group_encounters = {},
background_music = "sound\\music\\gluescreenmusic\\wow_main_theme.mp3",
Expand Down
10 changes: 6 additions & 4 deletions Interface/AddOns/LookingForGroup_Options/Init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@ function LookingForGroup_Options.FilterSearchResult(groupid)
local profile = LookingForGroup.db.profile
local filters = profile.spam_filter_keywords
local maxlength = profile.spam_filter_maxlength
if maxlength and ( maxlength < name:len() or maxlength < comment:len() ) then
if maxlength and ( maxlength < name:len() or maxlength < comment:len() or maxlength < voiceChat:len() ) then
return true
end
name = name:gsub(" ",""):lower()
comment = comment:gsub(" ",""):lower()
voiceChat = voiceChat:gsub(" ",""):lower()
for i=1,#filters do
local ele = filters[i]
if string_find(name,ele) or string_find(comment,ele) then
if string_find(name,ele) or string_find(comment,ele) or string_find(voiceChat,ele) then
return true
end
end
Expand All @@ -99,14 +100,15 @@ function LookingForGroup_Options.FilterSearchResult(groupid)
local profile = LookingForGroup.db.profile
local filters = profile.spam_filter_keywords
local maxlength = profile.spam_filter_maxlength
if maxlength and ( maxlength < name:len() or maxlength < comment:len() ) then
if maxlength and ( maxlength < name:len() or maxlength < comment:len() or maxlength < voiceChat:len() ) then
return
end
name = name:gsub(" ",""):lower()
comment = comment:gsub(" ",""):lower()
voiceChat = voiceChat:gsub(" ",""):lower()
for i=1,#filters do
local ele = filters[i]
if string_find(name,ele) or string_find(comment,ele) then
if string_find(name,ele) or string_find(comment,ele) or string_find(voiceChat,ele) then
return
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 70200
## Author: cqwrteur
## Title: LookingForGroup Options
## Version: 271
## Version: 278
## Dependencies: LookingForGroup
## SavedVariablesPerCharacter: LookingForGroup_OptionsCharacterDB
## LoadOnDemand: 1
Expand Down
28 changes: 22 additions & 6 deletions Interface/AddOns/LookingForGroup_Options/find/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,11 @@ LookingForGroup_Options:push("find",{
return LookingForGroup_Options.db.profile.find_a_group_role
end,
set = function(info,val)
LookingForGroup_Options.db.profile.find_a_group_role = val
if val then
LookingForGroup_Options.db.profile.find_a_group_role = true
else
LookingForGroup_Options.db.profile.find_a_group_role = nil
end
end
},
class =
Expand All @@ -535,7 +539,11 @@ LookingForGroup_Options:push("find",{
return LookingForGroup_Options.db.profile.find_a_group_class
end,
set = function(info,val)
LookingForGroup_Options.db.profile.find_a_group_class = val
if val then
LookingForGroup_Options.db.profile.find_a_group_class = true
else
LookingForGroup_Options.db.profile.find_a_group_class = nil
end
end
},
complete =
Expand All @@ -547,7 +555,11 @@ LookingForGroup_Options:push("find",{
return LookingForGroup_Options.db.profile.find_a_group_complete
end,
set = function(info,val)
LookingForGroup_Options.db.profile.find_a_group_complete = val
if val then
LookingForGroup_Options.db.profile.find_a_group_complete = true
else
LookingForGroup_Options.db.profile.find_a_group_complete = nil
end
end
},
gold =
Expand All @@ -559,7 +571,11 @@ LookingForGroup_Options:push("find",{
return LookingForGroup_Options.db.profile.find_a_group_gold
end,
set = function(info,val)
LookingForGroup_Options.db.profile.find_a_group_gold = val
if val then
LookingForGroup_Options.db.profile.find_a_group_gold = true
else
LookingForGroup_Options.db.profile.find_a_group_gold = nil
end
end
},
cancel =
Expand All @@ -568,7 +584,7 @@ LookingForGroup_Options:push("find",{
name = CANCEL,
type = "execute",
func = function()
LookingForGroup_Options:RestoreDBVariable("find_a_group_role")
LookingForGroup_Options.db.profile.find_a_group_role = nil
LookingForGroup_Options.db.profile.find_a_group_class = nil
LookingForGroup_Options.db.profile.find_a_group_gold = nil
LookingForGroup_Options.db.profile.find_a_group_complete = nil
Expand All @@ -590,7 +606,7 @@ LookingForGroup_Options:push("find",{
type = "execute",
func = function()
LookingForGroup_Options:RestoreDBVariable("find_a_group_filter")
LookingForGroup_Options:RestoreDBVariable("find_a_group_role")
LookingForGroup_Options.db.profile.find_a_group_role = nil
LookingForGroup_Options.db.profile.find_a_group_class = nil
LookingForGroup_Options.db.profile.find_a_group_gold = nil
LookingForGroup_Options.db.profile.find_a_group_complete = nil
Expand Down
25 changes: 24 additions & 1 deletion Interface/AddOns/LookingForGroup_Options/options/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,29 @@ LookingForGroup_Options:push("options",{
get = function() return LookingForGroup_Options.db.profile.addon_meeting_stone end,
}
}
}
},
wq_config =
{
name = TRACKER_HEADER_WORLD_QUESTS,
type = "group",
args =
{
leave_party =
{
name = PARTY_LEAVE,
type = "toggle",
get = function(info)
return LookingForGroup.db.profile.wq_leave_party
end,
set = function(info,val)
if val then
LookingForGroup.db.profile.wq_leave_party = true
else
LookingForGroup.db.profile.wq_leave_party = nil
end
end,
}
}
},
}
})
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ local function GetSearchEntryMenu(resultID)
local tb = {}
for i=1,#filters do
local ele = filters[i]
if not string_find(name,ele) and not string_find(comment,ele) then
if not string_find(name,ele) and not string_find(comment,ele) and not string_find(voiceChat,ele) then
table_insert(tb,ele)
end
end
Expand Down
2 changes: 1 addition & 1 deletion Interface/AddOns/LookingForGroup_SF/LookingForGroup_SF.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 70200
## Author: cqwrteur
## Title: LookingForGroup Spam Filter
## Version: 271
## Version: 278
## Dependencies: LookingForGroup
## LoadOnDemand: 1

Expand Down
8 changes: 6 additions & 2 deletions Interface/AddOns/LookingForGroup_WQ/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ function LookingForGroup_WQ:QUEST_ACCEPTED(info,index,wq_id)
_, leaderName, _, autoaccept = C_LFGList.GetSearchResultInfo(v)
if LookingForGroup.FilterRealm(leaderName) then
if autoaccept then
C_LFGList.ApplyToGroup(v, "", tank,healer,dps)
C_LFGList.ApplyToGroup(v, "", tank,healer,true)
b = b + 1
else
if comment:find("#WQ:"..wq_id.."#") then
C_LFGList.ApplyToGroup(v, "WorldQuestGroupFinderUser-"..wq_id, tank,healer,dps)
C_LFGList.ApplyToGroup(v, "WorldQuestGroupFinderUser-"..wq_id, tank,healer,true)
b = b + 1
end
end
Expand Down Expand Up @@ -227,6 +227,10 @@ function LookingForGroup_WQ:QUEST_TURNED_IN(info,id)
StaticPopup_Hide("LookingForGroup_WQ_HardwareAPIDialog")
return
end
if LookingForGroup.db.profile.wq_leave_party then
LeaveParty()
return
end
if GetNumGroupMembers() < 2 then
LeaveParty()
StaticPopup_Hide("LookingForGroup_WQ_HardwareAPIDialog")
Expand Down
2 changes: 1 addition & 1 deletion Interface/AddOns/LookingForGroup_WQ/LookingForGroup_WQ.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 70200
## Author: cqwrteur
## Title: LookingForGroup World Quest
## Version: 271
## Version: 278
## Dependencies: LookingForGroup
## SavedVariablesPerCharacter: LookingForGroup_WQCharacterDB
## LoadOnDemand: 1
Expand Down

0 comments on commit 1aacf70

Please sign in to comment.