Quantcast

0170

Jennifer [11-07-20 - 18:15]
0170
Filename
CHANGELOG.txt
Core/Team.lua
EMA.toc
EbonyUtilities.lua
GUI/EMAHelperSettings.lua
Locales/Core-Locale-enUS.lua
Media/MacroIcon.tga
Modules/Follow.lua
Modules/Macro.lua
Modules/Modules.xml
Modules/Quest.lua
Modules/QuestWatcher.lua
Modules/Talk.lua
Modules/Toon.lua
Modules/Trade.lua
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 20ab3a5..96ee9da 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,12 +1,45 @@
 ---------------------------
 ChangeLogs:
 ---------------------------
+EMA Version: v9.0.1-Release-v3.1(0170)
+Game Version: 9.0.1
+Release Date: 07/11/2020
+
+## Quest
+	Fix #17
+
+## Isboxer
+	-- Removed isboxer support for now. due to new policy update.
+
+## Added New Module -- By: RobinFrcd ( edited by me )
+	-- Macro Add and copys Macros to your team!
+
+## Display-team
+	-- Added player level By: RobinFrcd
+
+---------------------------
+EMA Version: v9.0.1-Release-v3.1(0169-0169)
+Game Version: 9.0.1
+Release Date: 30/10/2020
+
+## Quest
+	- Quests with Gossip options Should Now work in BFA Zones.
+		-- Dev note: Sorry about this one it seems they was not working with the new api like even older zones are?
+
+## Disaply-Team
+	- Can Move the frame again
+		--dev note: BBtC
+
+
+
+
+---------------------------
 EMA Version: v9.0.1-Release-v3.1(0164-0166)
 Game Version: 9.0.1
 Release Date: 30/10/2020

 ## Information
-	-- Added Support For Bagspace Information
+	-- Added Support For Bag space Information
 	-- Information Panel Can Now Startup On All Team Members
 	-- Added Some Options To Support The Removal Of "Expansions" From Dropdown List.
 	-- Added Shadowlands Currencies.
diff --git a/Core/Team.lua b/Core/Team.lua
index 67f11a5..e4f4527 100644
--- a/Core/Team.lua
+++ b/Core/Team.lua
@@ -332,6 +332,7 @@ local function SettingsCreateTeamList()
 		EMA.SettingsAddPartyClick,
 		L["BUTTON_ADDALL_HELP"]
 	)
