Quantcast

0143

Jennifer [07-17-20 - 23:10]
0143
Filename
Bindings.xml
CHANGELOG.txt
EMA.toc
EbonyUtilities.lua
Embeds.xml
LICENSE
Locales/Core-Locale-enUS.lua
Modules/Information.lua
Modules/ItemUse.lua
Modules/Toon.lua
diff --git a/Bindings.xml b/Bindings.xml
index 26ef301..6d28388 100644
--- a/Bindings.xml
+++ b/Bindings.xml
@@ -1,7 +1,7 @@
 <!--
 				EMA - ( Ebony's MultiBoxing Assistant )
 				Current Author: Jennifer Cally (Ebony)
-				License: MIT License 2018-2019 Jennifer Cally
+				License: MIT License 2018-2020 Jennifer Cally

 				Some Code Used from 'Jamba' that is
 				Released under the MIT License
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index ce57592..409b17c 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -2,6 +2,46 @@
 ChangeLogs:
 ---------------------------

+EMA Version: v8.3.0-Release-v2.5(0143)
+Game Version: 8.3.0
+Release Date: 17/07/2020
+
+## Information
+	-- Changed Command line to [info] from [information]
+	-- Added Echoes of Nyalotha
+	-- Added a chat !Triggers that work in party/guild/raid
+		- !emahelp = Shows all the Triggers
+		- !gold = Tells you how much gold you have on your team
+		- !item  = [ItemName] = shows how many of a item you have in your team.
+		- !durability or !durr = Shows your teams Durability.
+		- !keys = Shows your KeyStones
+		- !Bagspace = shows your Teams Bagspace.
+
+---------------------------
+
+EMA Version: v8.3.0-Release-v2.4(0142)
+Game Version: 8.3.0
+Release Date: 16/07/2020
+
+## Toon
+	- Fixed a bug with Toggle WarMode
+
+# item-Bar
+	-- Removed Add Add Satche ls Items To Bar due to a Big API change
+
+---------------------------
+
+EMA Version: v8.3.0-Release-v2.4(0140/1)
+Game Version: 8.3.0
+Release Date: 30/05/2020
+
+## Toon
+	- Updated Summon API
+	- Durability Warning will not warn ( "(ind)%" )
+
+
+---------------------------
+
 EMA Version: v8.3.0-Release-v2.4(0139)
 Game Version: 8.3.0
 Release Date: 07/02/2020
diff --git a/EMA.toc b/EMA.toc
index d2ee0c3..ba05b14 100644
--- a/EMA.toc
+++ b/EMA.toc
@@ -1,9 +1,9 @@
-## Interface: 80200
+## Interface: 80300
 ## Title: EMA
 ## Notes: Ebony's MultiBoxing Assistant
 ## Author: Jennifer Calladine 'Ebony'
-## Version: v8.2.0-Release-v2.2(0135)
-## SavedVariables: CoreProfileDB, CommunicationsProfileDB, TeamProfileDB, TagProfileDB, MessageProfileDB, CurrProfileDB, DisplayTeamProfileDB, FollowProfileDB, GuildProfileDB, InteractionProfileDB, ItemUseProfileDB, PurchaseProfileDB, QuestProfileDB,  QuestWatcherProfileDB, SellProfileDB, TalkProfileDB, ToonProfileDB, TradeProfileDB, MailProfileDB, ISBoxerProfileDB
+## Version: v8.3.0-Release-v2.5(0143)
+## SavedVariables: CoreProfileDB, CommunicationsProfileDB, TeamProfileDB, TagProfileDB, MessageProfileDB, CurrProfileDB, DisplayTeamProfileDB, FollowProfileDB, GuildProfileDB, InteractionProfileDB, ItemUseProfileDB, PurchaseProfileDB, QuestProfileDB,  QuestWatcherProfileDB, SellProfileDB, TalkProfileDB, ToonProfileDB, TradeProfileDB, MailProfileDB, BankProfileDB, ISBoxerProfileDB

 #Libs
 Embeds.xml
diff --git a/EbonyUtilities.lua b/EbonyUtilities.lua
index a0e76f9..54c2fb3 100644
--- a/EbonyUtilities.lua
+++ b/EbonyUtilities.lua
@@ -2,7 +2,7 @@
 --				EMA - ( Ebony's MultiBoxing Assistant )    							--
 --				Current Author: Jennifer Cally (Ebony)								--
 --																					--
---				License: MIT License 2018-2019 Jennifer Cally							--
+--				License: MIT License 2018-2020 Jennifer Cally							--
 --																					--
 --				Some Code Used from "Jamba" that is 								--
 --				Released under the MIT License 									--
@@ -48,6 +48,13 @@ function EbonyUtilities:ClearTable( object )
 	end
 end

+function EbonyUtilities:GetStatusPercent(val, max)
+	if (max > 0) then
+		return (val / max)
+	end
+	return 1.0
+end
+
 function EbonyUtilities:Lowercase( name )
 	if name ~= nil then
 		return string.utf8lower( name )
@@ -121,7 +128,7 @@ function EbonyUtilities:MoneyString( value )
 			silverFormat = ""
 		end
 	end
-	return gold, silver, copper
+	return BreakUpLargeNumbers(gold), silver, copper
 end


diff --git a/Embeds.xml b/Embeds.xml
index 17a3bf6..a701de9 100644
--- a/Embeds.xml
+++ b/Embeds.xml
@@ -1,7 +1,7 @@
 <!--
 				EMA - ( Ebony's MultiBoxing Assistant )
 				Current Author: Jennifer Cally (Ebony)
-				License: MIT License 2018-2019 Jennifer Cally
+				License: MIT License 2018-2020 Jennifer Cally

 				Some Code Used from 'Jamba' that is
 				Released under the MIT License
diff --git a/LICENSE b/LICENSE
index 79846aa..a132d50 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
 All Rights Reserved

-Copyright (c) 2018-2019  Jennifer Cally
+Copyright (c) 2018-2020  Jennifer Calladine

 All Rights Reserved unless otherwise explicitly stated.

diff --git a/Locales/Core-Locale-enUS.lua b/Locales/Core-Locale-enUS.lua
index 51e3a21..5b6cce2 100644
--- a/Locales/Core-Locale-enUS.lua
+++ b/Locales/Core-Locale-enUS.lua
@@ -109,6 +109,7 @@ L["ITEM_USE"] = "Item Use"
 L["VENDER_LIST_MODULE"] = "Sell List"
 L["INTERACTION"] = "Interaction"
 L["CURRENCY"] = "Currency"
+L["INFORMATION"] = "Information"
 L["TOON"] = "Toon"
 L["FOLLOW"] = "Follow"
 L["PURCHASE"] = "Purchase"
@@ -445,7 +446,7 @@ L["I_AM_UNABLE_TO_FLY_TO_A"] = function( nodename )
 	return string.format( "I Am Unable To Fly To %s.", nodename )
 end
 --------------------------
--- Currency Locale
+-- infomation Locale
 L["EMA_CURRENCY"] = "Currency"
 L["SHOW_CURRENCY"] = "Show Currency"
 L["SHOW_CURRENCY_HELP"] = "Show The Currency Frame Window."
@@ -466,7 +467,28 @@ L["SPACE_FOR_POINTS"] = "Space For Points"
 L["SPACE_BETWEEN_VALUES"] = "Space Between Values"
 L["TOTAL"] = "Total"
 L["CURR"] = "Curr"
+L["CHAT_TRIGGER"] = "Chat !Triggers"
+L["CHAT_TRIGGERS"] = "Listen to Chat Triggers"
+L["CHAT_TRIGGERS_HELP"] = "Listen to !Triggers in \nParty/raid/guild to tell your team about things\n!emahelp"
+L["I_HAVE_X_GOLD"] = function( gold )
+	return string.format( "%s ", gold)
+end

+L["MY_KEY_STONE_IS"] = function( key )
+	return string.format( "%s", key )
+end
+L["MY_LATENCY_IS:X_MS_X_MS"] = function( home, world )
+	return string.format( "%s ms (Home) %s ms (World)", home, world )
+end
+L["MY_CURRENT_DURABILITY_IS"] = function (durabilityText)
+	return string.format( "Durability %s", durabilityText )
+end
+L["ITEMCOUNT:_x_BAGS_BANK"] = function (item, countBags, countTotal)
+	return string.format( "%s %s (Bags) %s (Bank)", item, countBags, (countTotal - countBags) )
+end
+L["BAG_FREE_SPACE"] = function (numFreeSlots, numTotalSlots)
+	return string.format( "%s (Free) / %s (Total)", numFreeSlots, numTotalSlots )
+end

 --------------------------
 -- Display Team Locale
@@ -875,17 +897,6 @@ L["REWARDS"] = "Rewards"
 L["REWARDS_TEXT"] = "Completing This Quest Will \nReward You With:"
 L["HEADER_MOUSE_OVER_QUESTWATCHER"] = "Hold Down \"ALT\" Key To Move EMA Objectives Tracker"
 L["UPDATE_MOUSE_OVER_QUESTWATCHER"] = "Force A Update Of The EMA Objectives Tracker"
-------------------------
--- Bank Locale
-L["REMOVE_BANK_LIST"] = "Are You Sure You Wish To Remove The Selected Item From The Bank Items List?"
-L["BANK_LIST_HEADER"] = "Bank Items List"
-L["BANK_LIST"] = "Put The Items In The Bank"
-L["BANK_LIST_HELP"] = "Automatically Put Listed Items Below In The Bank"
-L["BANK_BOE_ITEMS"] = "Places All BoE Items In The Bank"
-L["BANK_BOE_ITEMS_HELP"] = "Places All Binds When Equipped Items In The Bank"
-L["BANK_REAGENTS"] = "Places All Reagents In Bank"
-L["BANK_REAGENTS_HELP"] = "Places All Crafting Reagents Items In The Bank"
-L["BANK_OPTIONS"] = "Extra Bank Options"

 ------------------------
 -- Guild Locale
@@ -948,10 +959,15 @@ end
 -----------------------
 -- Bank Locale
 L["BANK"] = "Bank"
-L["REMOVE_BANK_LIST"] = "Remove Item From Bank List"
-
-
-
+L["REMOVE_BANK_LIST"] = "Are You Sure You Wish To Remove The Selected Item From The Bank Items List?"
+L["BANK_LIST_HEADER"] = "Bank Items List"
+L["BANK_LIST"] = "Put The Items In The Bank"
+L["BANK_LIST_HELP"] = "Automatically Put Listed Items Below In The Bank"
+L["BANK_BOE_ITEMS"] = "Places All BoE Items In The Bank"
+L["BANK_BOE_ITEMS_HELP"] = "Places All Binds When Equipped Items In The Bank"
+L["BANK_REAGENTS"] = "Places All Reagents In Bank"
+L["BANK_REAGENTS_HELP"] = "Places All Crafting Reagents Items In The Bank"
+L["BANK_OPTIONS"] = "Extra Bank Options"

 -----------------------
 -- LDBBar Locale
diff --git a/Modules/Information.lua b/Modules/Information.lua
index 1806203..a076141 100644
--- a/Modules/Information.lua
+++ b/Modules/Information.lua
@@ -29,10 +29,10 @@ EMA.SharedMedia = LibStub( "LibSharedMedia-3.0" )
 --  Constants and Locale for this module.
 EMA.moduleName = "Information"
 EMA.settingsDatabaseName = "CurrProfileDB"
-EMA.chatCommand = "ema-information"
+EMA.chatCommand = "ema-info"
 local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
 EMA.parentDisplayName = L["DISPLAY"]
-EMA.moduleDisplayName = L["CURRENCY"]
+EMA.moduleDisplayName = L["INFORMATION"]
 -- Icon
 EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\SellIcon.tga"
 -- order
@@ -95,6 +95,7 @@ EMA.currTypes.PrismaticManapearl = 1721
 --8.3
 EMA.currTypes.CoalescingVisions = 1755
 EMA.currTypes.CorruptedMementos = 1719
+EMA.currTypes.echoesOfNyalotha = 1803

 -------------------------------------- End of edit --------------------------------------------------------------

@@ -108,6 +109,7 @@ end
 -- Settings - the values to store and their defaults for the settings database.
 EMA.settings = {
 	profile = {
+		currChatTrigger = false,
 		currGold = true,
 		currGoldInGuildBank = false,
 		-- Currency default's
@@ -266,6 +268,21 @@ function EMA:SettingsCreateCurrency( top )
 	local left3 = left + (thirdWidth * 1)
 	local right = left + halfWidth + horizontalSpacing
 	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["CHAT_TRIGGER"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxChatTrigger = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["CHAT_TRIGGERS"],
+		EMA.SettingsToggleChatTrigger,
+		L["CHAT_TRIGGERS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
 	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["CURRENCY_HEADER"], movingTop, false )
 	movingTop = movingTop - headingHeight
 	EMA.settingsControl.checkBoxCurrencyGold = EMAHelperSettings:CreateCheckBox(
@@ -515,6 +532,7 @@ function EMA:OnEMAProfileChanged()
 end

 function EMA:SettingsRefresh()
+	EMA.settingsControl.checkBoxChatTrigger:SetValue( EMA.db.currChatTrigger )
 	EMA.settingsControl.checkBoxCurrencyGold:SetValue( EMA.db.currGold )
 	EMA.settingsControl.checkBoxCurrencyGoldInGuildBank:SetValue( EMA.db.currGoldInGuildBank )
 	EMA.settingsControl.checkBoxCurrencyGoldInGuildBank:SetDisabled( not EMA.db.currGold )
@@ -554,6 +572,11 @@ function EMA:SettingsPushSettingsClick( event )
 	EMA:EMASendSettings()
 end

+function EMA:SettingsToggleChatTrigger( event, checked )
+	EMA.db.currChatTrigger = checked
+	EMA:SettingsRefresh()
+end
+
 function EMA:SettingsToggleCurrencyGold( event, checked )
 	EMA.db.currGold = checked
 	EMA:SettingsRefresh()
@@ -715,6 +738,11 @@ end
 -- Called when the addon is enabled.
 function EMA:OnEnable()
 	-- WoW events.
+	EMA:RegisterEvent( "CHAT_MSG_PARTY", "DoChatCommand")
+	EMA:RegisterEvent( "CHAT_MSG_GUILD", "DoChatCommand")
+	EMA:RegisterEvent( "CHAT_MSG_PARTY_LEADER", "DoChatCommand")
+	EMA:RegisterEvent( "CHAT_MSG_RAID", "DoChatCommand")
+	EMA:RegisterEvent( "CHAT_MSG_RAID_LEADER", "DoChatCommand")
 	--EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
 	if EMA.db.currOpenStartUpMaster == true then
 		if EMAApi.IsCharacterTheMaster( self.characterName ) == true then
@@ -731,6 +759,7 @@ end
 function EMA:EMAOnSettingsReceived( characterName, settings )
 	if characterName ~= EMA.characterName then
 		-- Update the settings.
+		EMA.db.currChatTrigger = settings.currChatTrigger
 		EMA.db.currGold = settings.currGold
 		EMA.db.currGoldInGuildBank = settings.currGoldInGuildBank
 		EMA.db.CcurrTypeOne = settings.CcurrTypeOne
@@ -1668,6 +1697,203 @@ function EMA:DoShowToonsCurrency( characterName, currencyValues )
 	--EMAToonCurrencyListFrameTwo:Show()
 end

+
+-------------------------------------------------------------------------------------------------------------
+-- Team Information Stuff.
+-------------------------------------------------------------------------------------------------------------
+
+local trigger = {
+	["!emahelp"] = true,
+	["!gold"] = true,
+	["!keys"] = true,
+	["!ping"] = true,
+	["!durability"] = true,
+	["!durr"] = true,
+	["!item"] = true,
+	["!bagspace"] = true
+}
+
+function EMA:DoChatCommand( event, msg, playerName, ... )
+	if EMA.db.currChatTrigger == false then
+		return
+	end
+	--EMA:Print("test3", event, msg, playerName )
+	msg = msg:lower()
+	for keyword in pairs(trigger) do
+		--EMA:Print("aa", msg, keyword, playerName)
+		if msg:match(keyword) then
+			if EMAApi.IsCharacterInTeam(playerName) == true then
+				if keyword == "!gold" then
+					--EMA:Print("triggerFound", keyword)
+					EMA:TellTeamGold( event, msg, playerName)
+				elseif keyword == "!keys" then
+					EMA:TellTeamKeys( event, msg, playerName)
+				elseif keyword == "!ping" then
+					EMA:TellTeamPing( event, msg, playerName)
+				elseif 	keyword == "!durability" or keyword == "!durr" then
+					EMA:TellTeamDurr( event, msg, playerName)
+				elseif keyword == "!item" then
+					EMA:TellTeamItem( event, msg, playerName)
+				elseif keyword == "!bagspace" then
+					EMA:TellTeamBagspace( event, msg, playerName)
+
+				elseif keyword == "!emahelp" then
+					EMA:TriggerHelp( msg, playerName )
+				break
+				end
+			end
+		end
+	end
+end
+
+function EMA:TriggerHelp( msg, playerName )
+	--EMA:Print("test?", playerName, EMA.CharacterName)
+	if  playerName == EMA.characterName then
+		EMA:Print( L["CHAT_TRIGGER"] )
+		for keyword in pairs(trigger) do
+		 EMA:Print(keyword)
+		 end
+	end
+end
+
+-- Report Gold.
+function EMA:TellTeamGold( event, msg, playerName )
+	--EMA:Print("goldtest", event, msg)
+	local money = GetMoney()
+	local gold, silver, copper  = EMAUtilities:MoneyString(money)
+	local goldText = gold.." Gold "..silver.." Silver "..copper.." Copper"
+	local channel = nil
+	if event == "CHAT_MSG_GUILD" then
+		channel = "GUILD"
+	elseif event == "CHAT_MSG_PARTY" or event == "CHAT_MSG_PARTY_LEADER" then
+		channel = "PARTY"
+	elseif event == "CHAT_MSG_RAID" or event == "CHAT_MSG_RAID_LEADER" then
+		channel = "RAID"
+	end
+	if channel ~= nil then
+		SendChatMessage(L["I_HAVE_X_GOLD"](goldText), channel)
+	end
+end
+
+-- KeyStones
+function EMA:TellTeamKeys( event, msg, playerName)
+	local KeyStone = EMA:LookForKeyStones()
+	--EMA:Print("test", KeyStone)
+	local channel = nil
+	if event == "CHAT_MSG_GUILD" then
+		channel = "GUILD"
+	elseif event == "CHAT_MSG_PARTY" or event == "CHAT_MSG_PARTY_LEADER" then
+		channel = "PARTY"
+	elseif event == "CHAT_MSG_RAID" or event == "CHAT_MSG_RAID_LEADER" then
+		channel = "RAID"
+	end
+	if channel ~= nil then
+		SendChatMessage(L["MY_KEY_STONE_IS"](KeyStone), channel)
+	end
+end
+
+function EMA:LookForKeyStones()
+	for bagID = 0, NUM_BAG_SLOTS do
+		for slotID = 1,GetContainerNumSlots( bagID ),1 do
+			local item = Item:CreateFromBagAndSlot(bagID, slotID)
+			if ( item ) then
+				local bagItemID = item:GetItemID()
+				local itemLink = item:GetItemLink()
+				if ( bagItemID ) then
+					--EMA:Print("test", bagItemID, itemLink)
+					if (bagItemID == 158923) then
+						return itemLink
+					elseif (bagItemID == 123456) then
+						return itemLink
+					end
+				end
+			end
+		end
+	end
+end
+
+-- Ping (System)
+function EMA:TellTeamPing( event, msg, playerName)
+	local _, _, latencyHome, latencyWorld = GetNetStats()
+	local channel = nil
+	if event == "CHAT_MSG_GUILD" then
+		channel = "GUILD"
+	elseif event == "CHAT_MSG_PARTY" or event == "CHAT_MSG_PARTY_LEADER" then
+		channel = "PARTY"
+	elseif event == "CHAT_MSG_RAID" or event == "CHAT_MSG_RAID_LEADER" then
+		channel = "RAID"
+	end
+	if channel ~= nil then
+		SendChatMessage(L["MY_LATENCY_IS:X_MS_X_MS"](latencyHome,latencyWorld), channel)
+	end
+end
+
+ -- Durability
+function EMA:TellTeamDurr( event, msg, playerName)
+	local curTotal, maxTotal, broken = 0, 0, 0
+	local durability = 100
+	for i = 1, 17 do
+		local curItemDurability, maxItemDurability = GetInventoryItemDurability(i)
+		if (curItemDurability ~= nil) and (maxItemDurability ~= nil ) then
+			--EMA:Print("£test", i, curItemDurability, maxItemDurability )
+			curTotal = curTotal + curItemDurability
+			maxTotal = maxTotal + maxItemDurability
+			if maxItemDurability > 0 and curItemDurability == 0 then
+				broken = broken + 1
+			end
+		end
+	end
+	local durabilityPercent = ( EMAUtilities:GetStatusPercent(curTotal, maxTotal) * 100 )
+	local durabilityText = tostring(gsub( durabilityPercent, "%.[^|]+", "") )
+
+	local channel = nil
+	if event == "CHAT_MSG_GUILD" then
+		channel = "GUILD"
+	elseif event == "CHAT_MSG_PARTY" or event == "CHAT_MSG_PARTY_LEADER" then
+		channel = "PARTY"
+	elseif event == "CHAT_MSG_RAID" or event == "CHAT_MSG_RAID_LEADER" then
+		channel = "RAID"
+	end
+	if channel ~= nil then
+		SendChatMessage(L["MY_CURRENT_DURABILITY_IS"](durabilityText)..L["%"], channel)
+	end
+end
+
+-- Bag Item Scan:
+function EMA:TellTeamItem( event, msg, playerName)
+	--EMA:Print("item", event, msg, playerName )
+	local _, item = strsplit(" ", msg, 2)
+	local _, name = GetItemInfo( item )
+	local countBags = GetItemCount( item )
+	local countTotal = GetItemCount( item , true)
+	local channel = nil
+	if event == "CHAT_MSG_GUILD" then
+		channel = "GUILD"
+	elseif event == "CHAT_MSG_PARTY" or event == "CHAT_MSG_PARTY_LEADER" then
+		channel = "PARTY"
+	elseif event == "CHAT_MSG_RAID" or event == "CHAT_MSG_RAID_LEADER" then
+		channel = "RAID"
+	end
+	if channel ~= nil and name ~= nil then
+		SendChatMessage(L["ITEMCOUNT:_x_BAGS_BANK"](name, countBags, countTotal), channel)
+	end
+end
+
+function EMA:TellTeamBagspace( event, msg, playerName)
+	local numFreeSlots, numTotalSlots = LibBagUtils:CountSlots("BAGS", 0)
+	local channel = nil
+	if event == "CHAT_MSG_GUILD" then
+		channel = "GUILD"
+	elseif event == "CHAT_MSG_PARTY" or event == "CHAT_MSG_PARTY_LEADER" then
+		channel = "PARTY"
+	elseif event == "CHAT_MSG_RAID" or event == "CHAT_MSG_RAID_LEADER" then
+		channel = "RAID"
+	end
+	if channel ~= nil then
+		SendChatMessage(L["BAG_FREE_SPACE"](numFreeSlots, numTotalSlots), channel)
+	end
+end
+
 -- A EMA command has been received.
 function EMA:EMAOnCommandReceived( characterName, commandName, ... )
 	if commandName == EMA.COMMAND_REQUEST_CURRENCY then
diff --git a/Modules/ItemUse.lua b/Modules/ItemUse.lua
index b64b615..2b425d3 100644
--- a/Modules/ItemUse.lua
+++ b/Modules/ItemUse.lua
@@ -77,8 +77,8 @@ EMA.settings = {
 		itemUseVerticalSpacing = 3,
 		itemUseHorizontalSpacing = 2,
 		autoAddQuestItemsToBar = false,
-		autoAddArtifactItemsToBar = false,
-		autoAddSatchelsItemsToBar = false,
+--		autoAddArtifactItemsToBar = false,
+--		autoAddSatchelsItemsToBar = false,
 		hideClearButton = false,
 		itemBarsSynchronized = true,
 		numberOfItems = 10,
@@ -552,6 +552,7 @@ function EMA:SyncButton()
 	end
 end

+--[[
 -- Add satchels to item bar.
 function EMA:CheckForSatchelsItemAndAddToBar()
 	for bag = 0, NUM_BAG_SLOTS do
@@ -585,6 +586,8 @@ function EMA:CheckForArtifactItemAndAddToBar()
 		end
 	end
 end
+
+]]

 --Checks the item is in the Toon players bag 8.0.1 using min/min code!
 function EMA:IsInInventory(itemID)
@@ -808,7 +811,6 @@ local function SettingsCreateOptions( top )
 		EMA.SettingsToggleAutoAddArtifactItem,
 		L["ADD_ARTIFACT_ITEMS_HELP"]
 	)
-	]]
 	movingTop = movingTop - checkBoxHeight - verticalSpacing
 	EMA.settingsControl.displayOptionsCheckBoxAutoAddSatchelsItem = EMAHelperSettings:CreateCheckBox(
 		EMA.settingsControl,
@@ -819,6 +821,7 @@ local function SettingsCreateOptions( top )
 		EMA.SettingsToggleAutoAddSatchelsItem,
 		L["ADD_SATCHEL_ITEMS_HELP"]
 	)
+	]]
 	movingTop = movingTop - checkBoxHeight - verticalSpacing
 	EMA.settingsControl.displayOptionsCheckBoxHideClearButton = EMAHelperSettings:CreateCheckBox(
 		EMA.settingsControl,
@@ -989,7 +992,7 @@ function EMA:SettingsRefresh()
 	EMA.settingsControl.displayOptionsItemUseNumberOfRows:SetValue( EMA.db.numberOfRows )
 	EMA.settingsControl.displayOptionsCheckBoxAutoAddQuestItem:SetValue( EMA.db.autoAddQuestItemsToBar )
 	--EMA.settingsControl.displayOptionsCheckBoxAutoAddArtifactItem:SetValue( EMA.db.autoAddArtifactItemsToBar )
-	EMA.settingsControl.displayOptionsCheckBoxAutoAddSatchelsItem:SetValue( EMA.db.autoAddSatchelsItemsToBar )
+	--EMA.settingsControl.displayOptionsCheckBoxAutoAddSatchelsItem:SetValue( EMA.db.autoAddSatchelsItemsToBar )
 	EMA.settingsControl.displayOptionsCheckBoxHideClearButton:SetValue( EMA.db.hideClearButton )
 	EMA.settingsControl.displayOptionsCheckBoxItemBarsSynchronized:SetValue( EMA.db.itemBarsSynchronized )
 	EMA.settingsControl.displayOptionsItemUseScaleSlider:SetValue( EMA.db.itemUseScale )
@@ -1010,7 +1013,7 @@ function EMA:SettingsRefresh()
 		EMA.settingsControl.displayOptionsItemUseNumberOfRows:SetDisabled( not EMA.db.showItemUse )
 		EMA.settingsControl.displayOptionsCheckBoxAutoAddQuestItem:SetDisabled( not EMA.db.showItemUse )
 		--EMA.settingsControl.displayOptionsCheckBoxAutoAddArtifactItem:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsCheckBoxAutoAddSatchelsItem:SetDisabled( not EMA.db.showItemUse )
+		--EMA.settingsControl.displayOptionsCheckBoxAutoAddSatchelsItem:SetDisabled( not EMA.db.showItemUse )
 		EMA.settingsControl.displayOptionsCheckBoxHideClearButton:SetDisabled( not EMA.db.showItemUse )
 		EMA.settingsControl.displayOptionsCheckBoxItemBarsSynchronized:SetDisabled( not EMA.db.showItemUse )
 		EMA.settingsControl.displayOptionsItemUseScaleSlider:SetDisabled( not EMA.db.showItemUse )
@@ -1060,7 +1063,7 @@ function EMA:SettingsToggleAutoAddQuestItem( event, checked )
 	EMA.db.autoAddQuestItemsToBar = checked
 	EMA:SettingsRefresh()
 end
-
+--[[
 function EMA:SettingsToggleAutoAddArtifactItem( event, checked )
 	EMA.db.autoAddArtifactItemsToBar = checked
 	EMA:SettingsRefresh()
@@ -1070,7 +1073,7 @@ function EMA:SettingsToggleAutoAddSatchelsItem( event, checked )
 	EMA.db.autoAddSatchelsItemsToBar = checked
 	EMA:SettingsRefresh()
 end
-
+]]
 function EMA:SettingsToggleHideClearButton(event, checked )
 	EMA.db.hideClearButton = checked
 	EMA:SettingsRefresh()
@@ -1201,7 +1204,7 @@ function EMA:EMAOnSettingsReceived( characterName, settings )
 		EMA.db.itemUseHorizontalSpacing = settings.itemUseHorizontalSpacing
 		EMA.db.autoAddQuestItemsToBar = settings.autoAddQuestItemsToBar
 		--EMA.db.autoAddArtifactItemsToBar = settings.autoAddArtifactItemsToBar
-		EMA.db.autoAddSatchelsItemsToBar = settings.autoAddSatchelsItemsToBar
+		--EMA.db.autoAddSatchelsItemsToBar = settings.autoAddSatchelsItemsToBar
 		EMA.db.hideClearButton = settings.hideClearButton
 		EMA.db.itemBarsSynchronized = settings.itemBarsSynchronized
 		EMA.db.numberOfItems = settings.numberOfItems
@@ -1268,9 +1271,11 @@ function EMA:BAG_UPDATE_DELAYED()
 	if EMA.db.showItemCount == true then
 		EMA:GetEMAItemCount()
 	end
+	--[[
 	if EMA.db.autoAddSatchelsItemsToBar == true then
 		EMA:CheckForSatchelsItemAndAddToBar()
 	end
+	]]
 end

 function EMA:QUEST_UPDATE()
@@ -1291,11 +1296,10 @@ function EMA:ITEM_PUSH()
 	if EMA.db.autoAddArtifactItemsToBar == true then
 		EMA:ScheduleTimer( "CheckForArtifactItemAndAddToBar", 1 )
 	end
-	]]
 	if EMA.db.autoAddSatchelsItemsToBar == true then
 		EMA:ScheduleTimer( "CheckForSatchelsItemAndAddToBar", 1 )
 	end
-
+	]]
 end

 function EMA:PLAYER_ENTERING_WORLD( event, ... )
