Quantcast

121018

Jennifer [09-14-19 - 11:51]
121018
Filename
CHANGELOG.txt
EMA-Classic.toc
Locales/Classic-Core-Locale-enUS.lua
Modules/Mail-Classic.lua
Modules/Purchase-Classic.lua
Modules/Sell-Classic.lua
Modules/Trade-Classic.lua
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 96cc170..f197e62 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -2,15 +2,24 @@
 ChangeLogs:
 ---------------------------

-EMA Version: v1.13.2-Release-v0.4(121016/121017)
+EMA Version: v1.13.2-Release-v0.5(121018)
 Game Version: 1.13.2
-Release Date: 09/9/2019
+Release Date: 14/9/2019

-#Item_Bar
-	- Fixed a Lag bug i hope when you have quest items added to bar, added 121017 Now fixed the UI from crashing!
+## Trade, Purchase, Mail
+	- Fixed A Global Error Where It Was Not Removing The Item From The Right Selected Item

+## Trade, Purchase, Mail, Sell
+	- Now Support Shift Mouse Click A Item From Your Bags

+---------------------------

+EMA Version: v1.13.2-Release-v0.4(121016/121017)
+Game Version: 1.13.2
+Release Date: 09/9/2019
+
+## Item_Bar
+	- Fixed a Lag bug i hope when you have quest items added to bar, added 121017 Now fixed the UI from crashing!

 ---------------------------

diff --git a/EMA-Classic.toc b/EMA-Classic.toc
index 26051f5..51968fc 100644
--- a/EMA-Classic.toc
+++ b/EMA-Classic.toc
@@ -2,7 +2,7 @@
 ## Title: EMA-Classic
 ## Notes: Ebony's MultiBoxing Assistant Classic
 ## Author: Jennifer Calladine 'Ebony'
-## Version: v1.13.2-Release-v0.3(121017)
+## Version: v1.13.2-Release-v0.3(121018)
 ## SavedVariables: CoreProfileDB, CommunicationsProfileDB, TeamProfileDB, TagProfileDB, MessageProfileDB, CurrProfileDB, DisplayTeamProfileDB, FollowProfileDB, GuildProfileDB, InteractionProfileDB, ItemUseProfileDB, PurchaseProfileDB, QuestProfileDB,  QuestWatcherProfileDB, SellProfileDB, TalkProfileDB, ToonProfileDB, TradeProfileDB, MailProfileDB, ISBoxerProfileDB

 #Libs
diff --git a/Locales/Classic-Core-Locale-enUS.lua b/Locales/Classic-Core-Locale-enUS.lua
index 542ef05..31cbc58 100644
--- a/Locales/Classic-Core-Locale-enUS.lua
+++ b/Locales/Classic-Core-Locale-enUS.lua
@@ -396,7 +396,7 @@ L["AUTO_SELL_TOYS"] = "|cff00ccff Sell Already Known Toys"
 L["AUTO_SELL_TOYS_HELP"] = "Sell Or Destroy Already Known Toys"
 L["AUTO_SELL_MOUNTS"] = "|cff00ccff Already Known Mounts"
 L["AUTO_SELL_MOUNTS_HELP"] = "Sell Or Destroy Already Known Mounts"
-L["SELL_LIST_DROP_ITEM"] = "Sell Other Item (DRAG ITEM TO BOX)"
+L["SELL_LIST_DROP_ITEM"] = "Sell Other Item (Shift+Click Item In Bag)"
 L["ITEM_TAG_ERR"] = "Item Tags Must Only Be Made Up Of Letters And Numbers."
 L["POPUP_REMOVE_ITEM"] = "Are You Sure You Wish To Remove The Selected Item From The Auto Sell: Items List?"
 L["ADD_TO_LIST"] = "Adds Item To List"
@@ -598,7 +598,7 @@ L["PVP_FOLLOW_ERR"] = "Can Not Follow You, I Am Engaged In PvP Combat"
 L["AUTO_BUY_ITEMS"] = "Auto Buy Items"
 L["OVERFLOW"] = "Overflow"
 L["REMOVE_VENDER_LIST"] = "Remove From Vendor List"
-L["ITEM_DROP"] = "Item (DRAG ITEM TO BOX)"
+L["ITEM_DROP"] = "Item (Shift+Click Item In Bag)"
 L["PURCHASE_ITEMS"] = "Auto Purchase Items"
 L["ADD_ITEM"] = "Add Item"
 L["AMOUNT"] = "Amount"
