3.1.5 minor fixes

git [04-22-18 - 22:28]
3.1.5 minor fixes
Filename
DASMenu.lua
DASUserSettingsAdapter.lua
DailyAutoShare.txt
DasChatMessage.lua
locale/en.lua
questData/00_ids.lua
questData/ClockworkCity.lua
questData/Cyrodiil.lua
questData/GoldCoast.lua
questData/HewsBane.lua
questData/Morrowind.lua
questData/Wrothgar.lua
startup.lua
diff --git a/DASMenu.lua b/DASMenu.lua
index 8933da4..511f93d 100644
--- a/DASMenu.lua
+++ b/DASMenu.lua
@@ -303,7 +303,7 @@ function DAS.CreateMenu(savedVars, defaults)
 			},
 		},

-
+
 		{ -- header: Use global variables?
 			type    = "header",
 			name    = "User UI settings"
@@ -439,7 +439,6 @@ function DAS.CreateMenu(savedVars, defaults)
 			type    = "header",
 			name    = "automatically..."
 		},
-
 		{ -- auto-track
 			type    = "checkbox",
 			tooltip = "Auto-track active daily quest?",
@@ -447,7 +446,6 @@ function DAS.CreateMenu(savedVars, defaults)
 			getFunc = function() return DAS.GetAutoTrack() end,
 			setFunc = function(value) DAS.SetAutoTrack(value) end
 		},
-
 		{ -- auto-accept
 			type    = "checkbox",
 			tooltip = "Accept repeatable quest if they are shared?",
@@ -455,14 +453,13 @@ function DAS.CreateMenu(savedVars, defaults)
 			getFunc = function() return DAS.GetAutoAcceptShared() end,
 			setFunc = function(value) DAS.SetAutoAcceptShared(value) end
 		},