@@ -1450,4 +1454,4 @@ end

 --EMA QUEST API
 EMAApi.GetMaxItemCountFromItemID = GetMaxItemCountFromItemID
-EMAApi.QuestTest = EMA.CheckForSatchelsItemAndAddToBar
\ No newline at end of file
+--EMAApi.QuestTest = EMA.CheckForSatchelsItemAndAddToBar
\ No newline at end of file
diff --git a/Modules/Toon.lua b/Modules/Toon.lua
index ea64c92..102713a 100644
--- a/Modules/Toon.lua
+++ b/Modules/Toon.lua
@@ -1353,10 +1353,10 @@ function EMA:DoLootRoll( id, rollType, name )
 end

 function EMA:CONFIRM_SUMMON( event, sender, location, ... )
-	local sender, location = GetSummonConfirmSummoner(), GetSummonConfirmAreaName()
+	local sender, location = C_SummonInfo.GetSummonConfirmSummoner(), C_SummonInfo.GetSummonConfirmAreaName()
 	if EMA.db.autoAcceptSummonRequest == true then
-		if GetSummonConfirmTimeLeft() > 0 then
-		ConfirmSummon()
+		if C_SummonInfo.GetSummonConfirmTimeLeft() > 0 then
+		C_SummonInfo.ConfirmSummon()
 		StaticPopup_Hide("CONFIRM_SUMMON")
 		EMA:EMASendMessageToTeam( EMA.db.requestArea, L["SUMMON_FROM_X_TO_Y"]( sender, location ), false )
 		end
