3.0.7b fixed gui not movable

git [04-12-18 - 21:09]
3.0.7b fixed gui not movable
Filename
DailyAutoShare/DASHelper.lua
DailyAutoShare/DASUserSettingsAdapter.lua
DailyAutoShare/DailyAutoShare.txt
DailyAutoShare/DailyAutoShare.xml
DailyAutoShare/locale/de.lua
DailyAutoShare/locale/en.lua
DailyAutoShare/locale/fr.lua
DailyAutoShare/locale/jp.lua
DailyAutoShare/locale/ru.lua
DailyAutoShare/questData/Morrowind.lua
DailyAutoShare/startup.lua
diff --git a/DailyAutoShare/DASHelper.lua b/DailyAutoShare/DASHelper.lua
index a54d295..e146723 100644
--- a/DailyAutoShare/DASHelper.lua
+++ b/DailyAutoShare/DASHelper.lua
@@ -18,19 +18,12 @@ function DAS.TryDisableAutoShare(fromName, messageText)
 	end
 end

-local sharingCooldown = false

-local function resetSharingCooldown()
-    sharingCooldown = false
-end
 function DAS.TryShareActiveDaily()
-    if sharingCooldown then return end
-    sharingCooldown = true
-	if not DAS.GetAutoShare() then return end
-	for _, questIndex in ipairs(DAS.GetActiveQuestIndices()) do
-		if IsValidQuestIndex(questIndex) then ShareQuest(questIndex) end
-	end
-    zo_callLater(resetSharingCooldown, 1000)
+  if not DAS.GetAutoShare() then return end
+  for _, questIndex in ipairs(DAS.GetActiveQuestIndices()) do
+        if IsValidQuestIndex(questIndex) then ShareQuest(questIndex) end
+    end
  end

 local function EscapeString(text)
diff --git a/DailyAutoShare/DASUserSettingsAdapter.lua b/DailyAutoShare/DASUserSettingsAdapter.lua
index 5743391..418257b 100644
--- a/DailyAutoShare/DASUserSettingsAdapter.lua
+++ b/DailyAutoShare/DASUserSettingsAdapter.lua
@@ -108,9 +108,9 @@ end
 function DAS.SetAutoAcceptInvite(value)
 	DAS.settings.autoAcceptInvite = value
     if value then
-        EVENT_MANAGER:RegisterForEvent(ADDON_NAME, EVENT_GROUP_INVITE_RECEIVED, AcceptGroupInvite)
+        EVENT_MANAGER:RegisterForEvent("DailyAutoshare", EVENT_GROUP_INVITE_RECEIVED, AcceptGroupInvite)
     else
-        EVENT_MANAGER:UnregisterForEvent(ADDON_NAME, EVENT_GROUP_INVITE_RECEIVED, AcceptGroupInvite)
+        EVENT_MANAGER:UnregisterForEvent("DailyAutoshare", EVENT_GROUP_INVITE_RECEIVED, AcceptGroupInvite)

     end
 end
diff --git a/DailyAutoShare/DailyAutoShare.txt b/DailyAutoShare/DailyAutoShare.txt
index 37256ab..8ad84c4 100644
--- a/DailyAutoShare/DailyAutoShare.txt
+++ b/DailyAutoShare/DailyAutoShare.txt
@@ -1,6 +1,6 @@
 ## Title: DailyAutoShare
 ## Author: manavortex
-## Version: 3.0.7a
+## Version: 3.0.7b
 ## APIVersion: 100022
 ## SavedVariables: DAS_Settings DAS_Globals
 ## OptionalDependsOn: LibStub LibAddonMenu-2.0 LibMediaProvider-1.0 LibBinaryEncode pchat
diff --git a/DailyAutoShare/DailyAutoShare.xml b/DailyAutoShare/DailyAutoShare.xml
index 53a54d8..6aac884 100644
--- a/DailyAutoShare/DailyAutoShare.xml
+++ b/DailyAutoShare/DailyAutoShare.xml
@@ -1,7 +1,7 @@
 <GuiXml>
 	<Controls>

- 		<TopLevelControl name="DasControl" movable="true" mouseEnabled="false">
+ 		<TopLevelControl name="DasControl" movable="true" mouseEnabled="true">
 			<Dimensions x="330" minY="45" y="45" />
 			<Anchor point="TOPLEFT" relativeTo="GuiRoot" relativePoint="TOPLEFT" />
 			<OnMoveStop>DailyAutoShare.SaveControlLocation(self)</OnMoveStop>