-		{ -- auto-accept invites?
+		{ -- accept dailies from questgiver
 			type    = "checkbox",
 			tooltip = "Skip quest accept dialogue? \n Needs localization to work",
 			name    = "accept dailies from questgiver?",
 			getFunc = function() return DAS.GetSettings().autoAcceptQuest end,
 			setFunc = function(value) DAS.GetSettings().autoAcceptQuest = value end
 		},
-
 		{ --auto-invite
 			type    = "checkbox",
 			tooltip = "Are you the active kind? Check this box to auto-invite",
@@ -470,14 +467,13 @@ function DAS.CreateMenu(savedVars, defaults)
 			getFunc = function() return DAS.GetAutoInvite() end,
 			setFunc = function(value) DAS.SetAutoInvite(value) end
 		},
-		{ --auto-invite
+		{ --Stop inviting
 			type    = "checkbox",
 			tooltip = "Stop inviting when you leave a group?",
 			name    = "stop inviting when the group disbands",
 			getFunc = function() return DAS.GetStopInviteOnDegroup() end,
 			setFunc = function(value) DAS.SetStopInviteOnDegroup(value) end
 		},
-
 		{ --auto-leave
 			type    = "checkbox",
 			tooltip = "Automatically leave group when you're searching while still grouped?",
@@ -487,8 +483,10 @@ function DAS.CreateMenu(savedVars, defaults)
 		},
 		{ -- auto-accept interval
 			type    = "slider",
-			tooltip = "After using the DAS spam button, auto-accept invites for how many seconds?",
-			name    = "Accept auto-invite after hitting the spam buton for",
+			tooltip = ("After you've been looking for quest share, "
+                       .. "how long do you want to automatically accept group-invites?\n"
+                       .. "Set to 0 to disable"),
+			name    = "Accept auto-invite after +bingo in zone for ... seconds",
 			min     = 0,
 			max     = 60,
 			getFunc = function() return DAS.GetAutoAcceptInviteInterval() end,
diff --git a/DASUserSettingsAdapter.lua b/DASUserSettingsAdapter.lua
index e035d16..20daddd 100644
--- a/DASUserSettingsAdapter.lua
+++ b/DASUserSettingsAdapter.lua
@@ -122,10 +122,16 @@ function DAS.SetAutoAcceptInvite(value)
         EVENT_MANAGER:RegisterForEvent("DailyAutoshare", EVENT_GROUP_INVITE_RECEIVED, autoAcceptInvite)
     else
         EVENT_MANAGER:UnregisterForEvent("DailyAutoshare", EVENT_GROUP_INVITE_RECEIVED, autoAcceptInvite)
-
     end
 end

+function DAS.GetGroupLeaveOnNewSearch()
+
+end
+function DAS.SetGroupLeaveOnNewSearch(value)
+
+end
+
 function DAS.GetMinimized()
 	return DAS.settings.minimised
 end
@@ -165,9 +171,9 @@ function DAS.GetAutoInvite()
 	return GetSettings().autoInvite
 end
 function DAS.SetAutoInvite(value)
-    if value then
-        value = IsUnitSoloOrGroupLeader('player') and DAS.HasActiveDaily()
-    end
+
+    value = value and IsUnitSoloOrGroupLeader('player') and DAS.HasActiveDaily()
+
 	GetSettings().autoInvite = value
     DAS.autoInviting = value
 	DAS.SetButtonStates()
@@ -223,6 +229,13 @@ function DAS.SetAutoLeave(value)
 	GetSettings().autoLeave = value
 end

+function DAS.GetResetAutoShareOnNewGroup()
+    return GetSettings().resetAutoShareOnNewGroup
+end
+function DAS.SetResetAutoShareOnNewGroup(value)
+    GetSettings().resetAutoShareOnNewGroup = value
+end
+
 function DAS.GetUpsideDown()
 	return GetSettings().upsideDown
 end
diff --git a/DailyAutoShare.txt b/DailyAutoShare.txt
index fe50ccb..98192e7 100644
--- a/DailyAutoShare.txt
+++ b/DailyAutoShare.txt
@@ -1,6 +1,6 @@
 ## Title: DailyAutoShare
 ## Author: manavortex
-## Version: 3.1.4
+## Version: 3.1.5
 ## APIVersion: 100022
 ## SavedVariables: DAS_Settings DAS_Globals
 ## OptionalDependsOn: LibStub LibCustomMenu LibAddonMenu-2.0 LibMediaProvider-1.0 pchat
@@ -34,6 +34,8 @@ questData/00_ids.lua
 locale/en.lua
 locale/$(language).lua

+$(APIVersion).lua
+
 startup.lua

 questData/BingoClean.lua
diff --git a/DasChatMessage.lua b/DasChatMessage.lua
index 6598549..a6faa7a 100644
--- a/DasChatMessage.lua
+++ b/DasChatMessage.lua
@@ -69,7 +69,7 @@ function DAS.OnChatMessage(eventCode, channelType, fromName, messageText, _, fro
     -- ignore all chat channels that aren't set
     if nil == channelTypes[channelType] then return end

-    local isPlayerName = fromDisplayName:find(DAS.pdn)
+    local isPlayerName = fromDisplayName:find(DAS.pdn)

     -- if we aren't listening, or if we are listening and the message's from us, ignore it
     if not (channelTypes[channelType] or isPlayerName) then return end
@@ -87,10 +87,11 @@ function DAS.OnChatMessage(eventCode, channelType, fromName, messageText, _, fro

     if isPlayerName then
         local groupStatus = IsUnitGrouped(unittagplayer)
-        if groupStatus and not channelTypes[channelType] then --and DAS.GetGroupLeaveOnNewSearch() then
-            -- GroupLeave()
-            return
-        else
+        if groupStatus and not channelTypes[channelType] then
+            if not DAS.GetAutoLeave() then return end
+            GroupLeave()
+            zo_callLater(DAS.TryTriggerAutoAcceptInvite, 5000)
+        elseif not groupStatus then
             DAS.TryTriggerAutoAcceptInvite()
         end
         return
diff --git a/locale/en.lua b/locale/en.lua
index 60fab5c..2bdb013 100644
--- a/locale/en.lua
+++ b/locale/en.lua
@@ -161,6 +161,9 @@ local strings  = {
     DAS_QUEST_CAP_ALVUR     = "Alvur Baren",
     DAS_QUEST_CAP_BOLGRUL   = "Bolgrul",

+    DAS_QUEST_SS_TANO       = "Justiciar Tanorian",
+    DAS_QUEST_SS_FARO       = "Justiciar Farowel",
+
     -- don't need translation for anyone but the russians - I think

     DAS_QUEST_DB_LARONEN    = "Laronen",
diff --git a/questData/00_ids.lua b/questData/00_ids.lua
index e5df203..9235410 100644
--- a/questData/00_ids.lua
+++ b/questData/00_ids.lua
@@ -1,6 +1,6 @@
 DAS_QUEST_IDS  = {

--- Clockwork City
+    -- Clockwork City
 	[6076]	 = true, -- Inciting the Imperfect,
 	[6077]	 = true, -- A Fine-Feathered Foe,

diff --git a/questData/ClockworkCity.lua b/questData/ClockworkCity.lua
index 4d86e7d..56ee9a3 100644
--- a/questData/ClockworkCity.lua
+++ b/questData/ClockworkCity.lua
@@ -181,4 +181,30 @@ DAS.questFinisher[zoneId] = {

 }
 DAS.questFinisher[zoneId2] = DAS.questFinisher[zoneId]
-DAS.questFinisher[zoneId3] = DAS.questFinisher[zoneId]
\ No newline at end of file
+DAS.questFinisher[zoneId3] = DAS.questFinisher[zoneId]
+
+
+DAS.questIds[zoneId] = {
+    [6076]	 = true, -- Inciting the Imperfect,
+	[6077]	 = true, -- A Fine-Feathered Foe,
+
+	[6039]	 = true, -- Loose Strands,
+	[6040]	 = true, -- A Sticky Solution,
+	[6041]	 = true, -- Enchanted Accumulation,
+	[6038]	 = true, -- A Daily Grind,
+	[6042]	 = true, -- A Bitter Pill,
+	[6037]	 = true, -- Fuel for our Fires,
+
+	[6088]	 = true, -- Changing the Filters,
+	[6081]	 = true, -- Oiling the Fans,
+	[6089]	 = true, -- Replacing the Commutators,
+	[6080]	 = true, -- A Shadow Malfunction,
+	[6073]	 = true, -- A Shadow Misplaced,
+	[6079]	 = true, -- Again Into the Shadows,
+
+	[6110]	 = true, -- Glitter and Gleam,
+	[6106]	 = true, -- A Matter of Tributes,
+	[6070]	 = true, -- Nibbles and Bits,
+	[6071]	 = true, -- Morsels and Pecks,
+	[6072]	 = true, -- A Matter of Respect,
+}
\ No newline at end of file
diff --git a/questData/Cyrodiil.lua b/questData/Cyrodiil.lua
index 15465dd..09db1f0 100644
--- a/questData/Cyrodiil.lua
+++ b/questData/Cyrodiil.lua
@@ -5,4 +5,8 @@ DAS.shareables[zoneId] = {

 local tbl2 = {}

-DAS.makeBingoTable(zoneId, tbl2)
\ No newline at end of file
+DAS.makeBingoTable(zoneId, tbl2)
+
+DAS.questIds[zoneId] = {
+
+}
\ No newline at end of file
diff --git a/questData/GoldCoast.lua b/questData/GoldCoast.lua
index 33fb926..4e8ae23 100644
--- a/questData/GoldCoast.lua
+++ b/questData/GoldCoast.lua
@@ -4,6 +4,7 @@ DAS.bingo 		    = DAS.bingo 	    or {}

 local zoneId	= 823
 local zoneId2	= 825 -- Hrota Cave
+local zoneId3	= 826 -- Garlas Agea


 local tbl = {}
@@ -15,6 +16,7 @@ table.insert(tbl, GetString(DAS_DB_EVIL))

 DAS.shareables[zoneId] = tbl
 DAS.shareables[zoneId2] = DAS.shareables[zoneId]
+DAS.shareables[zoneId3] = DAS.shareables[zoneId]

 local tbl2 = {}
 table.insert(tbl2, {[1] = "mino", [2] = "m"})
@@ -24,6 +26,7 @@ table.insert(tbl2, {[1] = "evil", [2] = "buried", [3] = "be"})

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


 DAS.questStarter[zoneId] = {
@@ -36,3 +39,12 @@ DAS.questFinisher[zoneId] = {
     [GetString(DAS_QUEST_DB_FINIA)]     = true,
     [GetString(DAS_QUEST_DB_CODUS)]     = true,
 }
+
+DAS.questIds[zoneId] = {
+
+	-- gold coast
+	[5603]  = true, -- "Buried Evil",
+	[5604]  = true, -- "The Common Good",
+	[5605]  = true, -- "Looming Shadows",
+	[5606]  = true, -- "The Roar of the Crowds",
+}
\ No newline at end of file
diff --git a/questData/HewsBane.lua b/questData/HewsBane.lua
index 5360256..7f5ced3 100644
--- a/questData/HewsBane.lua
+++ b/questData/HewsBane.lua
@@ -11,4 +11,9 @@ DAS.shareables[zoneId] = {

 local tbl2 = {}

-DAS.makeBingoTable(zoneId, tbl2)
\ No newline at end of file
+DAS.makeBingoTable(zoneId, tbl2)
+
+
+DAS.questIds[zoneId] = {
+
+}
\ No newline at end of file
diff --git a/questData/Morrowind.lua b/questData/Morrowind.lua
index 0fd4b47..c6295d7 100644
--- a/questData/Morrowind.lua
+++ b/questData/Morrowind.lua
@@ -164,3 +164,39 @@ DAS.questFinisher[zoneId] = {
     [GetString(DAS_QUEST_M_RIVYN)]      = true,  -- Battlegrounds
 }

+
+DAS.questIds[zoneId] = {
+    -- Morrowind dailies
+	[5924]  = true, -- "Relics of Yasammidan",
+	[5925]  = true, -- "Relics of Assarnatamat",
+	[5926]  = true, -- "Relics of Maelkashishi",
+	[5927]  = true, -- "Relics of Ashurnabitashpi",
+	[5928]  = true, -- "Relics of Ebernanit",
+	[5929]  = true, -- "Relics of Dushariran",
+	[5930]  = true, -- "Relics of Ashalmawia",
+
+	[5907]  = true, -- "Great Zexxin Hunt",
+	[5908]  = true, -- "Tarra-Suj Hunt",
+	[5909]  = true, -- "Writhing Sveeth Hunt",
+	[5910]  = true, -- "Mother Jagged-Claw Hunt",
+	[5911]  = true, -- "Ash-Eater Hunt",
+	[5912]  = true, -- "Old Stomper Hunt",
+	[5913]  = true, -- "King Razor-Tusk Hunt",
+
+	-- Cave dailies (Hall of Justice)
+	[5956]  = true, -- "Daedric Disruptions",
+	[5958]  = true, -- "Unsettled Syndicate",
+	[5961]  = true, -- "Planting Misinformation",
+	[5962]  = true, -- "Kwama Conundrum",
+	[5934]  = true, -- "Tax Deduction",
+	[5915]  = true, -- "Tribal Troubles",
+	[5958]  = true, -- "Unsettled Syndicate",
+
+	-- World boss dailies (Hall of Justice)
+	[5916]  = true, -- "The Anxious Apprentice",
+	[5918]  = true, -- "A Creeping Hunger",
+	[5865]  = true, -- "Culling the Swarm",
+	[5866]  = true, -- "Oxen Free",
+	[5904]  = true, -- "Salothan's Curse",
+	[5906]  = true, -- "Siren's Song",
+}
\ No newline at end of file
diff --git a/questData/Wrothgar.lua b/questData/Wrothgar.lua
index 5e421af..2a19357 100644
--- a/questData/Wrothgar.lua
+++ b/questData/Wrothgar.lua
@@ -1,7 +1,7 @@
 DAS.shareables 	        = DAS.shareables            or {}
 DAS.bingo 		        = DAS.bingo 	            or {}
-DAS.questFinisher  = DAS.questFinisher    or {}
-DAS.questStarter   = DAS.questStarter     or {}
+DAS.questFinisher       = DAS.questFinisher         or {}
+DAS.questStarter        = DAS.questStarter          or {}

 local zoneId	= 684

@@ -23,18 +23,38 @@ DAS.shareables[zoneId] = {
 }
 local tbl2 = {}

+DAS.questIds[zoneId] = {
+    -- wrothgar dailies
+	[5518]  = true, -- "Meat for the Masses",
+	[5519]  = true, -- "Scholarly Salvage",
+	[5520]  = true, -- "Flames of Forge and Fallen",
+	[5521]  = true, -- "Nature's Bounty",
+	[5522]  = true, -- "Heresy of Ignorance",
+	[5523]  = true, -- "Snow and Steam",
+	[5524]  = true, -- "Reeking of Foul Play",
+
+
+	-- wrothgar single
+	[5507]  = true, -- "Breakfast of the Bizarre",
+	[5515]  = true, -- "Free Spirits",
+	[5514]  = true, -- "Getting a Bellyful",
+	[5509]  = true, -- "Parts of the Whole",
+	[5504]  = true, -- "The Skin Trade",
+	[5505]  = true, -- "Fire in the Hold",
+}
+
 table.insert(tbl2, {[1] = "poa",    [2] = "poacher"})
 table.insert(tbl2, "edu")
 table.insert(tbl2, "nyz")
 table.insert(tbl2, {[1] = "cori",   [2] = "nb"})
-table.insert(tbl2, {[1] = "dolmen", [2] = "zan", [3] = "dol",   [4] = "ud"})
+table.insert(tbl2, {[1] = "zan",    [2] = "dolmen", [3] = "dol",   [4] = "ud"})
 table.insert(tbl2, {[1] = "ogre",   [2] = "mad", [3] = "shrek"})

 table.insert(tbl2, {[1] = "eggs",   [2] = "harpy"})
 table.insert(tbl2, "spirits")
 table.insert(tbl2, "durzog")
 table.insert(tbl2, {[1] ="dwemer",  [2] = "parts"})
-table.insert(tbl2, {[1] = "wolf",   [2] = "skintrade"})
+table.insert(tbl2, {[1] = "skin",   [2] = "skintrade", [3] = "wolf"})
 table.insert(tbl2, {[1] = "bandit", [2] = "fire"})

 DAS.makeBingoTable(zoneId, tbl2)
diff --git a/startup.lua b/startup.lua
index 9d3d864..5c4b814 100644
--- a/startup.lua
+++ b/startup.lua
@@ -2,8 +2,8 @@ DailyAutoShare              = DailyAutoShare or {}
 DAS                         = DailyAutoShare
 local DailyAutoShare        = DailyAutoShare

-DAS.name                    = "Daily Autoshare"
-DAS.version                 = "3.1.4"
+DAS.name                    = "DailyAutoshare"
+DAS.version                 = "3.1.5"
 DAS.author                  = "manavortex"
 DAS.settings                = {}
 DAS.globalSettings          = {}
@@ -12,9 +12,9 @@ DAS.shareables   	        = {}
 DAS.bingo 			        = {}
 DAS.subzones 		        = {}

-DAS.questFinisher      = {}
-DAS.questStarter       = {}
-
+DAS.questFinisher           = {}
+DAS.questStarter            = {}
+DAS.questIds                = {}
 DAS.channelTypes 	        = {
     [CHAT_CHANNEL_PARTY]    = true,
     [CHAT_CHANNEL_SAY ]     = false,
@@ -102,9 +102,12 @@ local defaults = {
 	autoAcceptQuest		        = true,
 	autoAcceptShared 			= true,
 	autoDeclineShared 			= false,
+	autoHide 					= false,
+	autoMinimize 				= false,
+	autoShare 					= true,
 	autoAcceptAllDailies 		= false,
 	autoInvite 					= false,
-	autoLeave 					= true,
+	autoLeave 					= false,
 	useGlobalSettings 			= true,
 	minimised 					= false,
 	locked 						= false,
@@ -112,11 +115,9 @@ local defaults = {
 	fontScale					= 1,
 	tooltipRight 				= false,
 	upsideDown 					= false,
-	autoHide 					= false,
-	autoMinimize 				= false,
-	autoShare 					= true,
-	hideCompleted				= false,
+    hideCompleted				= false,
 	startupMinimized			= true,
+	resetAutoShareOnNewGroup    = true,
 	lastLookingFor 				= "",
 	guildInviteNumber 			= 1,
 	groupInviteDelay			= 500,
@@ -127,8 +128,9 @@ local defaults = {
     ["tracked"] = {
 		[684] = true,
 		[823] = true,
-		[849] = true,	-- Vvardenfell
+		[849] = true,	    -- Vvardenfell
 		[181] = false,
+		[1011] = false,     -- Summerset
 	},
 }

@@ -136,10 +138,15 @@ local function pointerUpSubzones()

     -- Gold Coast
     defaults[825]                       = defaults[823]
+    defaults[826]                       = defaults[823]
+    defaults.tracked[825]                       = defaults.tracked[823]
+    defaults.tracked[826]               = defaults.tracked[823]

     -- Capitals
     defaults[19]                       = defaults[57]
     defaults[383]                      = defaults[57]
+    defaults.tracked[19]               = defaults.tracked[57]
+    defaults.tracked[383]              = defaults.tracked[57]

     -- Clockwork City
     defaults[981]                       = defaults[980]
@@ -220,8 +227,16 @@ DAS.activeZoneQuests = {}
 --==============================

 local function OnGroupTypeChanged(eventCode, unitTag)
-	if IsUnitGrouped("player") or not DAS.GetStopInviteOnDegroup() then return end
-	DAS.SetAutoInvite(false)
+	if IsUnitGrouped("player") then
+        if not DAS.GetAutoShare() and DAS.GetResetAutoShareOnNewGroup() then
+            DAS.SetAutoShare(true)
+        end
+    else
+        if DAS.GetStopInviteOnDegroup() then
+            DAS.SetAutoInvite(false)
+        end
+    end
+
 end

 local function OnQuestAdded(eventCode, journalIndex, questName, objectiveName)
@@ -327,7 +342,7 @@ local function OnQuestRemoved(eventCode, isCompleted, journalIndex, questName, z
     zo_callLater(function()
         DAS.SetAutoInvite(autoInvite)
         DAS.RefreshControl(true)
-    end, 3000)
+    end, 5000)
 end

 local function deleteYesterdaysLog()
@@ -341,6 +356,8 @@ local function deleteYesterdaysLog()
 end

 local function hookQuestTracker()
+    -- pts fix
+    if nil == QUEST_TRACKER then return end
 	local function refreshLabels()
 		DAS.RefreshLabels(false, true)
 	end
@@ -360,21 +377,21 @@ local function RegisterEventHooks()
 	SCENE_MANAGER:GetScene("hudui"):AddFragment(DailyAutoShare.Fragment)
 	hookQuestTracker()

-	em:RegisterForEvent("DailyAutoshare", EVENT_PLAYER_ACTIVATED, 		OnPlayerActivated)
-
-	em:RegisterForEvent("DailyAutoshare", EVENT_QUEST_ADDED, 			OnQuestToolUpdate)
-	em:RegisterForEvent("DailyAutoshare", EVENT_QUEST_REMOVED, 			OnQuestRemoved)
-	em:RegisterForEvent("DailyAutoshare", EVENT_TRACKING_UPDATE, 		OnQuestToolUpdate)
+	em:RegisterForEvent(DAS.name, EVENT_PLAYER_ACTIVATED, 		OnPlayerActivated)

-	em:RegisterForEvent("DailyAutoshare", EVENT_QUEST_ADDED, 			OnQuestAdded)
-	em:RegisterForEvent("DailyAutoshare", EVENT_QUEST_REMOVED, 			OnQuestRemoved)
-	em:RegisterForEvent("DailyAutoshare", EVENT_QUEST_SHARED, 			OnQuestShared)
+	em:RegisterForEvent(DAS.name, EVENT_QUEST_ADDED, 			OnQuestToolUpdate)
+	em:RegisterForEvent(DAS.name, EVENT_QUEST_REMOVED, 			OnQuestRemoved)
+	em:RegisterForEvent(DAS.name, EVENT_TRACKING_UPDATE, 		OnQuestToolUpdate)

+	em:RegisterForEvent(DAS.name, EVENT_QUEST_ADDED, 			OnQuestAdded)
+	em:RegisterForEvent(DAS.name, EVENT_QUEST_REMOVED, 			OnQuestRemoved)
+	em:RegisterForEvent(DAS.name, EVENT_QUEST_SHARED, 			OnQuestShared)

-	em:RegisterForEvent("DailyAutoshare", EVENT_UNIT_CREATED,	 		OnUnitCreated)
-	em:RegisterForEvent("DailyAutoshare", EVENT_UNIT_DESTROYED, 		OnGroupTypeChanged)
+	em:RegisterForEvent(DAS.name, EVENT_GROUP_TYPE_CHANGED,     OnGroupTypeChanged)
+	em:RegisterForEvent(DAS.name, EVENT_UNIT_CREATED,	 		OnUnitCreated)
+	em:RegisterForEvent(DAS.name, EVENT_UNIT_DESTROYED, 		OnGroupTypeChanged)

-	em:RegisterForEvent("DailyAutoShare", EVENT_CHAT_MESSAGE_CHANNEL,   OnChatMessage)
+	em:RegisterForEvent(DAS.name, EVENT_CHAT_MESSAGE_CHANNEL,   OnChatMessage)
 	-- DasControl:OnMoveStop
 	-- DailyAutoShare.SaveControlLocation(self)
 end