diff --git a/Modules/Mail-Classic.lua b/Modules/Mail-Classic.lua
index 62e88b0..6aae728 100644
--- a/Modules/Mail-Classic.lua
+++ b/Modules/Mail-Classic.lua
@@ -162,6 +162,7 @@ function EMA:OnEnable()
 	EMA:RegisterEvent( "MAIL_SHOW" )
 	EMA:RegisterEvent( "MAIL_CLOSED" )
 	EMA:RegisterEvent( "MAIL_SEND_SUCCESS")
+	EMA:RawHook( "ContainerFrameItemButton_OnModifiedClick", true)
 	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
 	EMA:RegisterMessage( EMAApi.GROUP_LIST_CHANGED , "OnGroupAreasChanged" )
 end
@@ -512,6 +513,7 @@ function EMA:SettingsMailItemsAddClick( event )
 	if EMA.autoMailItemLink ~= nil and EMA.autoMailToonName ~= nil and EMA.db.MailTagName ~= nil then
 		EMA:AddItem( EMA.autoMailItemLink, EMA.autoMailToonName, EMA.db.MailTagName, EMA.db.blackListItem )
 		EMA.autoMailItemLink = nil
+		EMA.settingsControl.MailItemsEditBoxMailItem:SetText( "" )
 		EMA:SettingsRefresh()
 	end
 end
@@ -757,6 +759,28 @@ end
 -- Mail functionality.
 -------------------------------------------------------------------------------------------------------------

+function EMA:ContainerFrameItemButton_OnModifiedClick( self, event, ... )
+	local isConfigOpen = EMAPrivate.SettingsFrame.Widget:IsVisible()
+	if isConfigOpen == true and IsShiftKeyDown() == true then
+		local GUIPanel = EMAPrivate.SettingsFrame.TreeGroupStatus.selected
+		local currentModule = string.find(GUIPanel, EMA.moduleDisplayName)
+		--EMA:Print("test2", GUIPanel, "vs", currentModule )
+		if currentModule ~= nil then
+			local itemID, itemLink = GameTooltip:GetItem()
+			--EMA:Print("test1", itemID, itemLink )
+			if itemLink ~= nil then
+				EMA.settingsControl.MailItemsEditBoxMailItem:SetText( "" )
+				EMA.settingsControl.MailItemsEditBoxMailItem:SetText( itemLink )
+				EMA.autoMailItemLink = itemLink
+				return
+			end
+		end
+	end
+	return EMA.hooks["ContainerFrameItemButton_OnModifiedClick"]( self, event, ... )
+end
+
+
+
 function EMA:GetMailItemsMaxPosition()
 	if EMA.db.globalMailList == true then
 		return #EMA.db.global.autoMailItemsListGlobal
@@ -790,19 +814,19 @@ function EMA:AddItem( itemLink, GBTab, itemTag, blackList )
 		else
 			table.insert( EMA.db.autoMailItemsList, itemInformation )
 		end
-		EMA:SettingsRefresh()
+		EMA:SettingsRefresh()
 		EMA:SettingsMailItemsRowClick( 1, 1 )
 	end
 end

 function EMA:RemoveItem()
 	if EMA.db.globalMailList == true then
-		table.remove( EMA.db.global.autoMailItemsListGlobal, EMA.settingsControl.listHighlightRow )
+		table.remove( EMA.db.global.autoMailItemsListGlobal, EMA.settingsControl.MailItemsHighlightRow )
 	else
 		table.remove( EMA.db.autoMailItemsList, EMA.settingsControl.MailItemsHighlightRow )
 	end
-	EMA:SettingsRefresh()
-	EMA:SettingsMailItemsRowClick( EMA.settingsControl.MailItemsHighlightRow  - 1, 1 )
+	EMA:SettingsRefresh()
+	EMA:SettingsMailItemsRowClick( EMA.settingsControl.MailItemsHighlightRow  - 1, 1 )
 end


@@ -914,7 +938,7 @@ function EMA:MAIL_SEND_SUCCESS( event, ... )
 	--EMA:Print("try sendMail Again")
 	if EMA.db.showEMAMailWindow == true then
 		if EMA.ShiftkeyDown == false and EMA.Count < 1 then
-			EMA:ScheduleTimer( "AddAllToMailBox", 1, nil )
+			EMA:ScheduleTimer( "AddAllToMailBox", 1.55, nil )
 		end
 	end
 	if EMA.db.adjustMoneyWithMail == true and EMA.db.showEMAMailWindow == true then
@@ -927,7 +951,6 @@ function EMA:DoSendMail( gold )
 	for iterateMailSlots = 1, ATTACHMENTS_MAX_SEND do
 		if HasSendMailItem( iterateMailSlots ) == true or gold == true then
 			--EMA:Print("canSend")
-			--SendMailFrame_SendMail()
 			SendMailMailButton:Click()
 			EMA.Count = 0
 			break