@@ -1364,25 +1364,23 @@ function EMA:CONFIRM_SUMMON( event, sender, location, ... )
 end

 function EMA:WARMODE(event, ...)
-	if EMA.db.toggleWarMode == false then
-		return
-	end
-	if C_PvP.IsWarModeFeatureEnabled() == true then
-		local isWarMode = C_PvP.IsWarModeDesired()
-		if C_PvP.CanToggleWarMode(isWarMode) == true then
-			--EMA:Print("Send", isWarMode, EMA.isInternalCommand )
-			if EMA.isInternalCommand == false then
-				EMA:EMASendCommandToTeam( EMA.COMMAND_WAR_MODE, isWarMode )
-				EMA.isInternalCommand = true
+	if EMA.db.toggleWarMode == true then
+		if C_PvP.IsWarModeFeatureEnabled() == true then
+			local isWarMode = C_PvP.IsWarModeDesired()
+			if C_PvP.CanToggleWarMode(isWarMode) == true then
+				if EMA.isInternalCommand == false then
+					--EMA:Print("SendWarMode", isWarMode, EMA.isInternalCommand )
+					EMA:EMASendCommandToTeam( EMA.COMMAND_WAR_MODE, isWarMode )
+				end
 			end
-		end
-	end
+		end
+	end
 end

 function EMA:DoWarMode( isWarMode )