+--[[
 	EMA.settingsControl.teamListButtonAddIsboxerList = EMAHelperSettings:Icon(
 		EMA.settingsControl,
 		iconSize,
@@ -343,13 +344,14 @@ local function SettingsCreateTeamList()
 		EMA.SettingsAddIsboxerListClick,
 		L["BUTTON_ISBOXER_ADD_HELP"]
 	)
+]]
 	EMA.settingsControl.teamListButtonMoveUp = EMAHelperSettings:Icon(
 		EMA.settingsControl,
 		iconSize,
 		iconSize,
 		"Interface\\Addons\\EMA\\Media\\CharUp.tga", --icon Image
 		left - iconSize - 11,
-		topOfList - verticalSpacing - iconHight * 3,
+		topOfList - verticalSpacing - iconHight * 2,
 		L[""],
 		EMA.SettingsMoveUpClick,
 		L["BUTTON_UP_HELP"]
@@ -360,7 +362,7 @@ local function SettingsCreateTeamList()
 		iconSize,
 		"Interface\\Addons\\EMA\\Media\\CharDown.tga", --icon Image
 		left - iconSize - 11,
-		topOfList - verticalSpacing - iconHight * 4,
+		topOfList - verticalSpacing - iconHight * 3,
 		L[""],
 		EMA.SettingsMoveDownClick,
 		L["BUTTON_DOWN_HELP"]
@@ -371,7 +373,7 @@ local function SettingsCreateTeamList()
 		iconSize,
 		"Interface\\Addons\\EMA\\Media\\CharRemove.tga", --icon Image
 		left - iconSize - 11 ,
-		topOfList - verticalSpacing - iconHight * 5,
+		topOfList - verticalSpacing - iconHight * 4,
 		L[""],
 		EMA.SettingsRemoveClick,
 		L["BUTTON_REMOVE_HELP"]
@@ -382,7 +384,7 @@ local function SettingsCreateTeamList()
 		iconSize,
 		"Interface\\Addons\\EMA\\Media\\CharMaster.tga", --icon Image
 		left - iconSize - 11 ,
-		topOfList - verticalSpacing - iconHight * 6,
+		topOfList - verticalSpacing - iconHight * 5,
 		L[""],
 		EMA.SettingsSetMasterClick,
 		L["BUTTON_MASTER_HELP"]
@@ -1341,6 +1343,7 @@ function EMA:OnMasterChange( message, characterName )
 	end
 end

+--[[
 function EMA:AddIsboxerMembers()
 	if IsAddOnLoaded("Isboxer" ) then
 		for slot, characterName in EMAApi.IsboxerTeamList() do
@@ -1350,7 +1353,7 @@ function EMA:AddIsboxerMembers()
 		EMA:Print(L["ISBOXER_ADDON_NOT_LOADED"])
 	end
 end
-
+]]

 -------------------------------------------------------------------------------------------------------------
 -- Addon initialization, enabling and disabling.
@@ -1738,9 +1741,11 @@ function EMA.SettingsAddPartyClick( event )
 	EMA:AddPartyMembers()
 end

+--[[
 function EMA:SettingsAddIsboxerListClick( event )
 	EMA:AddIsboxerMembers()
 end
+]]

 function EMA:SettingsInviteClick( event )
 	EMA:InviteTeamToParty(nil)
diff --git a/EMA.toc b/EMA.toc
index 4b5b193..00ba644 100644
--- a/EMA.toc
+++ b/EMA.toc
@@ -2,7 +2,7 @@
 ## Title: EMA
 ## Notes: Ebony's MultiBoxing Assistant
 ## Author: Jennifer Calladine 'Ebony'
-## Version: v9.0.1-Release-v3.1(0166)
+## Version: v9.0.1-Release-v3.1(0170)
 ## SavedVariables: CoreProfileDB, CommunicationsProfileDB, TeamProfileDB, TagProfileDB, MessageProfileDB, InformationProfileDB, DisplayTeamProfileDB, FollowProfileDB, GuildProfileDB, InteractionProfileDB, ItemUseProfileDB, PurchaseProfileDB, QuestProfileDB,  QuestWatcherProfileDB, SellProfileDB, TalkProfileDB, ToonProfileDB, TradeProfileDB, MailProfileDB, BankProfileDB, ISBoxerProfileDB

 #Libs
diff --git a/EbonyUtilities.lua b/EbonyUtilities.lua
index 659db19..c82724d 100644
--- a/EbonyUtilities.lua
+++ b/EbonyUtilities.lua
@@ -334,3 +334,11 @@ function EbonyUtilities:getPetOwner( petName )
 	--	print(owner)
 	end
 end
+
+function EbonyUtilities:endsWith(str, ending)
+	if str ~= nil then
+		return str:match(ending .. '$')
+	else
+		return false
+	end
+end
diff --git a/GUI/EMAHelperSettings.lua b/GUI/EMAHelperSettings.lua
index 016e14b..0876f0e 100644
--- a/GUI/EMAHelperSettings.lua
+++ b/GUI/EMAHelperSettings.lua
@@ -347,9 +347,21 @@ function EMAHelperSettings:CreateIcon( settingsControl, width, left, top, iconNa
 	return icon
 end

+-------------------------------------------------------------------------------------------------------------
+-- FreeLabel.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:CreateFreeLabel( settingsControl, width, left, top, text )
+	local label = AceGUI:Create( "Label" )
+	label:SetText( text )
+	settingsControl.widgetSettings:AddChild( label )
+	label:SetWidth( width )
+	label:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	return label
+end

 -------------------------------------------------------------------------------------------------------------
--- Label.
+-- NormalLabel.
 -------------------------------------------------------------------------------------------------------------

 function EMAHelperSettings:GetLabelHeight()
diff --git a/Locales/Core-Locale-enUS.lua b/Locales/Core-Locale-enUS.lua
index c4e78d3..e95cb26 100644
--- a/Locales/Core-Locale-enUS.lua
+++ b/Locales/Core-Locale-enUS.lua
@@ -128,6 +128,7 @@ L["QUEST"] = "Quest"
 L["COMPLETION"] = "Completion"
 L["TRACKER"] = "Tracker"
 L["ISBOXER"] = "ISBoxer"
+L["MACRO"] = "Macro"

 --------------------------
 -- Pecoded String Formats
@@ -1009,4 +1010,22 @@ L["LDBBAR_CONFIG_TEAM"] = "To Open Team Settings"
 L["LDBBAR_PUSH"] = "To Push All Settings"

 -----------------------
+-- Macro Local
+local ema_macro_tail = "_EMA_AUTO"
+L["MACRO_TAIL"] = ema_macro_tail -- Don't change this one, used to identify EMA macros
+
+L["MACRO_TITLE"] = "Duplicate Macros"
+L["SELECT_MACRO_TITLE"] = "Select macro to edit and clone"
+L["LOAD_MACRO_BUTTON"] = "Load macros"
+L["LOAD_MACRO_BUTTON_HELP"] = "Get current character macros"
+L["MACRO_NAME_AREA"] = "Macro name"
+L["MACRO_BODY"] = "Macro content"
+L["DELETE_MACROS"] = "Delete ALL EMA macros"
+L["SEND_MACRO_ALL_CHARACTERS"] = "Send to all characters"
+L["SEND_MACRO"] = "Send to character"
+L["LOCAL_MACRO"] = "Local Macro ?"
+L["LOCAL_MACRO_HELP"] = "If not local, it's global"
+L["DELETE_MACROS_HELP"] = "It will delete all macros ending with " .. ema_macro_tail .. " on all your characters"
+
+-----------------------
 -- X Locale
\ No newline at end of file
diff --git a/Media/MacroIcon.tga b/Media/MacroIcon.tga
new file mode 100644
index 0000000..50e8143
Binary files /dev/null and b/Media/MacroIcon.tga differ
diff --git a/Modules/Follow.lua b/Modules/Follow.lua
index 2b529c9..1ebe81f 100644
--- a/Modules/Follow.lua
+++ b/Modules/Follow.lua
@@ -33,7 +33,7 @@ EMA.moduleDisplayName = L["FOLLOW"]
 -- Icon
 EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\FollowIcon.tga"
 -- order
-EMA.moduleOrder = 50
+EMA.moduleOrder = 20

 -- EMA key bindings.

diff --git a/Modules/Macro.lua b/Modules/Macro.lua
new file mode 100644
index 0000000..0fe1b8e
--- /dev/null
+++ b/Modules/Macro.lua
@@ -0,0 +1,441 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: All Rights Reserved 2018-2020 Jennifer Cally					--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 										--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Macro",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceHook-3.0"
+)
+
+-- Load libraries.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+
+--  Constants and Locale for this module.
+EMA.moduleName = "Macro"
+EMA.settingsDatabaseName = "MacroProfileDB"
+EMA.chatCommand = "ema-macro"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["TOON"]
+EMA.moduleDisplayName = L["MACRO"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\MacroIcon.tga"
+-- order
+EMA.moduleOrder = 30
+
+
+-- Settings - the values to store and their defaults for the settings database.
+local myMacros = {}
+local currentMacro = {isLocal=false}
+local teamNames = {}
+local minionNames = {}
+local currentToonValue
+local MacroListLocal = {isLocal=false}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = 'group',
+		childGroups  = "tab",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			config = {
+				type = "input",
+				name = L["OPEN_CONFIG"],
+				desc = L["OPEN_CONFIG_HELP"],
+				usage = "/ema-macro config",
+				get = false,
+				set = "",
+			},
+			push = {
+				type = "input",
+				name = L["PUSH_ALL_SETTINGS"],
+				desc = L["PUSH_SETTINGS_INFO"],
+				usage = "/ema-macro push",
+				get = false,
+				set = "EMASendSettings",
+			},
+		},
+	}
+	return configuration
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.COMMAND_SEND_MACRO = "SEND_MACRO"
+EMA.COMMAND_DELETE_EMA_MACRO = "DELETE_EMA_MACRO"
+EMA.MACRO_TAIL = L["MACRO_TAIL"]
+
+-------------------------------------------------------------------------------------------------------------
+-- Macro Management.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	-- Set values.
+	-- EMA.settingsControl.checkBoxForwardWhispers:SetValue( EMA.db.forwardWhispers )
+	-- Set state.
+	EMA.settingsControl.buttonRefreshMacroList:SetDisabled( false )
+	EMA.settingsControl.checkBoxRefreshMacroListLocal:SetValue ( MacroListLocal.isLocal )
+	EMA.settingsControl.checkBoxisLocal:SetValue( currentMacro.isLocal )
+--	EMA:SettingsScrollRefresh()
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+		end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+local function SettingsCreateOptions( top )
+	-- Position and size constants.
+	local buttonControlWidth = 130
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local buttonHeight = EMAHelperSettings:GetButtonHeight() - 8
+	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local halfWidth = (headingWidth - horizontalSpacing) / 2
+	local left2 = left + halfWidth + horizontalSpacing
+	local indent = horizontalSpacing * 10
+	local movingTop = top
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, "", movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["MACRO_TITLE"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.macroInformationlabel = EMAHelperSettings:CreateFreeLabel(
+		EMA.settingsControl,
+		headingWidth,
+		left + indent,
+		movingTop,
+		"You can load your current macros to use them as a model. \n" ..
+		"Changing the macro title/content and hitting 'Save' will only change the " ..
+		"macro you're sending to other toons, not the one you're currently editing. \n" ..
+		"All macros created within this tab will be named 'name"..EMA.MACRO_TAIL.."'. \n" ..
+		"Clicking '".. L["DELETE_MACROS"] .."' will delete all macros ending with '"..EMA.MACRO_TAIL.."' on all your characters."
+	)
+	movingTop = movingTop - 70
+	EMA.settingsControl.dropDownMacroSelect = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		(headingWidth - indent) / 2,
+		left + indent,
+		movingTop,
+		L["SELECT_MACRO_TITLE"]
+	)
+	EMA.settingsControl.dropDownMacroSelect:SetList( myMacros )
+	EMA.settingsControl.dropDownMacroSelect:SetCallback( "OnValueChanged", EMA.EditCurrentMacroValue )
+	EMA.settingsControl.buttonRefreshMacroList = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		buttonControlWidth,
+		left + indent + (headingWidth - indent) / 2 + horizontalSpacing,
+		movingTop - buttonHeight,
+		L["LOAD_MACRO_BUTTON"],
+		EMA.RefreshMacroList,
+		L["LOAD_MACRO_BUTTON_HELP"]
+	)
+	EMA.settingsControl.checkBoxRefreshMacroListLocal = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left + indent + (headingWidth - indent) / 2 + horizontalSpacing + buttonControlWidth,
+		movingTop  - buttonHeight,
+		L["LOCAL_MACRO"],
+		EMA.checkBoxRefreshMacroListLocal,
+		L["LOCAL_MACRO_HELP"]
+	)
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+	EMA.settingsControl.editBoxMacroTitle = EMAHelperSettings:CreateEditBox(
+		EMA.settingsControl,
+		headingWidth / 3,
+		left + indent,
+		movingTop,
+		L["MACRO_NAME_AREA"]
+	)
+	EMA.settingsControl.editBoxMacroTitle:SetCallback( "OnEnterPressed", EMA.SaveCurrentMacroTitle )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControl.editCurrentMacro = EMAHelperSettings:CreateMultiEditBox(
+		EMA.settingsControl,
+		headingWidth,
+		left + indent,
+		movingTop,
+		L["MACRO_BODY"],
+		10
+	)
+	EMA.settingsControl.editCurrentMacro.button:SetText( "Save macro to send" )
+	EMA.settingsControl.editCurrentMacro.button:SetWidth( 180 )
+	EMA.settingsControl.editCurrentMacro:SetCallback( "OnEnterPressed", EMA.SaveCurrentMacroBody )
+	movingTop = movingTop - editBoxHeight * 3.7
+	EMA.settingsControl.checkBoxisLocal = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left + indent + halfWidth,
+		movingTop,
+		L["LOCAL_MACRO"],
+		EMA.setCurrentMacroIsLocal,
+		L["LOCAL_MACRO_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - 5
+	EMA.settingsControl.dropDownMacroToonSelect = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		(headingWidth - indent) / 3,
+		left + indent,
+		movingTop,
+		"Select toon"
+	)
+	for characterName, position in EMAApi.TeamList() do
+		table.insert( teamNames, characterName )
+	end
+	EMA.settingsControl.dropDownMacroToonSelect:SetList( teamNames )
+	EMA.settingsControl.dropDownMacroToonSelect:SetCallback( "OnValueChanged", EMA.EditCurrentToonValue )
+	EMA.settingsControl.buttonSendToonMacro = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		160,
+		left + indent + (headingWidth - indent) / 3 + horizontalSpacing,
+		movingTop - buttonHeight,
+		L["SEND_MACRO"],
+		EMA.SendMacroToToon
+	)
+	EMA.settingsControl.buttonSendToonMacro = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		170,
+		385,
+		movingTop - buttonHeight,
+		L["SEND_MACRO_ALL_CHARACTERS"],
+		EMA.SendMacroAllMinions
+	)
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+
+	EMA.settingsControl.buttonSendToonMacro = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		200,
+		left + indent,
+		movingTop - buttonHeight,
+		L["DELETE_MACROS"],
+		EMA.DeleteMacroTeam,
+		L["DELETE_MACROS_HELP"]
+	)
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+	return movingTop
+end
+
+local function SettingsCreate()
+	EMA.settingsControl = {}
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	local bottomOfSettings = SettingsCreateOptions( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfSettings )
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsSetMessageArea( event, value )
+	EMA.db.whisperMessageArea = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:RefreshMacroList()
+	local name, icon, body, isLocal
+	local macrosNames = {}
+	myMacros = {}
+	local nbGalobalMacro, nbLocalMacro = GetNumMacros()
+	if MacroListLocal.isLocal == false then
+	-- Global Macros
+		for macroIndex = 1, nbGalobalMacro do
+			name, icon, body = GetMacroInfo(macroIndex)
+			myMacros[#macrosNames+1] = {
+				name=name,
+				body=body,
+				icon=icon,
+				isLocal=false
+			}
+			macrosNames[#macrosNames+1] = name
+		end
+	end
+
+	-- Local macros
+	for macroIndex = 1, nbLocalMacro do
+		-- local macros start at 121
+		name, icon, body = GetMacroInfo( 120  + macroIndex)
+		myMacros[#macrosNames+1] = {
+			name=name,
+			body=body,
+			icon=icon,
+			isLocal=true
+		}
+		macrosNames[#macrosNames+1] = name
+	end
+
+	EMA.settingsControl.dropDownMacroSelect:SetList( macrosNames )
+end
+
+function EMA:EditCurrentMacroValue ( event, value )
+	currentMacro.isLocal = myMacros[value].isLocal
+	currentMacro.body = myMacros[value].body
+	currentMacro.name = myMacros[value].name
+	currentMacro.icon = myMacros[value].icon
+	currentMacro.id = value
+	EMA.settingsControl.editCurrentMacro:SetText( currentMacro.body )
+	EMA.settingsControl.checkBoxisLocal:SetValue( currentMacro.isLocal )
+	EMA.settingsControl.editBoxMacroTitle:SetText( currentMacro.name )
+end
+
+function EMA:EditCurrentToonValue(event, value)
+	currentToonValue = teamNames[value]
+end
+
+function EMA:SaveCurrentMacroBody(event, value)
+	currentMacro.body = value
+end
+
+function EMA:SaveCurrentMacroTitle( event, value )
+	currentMacro.name = value
+	EMA.settingsControl.editBoxMacroTitle:SetText(value)
+end
+
+function EMA:setCurrentMacroIsLocal(event, checked)
+	currentMacro.isLocal = checked
+end
+
+function EMA:checkBoxRefreshMacroListLocal(event, checked)
+	MacroListLocal.isLocal = checked
+end
+
+function EMA:SendMacroToToon()
+	if (currentToonValue ~= nil and currentMacro.name ~= nil) then
+		EMA:Print("Sending Macro " .. currentMacro.name .. " To " .. currentToonValue)
+		EMA:EMASendCommandToToon( currentToonValue, EMA.COMMAND_SEND_MACRO, currentMacro )
+	elseif currentToonValue == nil then
+		EMA:Print("Please select a character to send the macro to")
+	elseif currentMacro.name == nil then
+		EMA:Print("Please fill macro information you want to send")
+	end
+end
+
+function EMA:SendMacroAllMinions()
+	for characterName, position in EMAApi.TeamList() do
+		if characterName ~= EMA.characterName and EMAApi.GetCharacterOnlineStatus( characterName ) == true then
+			EMA:Print("Sending Macro " .. currentMacro.name .. " To " .. characterName)
+			EMA:EMASendCommandToToon( characterName, EMA.COMMAND_SEND_MACRO, currentMacro )
+		end
+	end
+end
+
+function EMA:DeleteMacroTeam()
+	for characterName, position in EMAApi.TeamList() do
+		if EMAApi.GetCharacterOnlineStatus( characterName )	 == true then
+			EMA:Print("Deleting Macros on " .. characterName)
+			EMA:EMASendCommandToToon( characterName, EMA.COMMAND_DELETE_EMA_MACRO )
+		end
+	end
+end
+
+local function create_macro( macro )
+	local macro_name = macro.name .. EMA.MACRO_TAIL
+	CreateMacro( macro_name, macro.icon, macro.body, macro.isLocal )
+end
+
+local function delete_macros()
+	local name, icon, body, isLocal
+	local macrosToDelete = {}
+	local nbGalobalMacro, nbLocalMacro = GetNumMacros()
+
+	-- Global Macros
+	for macroIndex = 1, nbGalobalMacro do
+		name, icon, body = GetMacroInfo(macroIndex)
+		if EMAUtilities:endsWith(name, EMA.MACRO_TAIL) then
+			EMA:Print("Deleting Macro " .. name)
+			table.insert( macrosToDelete, name)
+		end
+	end
+
+	-- Local macros
+	for macroIndex = 1, nbLocalMacro do
+		-- local macros start at 121
+		name, icon, body = GetMacroInfo( 120  + macroIndex)
+		if EMAUtilities:endsWith(name, EMA.MACRO_TAIL) then
+			EMA:Print("Deleting Macro " .. name)
+			table.insert( macrosToDelete, name)
+		end
+	end
+
+	for id, name in pairs(macrosToDelete) do
+		DeleteMacro(name)
+	end
+end
+
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+	if commandName == EMA.COMMAND_SEND_MACRO then
+		currentMacro = ...
+		EMA:Print("Macro " .. currentMacro.name .. " received from " .. characterName)
+		create_macro(currentMacro)
+	end
+	if commandName == EMA.COMMAND_DELETE_EMA_MACRO then
+		delete_macros()
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	-- Create the settings control.
+	SettingsCreate()
+	-- Initialise the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+end
diff --git a/Modules/Modules.xml b/Modules/Modules.xml
index 500c106..09f163d 100644
--- a/Modules/Modules.xml
+++ b/Modules/Modules.xml
@@ -13,9 +13,9 @@
 	<Script file="Purchase.lua" />

 	<Script file="Toon.lua" />
-	<Script file="Talk.lua" />
-
 	<Script file="Follow.lua" />
+	<Script file="Talk.lua" />
+	<Script file="Macro.lua" />

 	<Script file="Interaction.lua" />
 	<Script file="Trade.lua" />
@@ -29,6 +29,6 @@
 	<Script file="DisplayTeam.lua" />
 	<Script file="Information.lua" />
 	<Script file="ItemUse.lua" />
-	<Script file="ISBoxer.lua" />
+<!--	<Script file="ISBoxer.lua" /> -->
 	<Script file="LDBBar.lua" />
 </Ui>
diff --git a/Modules/Quest.lua b/Modules/Quest.lua
index 3c8a117..c174a98 100644
--- a/Modules/Quest.lua
+++ b/Modules/Quest.lua
@@ -253,8 +253,10 @@ function EMA:OnEnable()
    -- Quest post hooks.
 	EMA:SecureHook( C_GossipInfo, "SelectOption", "SelectGossipOption")
 	EMA:SecureHook( C_GossipInfo, "SelectActiveQuest" )
+	EMA:SecureHook( "SelectActiveQuest" ) -- Seems bfa uses the old API?
 	EMA:SecureHook( C_GossipInfo, "SelectAvailableQuest" )
-    EMA:SecureHook( "AcceptQuest" )
+	EMA:SecureHook( "SelectAvailableQuest" ) -- Seems bfa uses the old API?
+	EMA:SecureHook( "AcceptQuest" )
 	EMA:SecureHook( "AcknowledgeAutoAcceptQuest" )
     EMA:SecureHook( "CompleteQuest" )
 	EMA:SecureHook( "GetQuestReward" )
@@ -1107,7 +1109,7 @@ function EMA:ChurnNpcGossip()
 	local numberActiveQuestInfo = 5
     local index
 	--EMA:Print("test" )
-   EMA:DebugMessage( "GetNumAvailableQuests", GetNumAvailableQuests() )
+    EMA:DebugMessage( "GetNumAvailableQuests", GetNumAvailableQuests() )
     EMA:DebugMessage( "GetNumActiveQuests", GetNumActiveQuests() )
     EMA:DebugMessage( "GetGossipAvailableQuests", C_GossipInfo.GetAvailableQuests() )
     EMA:DebugMessage( "GetGossipActiveQuests", C_GossipInfo.GetActiveQuests() )
@@ -1236,6 +1238,7 @@ function EMA:DoSelectGossipActiveQuest( sender, gossipIndex )
 end

 function EMA:SelectGossipAvailableQuest( gossipIndex )
+	--EMA:Print("test")
 	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
 		if EMA.isInternalCommand == false then
 			EMA:DebugMessage( "SelectGossipAvailableQuest" )
@@ -1254,6 +1257,7 @@ function EMA:DoSelectGossipAvailableQuest( sender, gossipIndex )
 end

 function EMA:SelectActiveQuest( questIndex )
+	--EMA:Print("test")
 	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
 		if EMA.isInternalCommand == false then
             EMA:DebugMessage( "SelectActiveQuest" )
@@ -1265,7 +1269,6 @@ end
 function EMA:DoSelectActiveQuest( sender, questIndex )
 	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
 		EMA.isInternalCommand = true
-
 		--EMA:Print( "DoSelectActiveQuest" )
 		C_GossipInfo.SelectActiveQuest( questIndex )
 		EMA.isInternalCommand = false
@@ -1273,6 +1276,7 @@ function EMA:DoSelectActiveQuest( sender, questIndex )
 end

 function EMA:SelectAvailableQuest( questIndex )
+	--EMA:Print("test")
 	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
 		if EMA.isInternalCommand == false then
 			EMA:DebugMessage( "SelectAvailableQuest" )
@@ -1286,12 +1290,12 @@ function EMA:DoSelectAvailableQuest( sender, questIndex )
 	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
 		EMA.isInternalCommand = true
         EMA:DebugMessage( "DoSelectAvailableQuest" )
-		-- TODO KEEP?
-		--if C_GossipInfo.GetNumAvailableQuests() > 1 then
+		-- BFA npcs are not using the c_gossipInfo?????
+		if C_GossipInfo.GetNumAvailableQuests() > 1 then
 			C_GossipInfo.SelectAvailableQuest( questIndex )
-		--else
-		--	EMA:EMASendMessageToTeam( EMA.db.warningArea, L["AM_I_TALKING_TO_A_NPC"], false )
-		--end
+		else
+		SelectAvailableQuest( questIndex )
+		end
 		EMA.isInternalCommand = false
 	end
 end
@@ -1587,7 +1591,7 @@ function EMA:CanAutoAcceptSharedQuestFromPlayer()
 		end
 		if EMA.db.acceptFromFriends == true then
 			for friendIndex = 1, C_FriendList.GetNumFriends() do
-				local info = C_FriendList.GetFriendInfo( friendIndex )
+				local info = C_FriendList.GetFriendInfoByIndex( friendIndex )
 				if questSourceName == info.name then
 					canAccept = true
 					break
diff --git a/Modules/QuestWatcher.lua b/Modules/QuestWatcher.lua
index efd8b1c..cd80cac 100644
--- a/Modules/QuestWatcher.lua
+++ b/Modules/QuestWatcher.lua
@@ -2440,11 +2440,13 @@ function EMA:DisplayAutoQuestPopUps()
 			popUpType = characterPopUpType
 		end
 		-- If the current character does not have the quest, show the character names that do have it.
+		--[[
 		local clickToViewText = QUEST_WATCH_POPUP_CLICK_TO_VIEW
 			if not (title and title ~= "") then
 				title = characterList
 				clickToViewText = ""
 			end
+		]]
 		local frame = EMA:AutoQuestGetOrCreateFrame( parentFrame, countPopUps + 1 )
 		frame:Show()
 		frame:ClearAllPoints()
diff --git a/Modules/Talk.lua b/Modules/Talk.lua
index 48f337f..9334196 100644
--- a/Modules/Talk.lua
+++ b/Modules/Talk.lua
@@ -33,7 +33,7 @@ EMA.moduleDisplayName = L["TALK"]
 -- Icon
 EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\ChatIcon.tga"
 -- order
-EMA.moduleOrder = 99
+EMA.moduleOrder = 40


 -- Settings - the values to store and their defaults for the settings database.
diff --git a/Modules/Toon.lua b/Modules/Toon.lua
index bfc8d19..c151890 100644
--- a/Modules/Toon.lua
+++ b/Modules/Toon.lua
@@ -41,7 +41,8 @@ EMA.moduleIconWarnings = "Interface\\Addons\\EMA\\Media\\WarningIcon.tga"
 EMA.moduleIconRepair = "Interface\\Addons\\EMA\\Media\\moduleIconRepair.tga"
 -- order
 EMA.moduleOrder = 40
-
+EMA.moduleWarningsOrder = 1
+EMA.moduleRepairOrder = 1

 -- Settings - the values to store and their defaults for the settings database.
 EMA.settings = {
@@ -610,14 +611,17 @@ local function SettingsCreate()
 		L["WARNINGS"],
 		EMA.parentDisplayNameToon,
 		EMA.SettingsPushSettingsClick,
-		EMA.moduleIconWarnings
+		EMA.moduleIconWarnings,
+		EMA.moduleWarningsOrder
+
 	)
 	EMAHelperSettings:CreateSettings(
 		EMA.settingsControlMerchant,
 		L["REPAIR"],
 		EMA.parentDisplayNameMerchant,
 		EMA.SettingsPushSettingsClick,
-		EMA.moduleIconRepair
+		EMA.moduleIconRepair,
+		EMA.moduleRepairOrder
 	)
 	local bottomOfToon = SettingsCreateToon( EMAHelperSettings:TopOfSettings() )
 	EMA.settingsControlToon.widgetSettings.content:SetHeight( -bottomOfToon )
diff --git a/Modules/Trade.lua b/Modules/Trade.lua
index be4db5c..3b78a28 100644
--- a/Modules/Trade.lua
+++ b/Modules/Trade.lua
@@ -799,7 +799,9 @@ function EMA:TradeAllItems()
 					local inventoryType = C_Item.GetItemInventoryType( location )
 					local isBop = C_Item.IsBound( location )
 					local itemRarity =  C_Item.GetItemQuality( location )
-					local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemIcon, itemSellPrice, itemClassID, itemSubClassID, bindType, expacID, itemSetID, isCraftingReagent = GetItemInfo(bagItemLink)
+					--itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemIcon, itemSellPrice, itemClassID, itemSubClassID, bindType, expacID, itemSetID, isCraftingReagent
+					local itemClassID = select(12, GetItemInfo(bagItemLink) )
+					local isCraftingReagent = select(17, GetItemInfo(bagItemLink) )
 					local canTrade = false
 					if EMA.db.tradeBoEItems == true then
 						if inventoryType ~= 0 then