@@ -970,7 +993,7 @@ function EMA:AddGoldToMailBox()
 				end
 			end
 		else
-			EMA:Print("[PH] Can Only Mail From BlizzardUI Mail Frame!")
+			EMA:Print("[PH] Can Only Send Mail From BlizzardUI Mail Frame!")
 		end
 	end
 end
\ No newline at end of file
diff --git a/Modules/Purchase-Classic.lua b/Modules/Purchase-Classic.lua
index cde9683..71dfb04 100644
--- a/Modules/Purchase-Classic.lua
+++ b/Modules/Purchase-Classic.lua
@@ -15,7 +15,8 @@ local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
 	"Purchase",
 	"Module-1.0",
 	"AceConsole-3.0",
-	"AceEvent-3.0"
+	"AceEvent-3.0",
+	"AceHook-3.0"
 )

 -- Load libraries.
@@ -470,6 +471,7 @@ end
 -- Called when the addon is enabled.
 function EMA:OnEnable()
 	EMA:RegisterEvent( "MERCHANT_SHOW" )
+	EMA:RawHook( "ContainerFrameItemButton_OnModifiedClick", true)
 	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
 	EMA:RegisterMessage( EMAApi.GROUP_LIST_CHANGED , "OnGroupAreasChanged" )
 end
@@ -479,9 +481,28 @@ function EMA:OnDisable()
 end

 -------------------------------------------------------------------------------------------------------------
--- EMAPurchase functionality.
+-- Purchase functionality.
 -------------------------------------------------------------------------------------------------------------

+function EMA:ContainerFrameItemButton_OnModifiedClick( self, event, ... )
+	local isConfigOpen = EMAPrivate.SettingsFrame.Widget:IsVisible()
+	if isConfigOpen == true and IsShiftKeyDown() == true then
+		local GUIPanel = EMAPrivate.SettingsFrame.TreeGroupStatus.selected
+		local currentModule = string.find(GUIPanel, EMA.moduleDisplayName)
+		--EMA:Print("test2", GUIPanel, "vs", currentModule )
+		if currentModule ~= nil then
+			local itemID, itemLink = GameTooltip:GetItem()
+			--EMA:Print("test1", itemID, itemLink )
+			if itemLink ~= nil then
+				EMA.settingsControl.editBoxItem:SetText( "" )
+				EMA.settingsControl.editBoxItem:SetText( itemLink )
+				EMA.autoBuyItemLink = itemLink
+				return
+			end
+		end
+	end
+	return EMA.hooks["ContainerFrameItemButton_OnModifiedClick"]( self, event, ... )
+end
 function EMA:GetItemsMaxPosition()
 	if EMA.db.globalBuyList == true then
 		return #EMA.db.global.autoBuyItemsListGlobal
@@ -520,7 +541,7 @@ end

 function EMA:RemoveItem()
 	if EMA.db.globalBuyList == true then
-		table.remove( EMA.db.global.autoBuyItemsListGlobal, EMA.settingsControl.listHighlightRow )
+		table.remove( EMA.db.global.autoBuyItemsListGlobal, EMA.settingsControl.highlightRow )
 	else
 		table.remove( EMA.db.autoBuyItems, EMA.settingsControl.highlightRow )
 	end
diff --git a/Modules/Sell-Classic.lua b/Modules/Sell-Classic.lua
index 71a1c1c..6a60581 100644
--- a/Modules/Sell-Classic.lua
+++ b/Modules/Sell-Classic.lua
@@ -792,6 +792,22 @@ function EMA:ContainerFrameItemButton_OnModifiedClick( self, event, ... )
 		local texture, count, locked, quality, readable, lootable, link = GetContainerItemInfo( bag, slot )
 		EMA:EMASendCommandToTeam( EMA.COMMAND_SELL_ITEM, link )
 	end
+	local isConfigOpen = EMAPrivate.SettingsFrame.Widget:IsVisible()
+	if isConfigOpen == true and IsShiftKeyDown() == true then
+		local GUIPanel = EMAPrivate.SettingsFrame.TreeGroupStatus.selected
+		local currentModule = string.find(GUIPanel, EMA.moduleDisplayName)
+		--EMA:Print("test2", GUIPanel, "vs", currentModule )
+		if currentModule ~= nil then
+			local itemID, itemLink = GameTooltip:GetItem()
+			--EMA:Print("test1", itemID, itemLink )
+			if itemLink ~= nil then
+				EMA.settingsControl.listEditBoxOtherItem:SetText( "" )
+				EMA.settingsControl.listEditBoxOtherItem:SetText( itemLink )
+				EMA.autoSellOtherItemLink = itemLink
+				return
+			end
+		end
+	end
 	return EMA.hooks["ContainerFrameItemButton_OnModifiedClick"]( self, event, ... )
 end