-	--EMA:Print("testwarmode", isWarMode )
 	EMA.isInternalCommand = true
 	if C_PvP.CanToggleWarMode( isWarMode ) == true and isWarMode ~= nil then
+		--EMA:Print("testwarmode", isWarMode )
 		C_PvP.SetWarModeDesired( isWarMode )
 	end
 	EMA.isInternalCommand = false
@@ -1477,13 +1475,14 @@ function EMA:UNIT_HEALTH( event, unitAffected, ... )
 end

 function EMA:UPDATE_INVENTORY_DURABILITY(event, agr1)
+	--EMA:Print("test")
 	if EMA.db.warnWhenDurabilityDropsBelowX == false then
 		return
 	end
 	--EMA:Print("Test Durability Fired")
 	local curTotal, maxTotal, broken = 0, 0, 0
 	local durability = 100
-	for i = 1, 18 do
+	for i = 1, 17 do
 		local curItemDurability, maxItemDurability = GetInventoryItemDurability(i)
 		if (curItemDurability ~= nil) and (maxItemDurability ~= nil ) then
 			--EMA:Print("£test", i, curItemDurability, maxItemDurability )
@@ -1494,19 +1493,18 @@ function EMA:UPDATE_INVENTORY_DURABILITY(event, agr1)
 			end
 		end
 	end
