fixed the right click spam thing

git [04-18-18 - 19:02]
fixed the right click spam thing
Filename
DASContextMenu.lua
DASData.lua
DASHelper.lua
DailyAutoShare.txt
questData/GoldCoast.lua
startup.lua
diff --git a/DASContextMenu.lua b/DASContextMenu.lua
index d8111e9..870709c 100644
--- a/DASContextMenu.lua
+++ b/DASContextMenu.lua
@@ -25,6 +25,17 @@ local function getAnchorPos(control)
 	return	TOPLEFT, TOPRIGHT
 end

+local function spamChat(questName, bingoString)
+    if CHAT_SYSTEM.textEntry.editControl:HasFocus() then
+		CHAT_SYSTEM.textEntry.editControl:Clear()
+	end
+    local chatInputString = bingoString
+    if DAS.GetAutoInvite() then
+        chatInputString = zo_strformat(DAS.GetSettings().questShareString, questNames, bingoString)
+    end
+    StartChatInput(chatInputString, CHAT_CHANNEL_ZONE)
+end
+
 function DAS.OnRightClick(control, verbose)

 	if nil == control then return end
@@ -42,18 +53,12 @@ function DAS.OnRightClick(control, verbose)
         SetMenuMinimumWidth(185)
 		if control.dataQuestState ~= DAS_STATUS_COMPLETE then
 			AddCustomMenuItem(GetString(DAS_SI_SPAM_SINGLE),
-				function()
-					DAS.SpamChat(nil, questName)
+				function()
+					spamChat(questName, bingoString)
 				end,
 				MENU_ADD_OPTION_LABEL
 			)
 		end
-		AddCustomMenuItem(GetString(DAS_SI_SPAM_VERBOSE),
-			function()
-					DAS.SpamChat(true, questName)
-				end,
-				MENU_ADD_OPTION_LABEL
-		)
 		if IsValidQuestIndex(control.dataJournalIndex) then
 			AddCustomMenuItem(GetString(DAS_SI_SHARE),
 				function() ShareQuest(journalIndex) end,
@@ -79,7 +84,7 @@ function DAS.OnRightClick(control, verbose)
 			AddCustomMenuItem(GetString(key),
 				function()
                     DAS.ToggleQuest(control)
-					DAS.RefreshLabels()
+					zo_callLater(DAS.RefreshLabels, 500)
                 end,
 				MENU_ADD_OPTION_LABEL
 			)
diff --git a/DASData.lua b/DASData.lua
index d7d63da..4998d1d 100644
--- a/DASData.lua
+++ b/DASData.lua
@@ -137,15 +137,3 @@ function DAS.GetOpenQuestNames()
 	return ret
 end

-function DAS.GetActiveQuestIndices(zoneId)
-    local zoneQuests = DAS.GetZoneQuests(zoneId)
-	local ret = {}
-	local questLabel
-	for i=1, #DAS.labels do
-		questLabel = DAS.labels[i]
-		if (questLabel.dataQuestState == DAS_STATUS_ACTIVE) then
-			table.insert(ret, questLabel.dataJournalIndex)
-		end
-	end
-	return ret
-end
diff --git a/DASHelper.lua b/DASHelper.lua
index 317971b..32d2f4b 100644
--- a/DASHelper.lua
+++ b/DASHelper.lua
@@ -32,9 +32,19 @@ local function shareQuestQueue()
     zo_callLater(shareQuestQueue, DAS.GetQuestShareDelay())
 end

+local allDailyQuestIds = DAS_QUEST_IDS
+
 function DAS.TryShareActiveDaily()
     if not DAS.GetAutoShare() then return end
-    local activeQuestIndices = DAS.GetActiveQuestIndices()
+    local zoneQuests = DAS.GetZoneQuests(zoneId)
+	local activeQuestIndices = {}
+	local questLabel
+	for i=1, #DAS.labels do
+		questLabel = DAS.labels[i]
+		if (questLabel.dataQuestState == DAS_STATUS_ACTIVE) then
+			table.insert(activeQuestIndices, questLabel.dataJournalIndex)
+		end
+	end
     for _, questIndex in ipairs(activeQuestIndices) do
         if IsValidQuestIndex(questIndex) and not table.contains(questQueue, questIndex) then
            table.insert(questQueue, questIndex)
diff --git a/DailyAutoShare.txt b/DailyAutoShare.txt
index 64df92b..1a07ba1 100644
--- a/DailyAutoShare.txt
+++ b/DailyAutoShare.txt
@@ -1,6 +1,6 @@
 ## Title: DailyAutoShare
 ## Author: manavortex
-## Version: 3.1.1a
+## Version: 3.1.2
 ## APIVersion: 100022
 ## SavedVariables: DAS_Settings DAS_Globals
 ## OptionalDependsOn: LibStub LibCustomMenu LibAddonMenu-2.0 LibMediaProvider-1.0 pchat
diff --git a/questData/GoldCoast.lua b/questData/GoldCoast.lua
index d3f5091..33fb926 100644
--- a/questData/GoldCoast.lua
+++ b/questData/GoldCoast.lua
@@ -3,6 +3,7 @@ DAS.bingo 		    = DAS.bingo 	    or {}


 local zoneId	= 823
+local zoneId2	= 825 -- Hrota Cave


 local tbl = {}
@@ -13,7 +14,7 @@ table.insert(tbl, GetString(DAS_DB_GOOD))
 table.insert(tbl, GetString(DAS_DB_EVIL))

 DAS.shareables[zoneId] = tbl
-DAS.shareables[825] = DAS.shareables[zoneId]
+DAS.shareables[zoneId2] = DAS.shareables[zoneId]

 local tbl2 = {}
 table.insert(tbl2, {[1] = "mino", [2] = "m"})
@@ -22,7 +23,7 @@ table.insert(tbl2, {[1] = "good", [2] = "common", [3] = "cg"})
 table.insert(tbl2, {[1] = "evil", [2] = "buried", [3] = "be"})

 DAS.makeBingoTable(zoneId, tbl2)
-DAS.bingo[825] = DAS.bingo[zoneId]
+DAS.bingo[zoneId2] = DAS.bingo[zoneId]


 DAS.questStarter[zoneId] = {
diff --git a/startup.lua b/startup.lua
index 0323caa..2bd1622 100644
--- a/startup.lua
+++ b/startup.lua
@@ -3,7 +3,7 @@ DAS                         = DailyAutoShare
 local DailyAutoShare        = DailyAutoShare

 DAS.name                    = "Daily Autoshare"
-DAS.version                 = "3.0.5a"
+DAS.version                 = "3.1.2"
 DAS.author                  = "manavortex"
 DAS.settings                = {}
 DAS.globalSettings          = {}