@@ -901,8 +917,6 @@ function EMA:DoMerchantSellItems()
 					local iLvl = C_Item.GetCurrentItemLevel( location )
 					local _, itemCount = GetContainerItemInfo( bagID, slotID )
 					local itemName, _, _, _, _, _, _, _, _, _, itemSellPrice = GetItemInfo( itemLink )
-				--	local hasToy = PlayerHasToy(bagItemID)
-					--EMA:Print("ItemTest", bagItemID, itemLink, itemRarity, itemType, isBop, itemRarity, iLvl, itemSellPrice)
 					local canSell = false
 					local canDestroy = false
 					if EMA.db.autoSellPoor == true then
diff --git a/Modules/Trade-Classic.lua b/Modules/Trade-Classic.lua
index 2660fef..83dc1c5 100644
--- a/Modules/Trade-Classic.lua
+++ b/Modules/Trade-Classic.lua
@@ -154,6 +154,7 @@ end
 function EMA:OnEnable()
 	EMA:RegisterEvent( "TRADE_SHOW" )
 	EMA:RegisterEvent( "TRADE_CLOSED" ) -- Unsued but we keep it for now!
+	EMA:RawHook( "ContainerFrameItemButton_OnModifiedClick", true)
 	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
 	EMA:RegisterMessage( EMAApi.GROUP_LIST_CHANGED , "OnGroupAreasChanged" )
 end
@@ -274,7 +275,6 @@ function EMA:SettingsCreateTrade( top )
 		movingTop,
 		L["ITEM_DROP"]
 	)
-	--EMA.settingsControl.tradeItemsEditBoxTradeItem:SetCallback( "OnTextChanged", EMA.SettingsEditBoxChangedTradeItem )
 	EMA.settingsControl.tradeItemsEditBoxTradeItem:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedTradeItem )
 	movingTop = movingTop - editBoxHeight
 		EMA.settingsControl.listCheckBoxBoxOtherBlackListItem = EMAHelperSettings:CreateCheckBox(
@@ -629,6 +629,26 @@ end
 -- Trade functionality.
 -------------------------------------------------------------------------------------------------------------

+function EMA:ContainerFrameItemButton_OnModifiedClick( self, event, ... )
+	local isConfigOpen = EMAPrivate.SettingsFrame.Widget:IsVisible()
+	if isConfigOpen == true and IsShiftKeyDown() == true then
+		local GUIPanel = EMAPrivate.SettingsFrame.TreeGroupStatus.selected
+		local currentModule = string.find(GUIPanel, EMA.moduleDisplayName)
+		--EMA:Print("test2", GUIPanel, "vs", currentModule )
+		if currentModule ~= nil then
+			local itemID, itemLink = GameTooltip:GetItem()
+			--EMA:Print("test1", itemID, itemLink )
+			if itemLink ~= nil then
+				EMA.settingsControl.tradeItemsEditBoxTradeItem:SetText( "" )
+				EMA.settingsControl.tradeItemsEditBoxTradeItem:SetText( itemLink )
+				EMA.autoTradeItemLink = itemLink
+				return
+			end
+		end
+	end
+	return EMA.hooks["ContainerFrameItemButton_OnModifiedClick"]( self, event, ... )
+end
+
 -- New Trade stuff
 function EMA:GetTradeItemsMaxPosition()
 	if EMA.db.globalTradeList == true then
@@ -669,7 +689,7 @@ end

 function EMA:RemoveItem()
 	if EMA.db.globalTradeList == true then
-		table.remove( EMA.db.global.autoTradeItemsListGlobal, EMA.settingsControl.listHighlightRow )
+		table.remove( EMA.db.global.autoTradeItemsListGlobal,  EMA.settingsControl.tradeItemsHighlightRow )
 	else
 		table.remove( EMA.db.autoTradeItemsList, EMA.settingsControl.tradeItemsHighlightRow )
 	end
@@ -680,11 +700,15 @@ end
 function EMA:TRADE_SHOW( event, ... )
 	--Keep for tradeing gold!
 	if EMA.db.adjustMoneyWithMasterOnTrade == true then
-		EMA:ScheduleTimer( "TradeShowAdjustMoneyWithMaster", 0.3 )
+		if not IsShiftKeyDown() then
+			EMA:ScheduleTimer( "TradeShowAdjustMoneyWithMaster", 0.3 )
+		end
 	end
 	-- do trade list with Gold!
 	if EMA.db.showEMATradeWindow == true then
-		EMA:ScheduleTimer("TradeAllItems", 0.5 )
+		if not IsShiftKeyDown() then
+			EMA:ScheduleTimer("TradeAllItems", 0.5 )
+		end
 	end
 end