+
 	--EMA:Print( curTotal, maxTotal )
-	if maxTotal > 0 then
-		durability = (curTotal / maxTotal) * 100
-	end
-	local durabilityText = tostring(gsub( durability, "%.[^|]+", "") )
-	--EMA:Print("Test Durability", durability, durabilityText,"%")
+	local durabilityPercent = ( EMAUtilities:GetStatusPercent(curTotal, maxTotal) * 100 )
+	local durabilityText = tostring(gsub( durabilityPercent, "%.[^|]+", "") )
+	--EMA:Print("Test durability", durabilityPercent, durabilityText,"%")
 	if EMA.toldMasterAboutDurability == true then
-		if durability >= tonumber( EMA.db.warnWhenDurabilityDropsAmount ) then
+		if durabilityPercent >= tonumber( EMA.db.warnWhenDurabilityDropsAmount ) then
 			EMA.toldMasterAboutDurability = false
 			EMA:ScheduleTimer("ResetDurability", 15, nil )
 		end
 	else
-		if durability < tonumber( EMA.db.warnWhenDurabilityDropsAmount ) then
+		if durabilityPercent < tonumber( EMA.db.warnWhenDurabilityDropsAmount ) then
 			EMA.toldMasterAboutDurability = true
 			EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.warnDurabilityDropsMessage..L[" "]..durabilityText..L["%"], false )
 		end
@@ -1631,10 +1629,12 @@ function EMA:EMAOnCommandReceived( characterName, commandName, ... )
 		end
 	end
 	if commandName == EMA.COMMAND_WAR_MODE then
-		if characterName == self.characterName then
-			EMA.isInternalCommand = false
-		else
+		if characterName ~= self.characterName then
+			--EMA.isInternalCommand = false
 			EMA.DoWarMode( characterName, ... )
 		end
 	end
 end
+
+
+--EMAApi.isInternalCommand = EMA.isInternalCommand