added settings for group and quest share throttle

manavortex [04-17-18 - 10:26]
added settings for group and quest share throttle
Filename
DASHelper.lua
DASMenu.lua
DASUserSettingsAdapter.lua
DailyAutoShare.txt
startup.lua
diff --git a/DASHelper.lua b/DASHelper.lua
index 6a5b50f..317971b 100644
--- a/DASHelper.lua
+++ b/DASHelper.lua
@@ -29,7 +29,7 @@ local function shareQuestQueue()
     alreadySharing = true
     local questIndex = table.remove(questQueue, 1)
     ShareQuest(questIndex)
-    zo_callLater(shareQuestQueue, 250)
+    zo_callLater(shareQuestQueue, DAS.GetQuestShareDelay())
 end

 function DAS.TryShareActiveDaily()
diff --git a/DASMenu.lua b/DASMenu.lua
index 5aaf4cc..8933da4 100644
--- a/DASMenu.lua
+++ b/DASMenu.lua
@@ -49,16 +49,30 @@ function DAS.CreateMenu(savedVars, defaults)
 		},
 		{ -- header: be elaborate?
 			type    = "header",
-			name    = "Speak English instead of bingo?"
+			name    = "Throttle"
+		},
+		{ -- slider: group invite delay
+			type 	= "slider",
+			name 	= "Group invite delay (in ms)",
+			tooltip = ("adjust this if you encounter disconnects when trying to create a group.\n"
+					.."1000 ms are one second.") ,
+			min 	= 250,
+			step	= 10,
+			max 	= 2500,
+			getFunc = function() return DAS.GetGroupInviteDelay() end,
+			setFunc = function(value) DAS.SetGroupInviteDelay(value) end
+		},
+		{ -- slider: group invite delay
+			type 	= "slider",
+			name 	= "Quest share delay (in ms)",
+			tooltip = ("adjust this if you encounter disconnects when new group members join.\n"
+					.."1000 ms are one second.") ,
+			min 	= 250,
+			step	= 10,
+			max 	= 2500,
+			getFunc = function() return DAS.GetQuestShareDelay() end,
+			setFunc = function(value) DAS.SetQuestShareDelay(value) end
 		},
-		{ -- checkbox: don't use bingo
-			type    = "checkbox",
-			name    = "Speak in whole sentences?",
-			tooltip = "While this is optional, you will sound far less ludicrous if you don't talk like a telegram.\nIf you don't know what that is, please get older before unchecking this box.",
-			getFunc = function() return not DAS.GetSpeakStupid() end,
-			setFunc = function(value) DAS.SetSpeakStupid(not value) end
-		},
-

 		{ -- header: activate add-on in...
 			type    = "submenu",
diff --git a/DASUserSettingsAdapter.lua b/DASUserSettingsAdapter.lua
index fc12034..d367ca0 100644
--- a/DASUserSettingsAdapter.lua
+++ b/DASUserSettingsAdapter.lua
@@ -87,7 +87,18 @@ function DAS.SetTooltipRight(value)
 	GetSettings().tooltipRight = value
 end

-
+function DAS.GetQuestShareDelay()
+	return GetSettings.questShareDelay
+end
+function DAS.SetQuestShareDelay(value)
+	GetSettings.questShareDelay = value
+end
+function DAS.GetGroupInviteDelay()
+	return GetSettings.groupInviteDelay
+end
+function DAS.SetGroupInviteDelay(value)
+	GetSettings.groupInviteDelay = value
+end

 -- called from settings
 function DAS.GetAutoTrack()
diff --git a/DailyAutoShare.txt b/DailyAutoShare.txt
index 0b85865..3291ebd 100644
--- a/DailyAutoShare.txt
+++ b/DailyAutoShare.txt
@@ -1,6 +1,6 @@
 ## Title: DailyAutoShare
 ## Author: manavortex
-## Version: 3.1.0a
+## Version: 3.1.0c
 ## APIVersion: 100022
 ## SavedVariables: DAS_Settings DAS_Globals
 ## OptionalDependsOn: LibStub LibAddonMenu-2.0 LibMediaProvider-1.0 pchat
diff --git a/startup.lua b/startup.lua
index 1941869..9261a15 100644
--- a/startup.lua
+++ b/startup.lua
@@ -119,6 +119,8 @@ local defaults = {
 	startupMinimized			= true,
 	lastLookingFor 				= "",
 	guildInviteNumber 			= 1,
+	groupInviteDelay			= 500,
+	questShareDelay				= 500,
 	guildInviteText,
     questShareString            = "I can give a DailyAutoShare for <<1>>, type <<2>> for an instant invite",
 	listenInGuilds,