Quantcast

EMA Version: v8.3.0-Release-v2.4(0138)

Jennifer [02-02-20 - 18:18]
EMA Version: v8.3.0-Release-v2.4(0138)
Game Version: 8.3.0
Release Date: 02/02/2020

## Toon
 - Added Auto Accept Party Sync Requests.
Filename
CHANGELOG.txt
Locales/Core-Locale-enUS.lua
Modules/Toon.lua
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 152f3ef..3a83ef2 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -2,6 +2,16 @@
 ChangeLogs:
 ---------------------------

+EMA Version: v8.3.0-Release-v2.4(0138)
+Game Version: 8.3.0
+Release Date: 02/02/2020
+
+## Toon
+	- Added Auto Accept Party Sync Requests.
+
+
+---------------------------
+
 EMA Version: v8.3.0-Release-v2.3(0137)
 Game Version: 8.3.0
 Release Date: 01/02/2020
diff --git a/Locales/Core-Locale-enUS.lua b/Locales/Core-Locale-enUS.lua
index f8fab53..51e3a21 100644
--- a/Locales/Core-Locale-enUS.lua
+++ b/Locales/Core-Locale-enUS.lua
@@ -655,6 +655,8 @@ L["ROLL_LOOT"] = "Roll Loot With Team"
 L["ROLL_LOOT_HELP"] = "Roll Loot With the Team \nIf Any Instance Has A Roll On A Item"
 L["WAR_MODE"] = "Toggle WarMode With Team"
 L["WAR_MODE_HELP"] = "Toggle WarMode \"World PvP\" With The Team"
+L["PARTY_SYNC"] = "Auto Accept Party Sync Requests"
+L["PARTY_SYNC_HELP"] = "Team Members Auto Accept Party Sync Requests"
 -- Warnings
 L["COMBAT"] = "Combat"
 L["WARN_HIT"] = "Warn If Minion Gets Hit"
diff --git a/Modules/Toon.lua b/Modules/Toon.lua
index 3ab3909..ea64c92 100644
--- a/Modules/Toon.lua
+++ b/Modules/Toon.lua
@@ -82,6 +82,7 @@ EMA.settings = {
 		teleportLFGWithTeam = false,
 		rollWithTeam = false,
 		toggleWarMode = false,
+		autoAcceptPartySyncRequest = false,
 		--Debug Suff
 		testAlwaysOff = true
 	},
@@ -300,7 +301,16 @@ local function SettingsCreateToon( top )
 		EMA.SettingsToggleWarMode,
 		L["WAR_MODE_HELP"]
 	)
-
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlToon.checkBoxTogglePartySyncRequest = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlToon,
+		halfWidth,
+		left,
+		movingTop,
+		L["PARTY_SYNC"],
+		EMA.SettingsTogglePartySyncRequest,
+		L["PARTY_SYNC_HELP"]
+	)
 	movingTop = movingTop - checkBoxHeight
 	EMAHelperSettings:CreateHeading( EMA.settingsControlToon, L["GROUPTOOLS_HEADING"], movingTop, false )
 	movingTop = movingTop - headingHeight
@@ -648,6 +658,7 @@ function EMA:SettingsRefresh()
 	EMA.settingsControlToon.checkBoxLFGTeleport:SetValue( EMA.db.teleportLFGWithTeam )
 	EMA.settingsControlToon.checkBoxLootWithTeam:SetValue( EMA.db.rollWithTeam )
 	EMA.settingsControlToon.checkBoxToggleWarMode:SetValue( EMA.db.toggleWarMode )
+	EMA.settingsControlToon.checkBoxTogglePartySyncRequest:SetValue( EMA.db.autoAcceptPartySyncRequest )
 	EMA.settingsControlToon.dropdownRequestArea:SetValue( EMA.db.requestArea )
 	EMA.settingsControlMerchant.checkBoxAutoRepair:SetValue( EMA.db.autoRepair )
 	EMA.settingsControlMerchant.checkBoxAutoRepairUseGuildFunds:SetValue( EMA.db.autoRepairUseGuildFunds )
@@ -738,6 +749,11 @@ function EMA:SettingsToggleWarMode(event, checked )
 	EMA:SettingsRefresh()
 end

+function EMA:SettingsTogglePartySyncRequest(event, checked )
+	EMA.db.autoAcceptPartySyncRequest = checked
+	EMA:SettingsRefresh()
+end
+
 -- Warnings Toggles

 function EMA:SettingsToggleWarnHitFirstTimeCombat( event, checked )
@@ -907,6 +923,7 @@ function EMA:OnEnable()
 	EMA:RegisterEvent( "UI_ERROR_MESSAGE", "BAGS_FULL" )
 	EMA:RegisterEvent( "BAG_UPDATE_DELAYED" )
 	EMA:RegisterEvent( "PLAYER_FLAGS_CHANGED", "WARMODE" )
+	EMA:RegisterEvent( "QUEST_SESSION_CREATED" )
 	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
 	EMA:RegisterMessage( EMAApi.MESSAGE_CHARACTER_ONLINE, "OnCharactersChanged" )
 	EMA:RegisterMessage( EMAApi.MESSAGE_CHARACTER_OFFLINE, "OnCharactersChanged" )
@@ -955,6 +972,7 @@ function EMA:EMAOnSettingsReceived( characterName, settings )
 		EMA.db.teleportLFGWithTeam = settings.teleportLFGWithTeam
 		EMA.db.rollWithTeam = settings.rollWithTeam
 		EMA.db.toggleWarMode = settings.toggleWarMode
+		EMA.db.autoAcceptPartySyncRequest = settings.autoAcceptPartySyncRequest
 		EMA.db.autoRepair = settings.autoRepair
 		EMA.db.autoRepairUseGuildFunds = settings.autoRepairUseGuildFunds
 		EMA.db.warningArea = settings.warningArea
@@ -1576,6 +1594,14 @@ function EMA:LOSS_OF_CONTROL_ADDED( event, ... )
 	end
 end

+function EMA:QUEST_SESSION_CREATED( event, ...)
+	--EMA:Print("test")
+	if EMA.db.autoAcceptPartySyncRequest == true then
+		C_QuestSession.SendSessionBeginResponse( "true" )
+	end
+end
+
+
 -- A EMA command has been received.
 function EMA:EMAOnCommandReceived( characterName, commandName, ... )
 	--EMA:Print("Test", characterName, commandName)