diff --git a/DailyAutoShare/locale/de.lua b/DailyAutoShare/locale/de.lua
index 7f80b2e..5f6ee3b 100644
--- a/DailyAutoShare/locale/de.lua
+++ b/DailyAutoShare/locale/de.lua
@@ -149,7 +149,8 @@ local strings  = {
 	DAS_CRAG_DUNGEON 	 = "Entfesselt",


-    DAS_QUEST_M_ASHLANDER   = "Huntmaster Sorim-Nakar",
+    DAS_QUEST_M_ASHLANDER   = "Huntmaster Sorim-Nakar",
+    DAS_QUEST_M_RIVYN       = "Battlemaster Rivyn",

     DAS_QUEST_CC_ROBOT      = "Clockwork Facilitator",
     DAS_QUEST_CC_CROW       = "Bursar of Tributes",
diff --git a/DailyAutoShare/locale/en.lua b/DailyAutoShare/locale/en.lua
index bf367c7..c98f50d 100644
--- a/DailyAutoShare/locale/en.lua
+++ b/DailyAutoShare/locale/en.lua
@@ -139,6 +139,7 @@ local strings  = {


     DAS_QUEST_M_ASHLANDER   = "Huntmaster Sorim-Nakar",
+    DAS_QUEST_M_RIVYN       = "Battlemaster Rivyn",

     DAS_QUEST_CC_ROBOT      = "Clockwork Facilitator",
     DAS_QUEST_CC_CROW       = "Bursar of Tributes",
diff --git a/DailyAutoShare/locale/fr.lua b/DailyAutoShare/locale/fr.lua
index 7111e93..4d1e572 100644
--- a/DailyAutoShare/locale/fr.lua
+++ b/DailyAutoShare/locale/fr.lua
@@ -138,7 +138,8 @@ local strings  = {



-    DAS_QUEST_M_ASHLANDER   = "Huntmaster Sorim-Nakar",
+    DAS_QUEST_M_ASHLANDER   = "Huntmaster Sorim-Nakar",
+    DAS_QUEST_M_RIVYN       = "Battlemaster Rivyn",

     DAS_QUEST_CC_ROBOT      = "Clockwork Facilitator",
     DAS_QUEST_CC_CROW       = "Bursar of Tributes",
diff --git a/DailyAutoShare/locale/jp.lua b/DailyAutoShare/locale/jp.lua
index 526e620..28f7d9d 100644
--- a/DailyAutoShare/locale/jp.lua
+++ b/DailyAutoShare/locale/jp.lua
@@ -145,6 +145,7 @@ local strings  = {


     DAS_QUEST_M_ASHLANDER   = "Huntmaster Sorim-Nakar",
+    DAS_QUEST_M_RIVYN       = "Battlemaster Rivyn",

     DAS_QUEST_CC_ROBOT      = "Clockwork Facilitator",
     DAS_QUEST_CC_CROW       = "Bursar of Tributes",
diff --git a/DailyAutoShare/locale/ru.lua b/DailyAutoShare/locale/ru.lua
index d151b77..d58356d 100644
--- a/DailyAutoShare/locale/ru.lua
+++ b/DailyAutoShare/locale/ru.lua
@@ -146,7 +146,8 @@ local strings  = {



-    DAS_QUEST_M_ASHLANDER   = "Huntmaster Sorim-Nakar",
+    DAS_QUEST_M_ASHLANDER   = "Huntmaster Sorim-Nakar",
+    DAS_QUEST_M_RIVYN       = "Battlemaster Rivyn",

     DAS_QUEST_CC_ROBOT      = "Clockwork Facilitator",
     DAS_QUEST_CC_CROW       = "Bursar of Tributes",
diff --git a/DailyAutoShare/questData/Morrowind.lua b/DailyAutoShare/questData/Morrowind.lua
index ffb004d..aa4fecf 100644
--- a/DailyAutoShare/questData/Morrowind.lua
+++ b/DailyAutoShare/questData/Morrowind.lua
@@ -138,6 +138,7 @@ DAS.questStarter[zoneId] = {
     [GetString(DAS_QUEST_M_TRAYLAN)]    = true,  -- Hall of Justice
     [GetString(DAS_QUEST_M_ASHLANDER)]  = true,  -- Ashlander Hunt
     [GetString(DAS_QUEST_M_NUMANI)]     = true,  -- Ashlander Relics
+    [GetString(DAS_QUEST_M_RIVYN)]      = true,  -- Battlegrounds
 }

 DAS.questFinisher[zoneId] = {
@@ -160,5 +161,6 @@ DAS.questFinisher[zoneId] = {
     [GetString(DAS_QUEST_M_DREDASE )]   = true,
     [GetString(DAS_QUEST_M_VORAR   )]   = true,
     [GetString(DAS_QUEST_M_VALGA   )]   = true,
+    [GetString(DAS_QUEST_M_RIVYN)]      = true,  -- Battlegrounds
 }

diff --git a/DailyAutoShare/startup.lua b/DailyAutoShare/startup.lua
index 4420001..fc82407 100644
--- a/DailyAutoShare/startup.lua
+++ b/DailyAutoShare/startup.lua
@@ -309,6 +309,10 @@ local function OnQuestToolUpdate()
 	DAS.RefreshControl(true)
 end

+local function resetQuests()
+    DAS.handleLog(true)
+end
+
 local function OnQuestRemoved(eventCode, isCompleted, journalIndex, questName, zoneIndex, poiIndex, questId)

     -- is it a daily quest, and are we logging?
@@ -320,6 +324,9 @@ local function OnQuestRemoved(eventCode, isCompleted, journalIndex, questName, z
 	local autoInvite = DAS.GetAutoInvite()
     DAS.SetAutoInvite(false)

+    local timetoreset = (GetTimeStamp() - 1523512800)%86400
+    zo_callLater(resetQuests, timetoreset)
+
     zo_callLater(function()
         DAS.SetAutoInvite(autoInvite)
         DAS.RefreshControl(true)
@@ -356,30 +363,34 @@ local function RegisterEventHooks()
 	SCENE_MANAGER:GetScene("hudui"):AddFragment(DailyAutoShare.Fragment)
 	hookQuestTracker()

-	em:RegisterForEvent(ADDON_NAME, EVENT_PLAYER_ACTIVATED, 		OnPlayerActivated)
+	em:RegisterForEvent("DailyAutoshare", EVENT_PLAYER_ACTIVATED, 		OnPlayerActivated)

-	em:RegisterForEvent(ADDON_NAME, EVENT_QUEST_ADDED, 				OnQuestToolUpdate)
-	em:RegisterForEvent(ADDON_NAME, EVENT_QUEST_REMOVED, 			OnQuestRemoved)
-	em:RegisterForEvent(ADDON_NAME, EVENT_TRACKING_UPDATE, 			OnQuestToolUpdate)
+	em:RegisterForEvent("DailyAutoshare", EVENT_QUEST_ADDED, 			OnQuestToolUpdate)
+	em:RegisterForEvent("DailyAutoshare", EVENT_QUEST_REMOVED, 			OnQuestRemoved)
+	em:RegisterForEvent("DailyAutoshare", EVENT_TRACKING_UPDATE, 		OnQuestToolUpdate)

-	em:RegisterForEvent(ADDON_NAME, EVENT_QUEST_ADDED, 				OnQuestAdded)
-	em:RegisterForEvent(ADDON_NAME, EVENT_QUEST_REMOVED, 			OnQuestRemoved)
-	em:RegisterForEvent(ADDON_NAME, EVENT_QUEST_REMOVED, 			OnQuestRemoved)
-	em:RegisterForEvent(ADDON_NAME, EVENT_QUEST_SHARED, 			OnQuestShared)
+	em:RegisterForEvent("DailyAutoshare", EVENT_QUEST_ADDED, 			OnQuestAdded)
+	em:RegisterForEvent("DailyAutoshare", EVENT_QUEST_REMOVED, 			OnQuestRemoved)
+	em:RegisterForEvent("DailyAutoshare", EVENT_QUEST_SHARED, 			OnQuestShared)


-
-	-- em:RegisterForEvent(ADDON_NAME, EVENT_GROUP_MEMBER_JOINED,	OnGroupMemberAdded)
-	em:RegisterForEvent(ADDON_NAME, EVENT_UNIT_CREATED,	 			OnUnitCreated)
-	em:RegisterForEvent(ADDON_NAME, EVENT_UNIT_DESTROYED, 			OnGroupTypeChanged)
+	em:RegisterForEvent("DailyAutoshare", EVENT_UNIT_CREATED,	 		OnUnitCreated)
+	em:RegisterForEvent("DailyAutoshare", EVENT_UNIT_DESTROYED, 			OnGroupTypeChanged)

 	-- DasControl:OnMoveStop
 	-- DailyAutoShare.SaveControlLocation(self)
 end

-local function handleLog()
-    local afterEight = tonumber(GetTimeString():sub(0, 2)) >= 08
+local function handleLog(forceReset)
+
     local currentDate = tonumber(GetDate())
+    if forceReset then
+        DAS.globalSettings.completionLog[currentDate] = {}
+        DAS.RefreshControl(true)
+        return
+    end
+
+    local afterEight = tonumber(GetTimeString():sub(0, 2)) >= 08
     local lastDate
     local completionLog = DAS.globalSettings.completionLog or {}
     local logSize = NonContiguousCount(completionLog)