diff --git a/.pkgmeta b/.pkgmeta new file mode 100644 index 0000000..d0a1d4f --- /dev/null +++ b/.pkgmeta @@ -0,0 +1,5 @@ +package-as: EMA + +manual-changelog: CHANGELOG.txt + +enable-nolib-creation: no \ No newline at end of file diff --git a/Bindings.xml b/Bindings.xml index 8f2fb71..26ef301 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 Jennifer Cally + License: MIT License 2018-2019 Jennifer Cally Some Code Used from 'Jamba' that is Released under the MIT License diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 53f78d0..f047b27 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,17 +2,102 @@ ChangeLogs: --------------------------- +EMA Version: v8.1.5-Release-v2.0(0122) +Game Version: 8.1.5 +Release Date: 21/4/2019 + + +## Item-Use + - Will now Disaply Item count to 9999 before it * out + + +--------------------------- + +EMA Version: v8.1.5-Release-v2.0(0121) +Game Version: 8.1.5 +Release Date: 16/4/2019 + +## information (curr) + - Fixed a bug with it still reporting to use old Command lines "help" + +--------------------------- + +EMA Version: v8.1.5-Release-v2.0(0120) +Game Version: 8.1.5 +Release Date: 13/4/2019 + +EMA V2 + +## Core + - Fixed ToC files to support 8.1.5 + -- Dev Note: This Was Hotfixed Into The Game As There Was No Toc Change At The Start Of The Patch Grrrr! + - Fixed Some Text Placements + - Command Line v2 + --* /EMA Config To Now Open The Config! + --* Now Shows A "Help" If The Command Is Wrong Or You Added A Unknown Command In. + --** Can Not Open Config In combat (As it can not draw the GUI when in combat) + - New Year, A New Year to add to copyright! + +## Team + -- Remove All Team Command Should Now Work Again. + +## Vender + - Should Now Work With The TradeSkill Master 4 UI Issue#26 + - Now Sells One Item At A Item Then Trying To Loop The Bag! + -- Fixed Items gettting stuck/selling very very slow when in a stack. + - Fixed The Sell Items, And Gold Prices In Chat + - Added A Global Sell List, This Works Across "All" Characters + -- Dev Note: Use "/EMA-purchase Sell" To Copy From The Local List To The Global List + - Added Support To Sell or Destroy Already Known Toys and Mounts + +## Purchase + - Updated GUI + - Added A Global Sell List, This Works Across "All" Characters + -- Dev Note: Use "/EMA-purchase copy" To Copy From The Local List To The Global List + + +## Trade + - Added A Global Sell List, This Works Across "All" Characters + -- Dev Note: Use "/EMA-trade copy" To Copy From The Local List To The Global List + - fixed issue #61 + +## Mail + - Added A Global Sell List, This Works Across "All" Characters + -- Dev Note: Use "/EMA-Mail copy" To Copy From The Local List To The Global List + - Should Send Gold After its send all items issue #52 + - Fixed issue #59 + + +## GuildBank + - Added A Global Sell List, This Works Across "All" Characters + -- Dev Note: Use "/EMA-Sell copy" To Copy From The Local List To The Global List + - Fixed Bug #65 + +## Item-Use + - Should Remove Quest Items On Its Own From The Item Bar Again + +## Currency + - Added 8.1 Currency's + -- 7th Legion Service + -- Honorbound Service + -- Titan Residuum + +## Interaction + -- Added Tells The Team If They Looted A BoE Mount! + +--------------------------- + EMA Version: v8.1.0-Release(0108) Game Version: 8.1.0 Release Date: 12/12/2018 -# Toon +## Toon -- Fixed some API changes in WarMode that was changed in patch 8.1 --------------------------- -EMA Version: v8.0.1-Release(0107) +EMA Version: v8.0.1-Release-v1.0(0107) Game Version: 8.0.1 Release Date: 02/12/2018 @@ -26,7 +111,7 @@ Release Date: 02/12/2018 --------------------------- -EMA Version: v8.0.1-Release(0106) +EMA Version: v8.0.1-Release-v1.0(0106) Game Version: 8.0.1 Release Date: 17/11/2018 @@ -45,7 +130,7 @@ Release Date: 17/11/2018 --------------------------- -EMA Version: v8.0.1-Release(0103) +EMA Version: v8.0.1-Release-v1.0(0103) Game Version: 8.0.1 Release Date: 23/10/2018 @@ -59,7 +144,7 @@ Release Date: 23/10/2018 --------------------------- -EMA Version: v8.0.1-Release(0102) +EMA Version: v8.0.1-Release-v1.0(0102) Game Version: 8.0.1 Release Date: 30/09/2018 @@ -79,7 +164,7 @@ Release Date: 30/09/2018 --------------------------- -EMA Version: v8.0.1-Release(0099) +EMA Version: v8.0.1-Release-v1.0(0099) Game Version: 8.0.1 Release Date: 10/09/2018 @@ -91,7 +176,7 @@ Release Date: 10/09/2018 --------------------------- -EMA Version: v8.0.1-Release(0098) +EMA Version: v8.0.1-Release-v1.0(0098) Game Version: 8.0.1 Release Date: 10/09/2018 @@ -106,7 +191,7 @@ Release Date: 10/09/2018 --------------------------- -EMA Version: v8.0.1-Release(0097) +EMA Version: v8.0.1-Release-v1.0(0097) Game Version: 8.0.1 Release Date: 09/09/2018 @@ -125,7 +210,7 @@ Release Date: 09/09/2018 --------------------------- -EMA Version: v8.0.1-Release(0096) +EMA Version: v8.0.1-Release-v1.0(0096) Game Version: 8.0.1 Release Date: 08/09/2018 @@ -161,7 +246,7 @@ Release Date: 08/09/2018 --------------------------- -EMA Version: v8.0.1-Release(0095) +EMA Version: v8.0.1-Release-v1.0(0095) Game Version: 8.0.1 Release Date: 26/8/2018 @@ -172,7 +257,7 @@ Release Date: 26/8/2018 --------------------------- -EMA Version: v8.0.1-Release(0094) +EMA Version: v8.0.1-Release-v1.0(0094) Game Version: 8.0.1 Release Date: 26/8/2018 @@ -198,7 +283,7 @@ Release Date: 26/8/2018 --------------------------- -EMA Version: v8.0.1-Release(0092) +EMA Version: v8.0.1-Release-v1.0(0092) Game Version: 8.0.1 Release Date: 24/8/2018 @@ -269,7 +354,7 @@ Release Date: 24/8/2018 --------------------------- -EMA Version: v8.0.1-Release(0088) +EMA Version: v8.0.1-Release-v1.0(0088) Game Version: 8.0.1 Release Date: 18/8/2018 @@ -299,7 +384,7 @@ Release Date: 17/8/2018 --------------------------- -EMA Version: v8.0.1-Release(0084/0085) +EMA Version: v8.0.1-Release-v1.0(0084/0085) Game Version: 8.0.1 Release Date: 15/8/2018 @@ -311,7 +396,7 @@ Release Date: 15/8/2018 --------------------------- -EMA Version: v8.0.1-Release(0087) +EMA Version: v8.0.1-Release-v1.0(0087) Game Version: 8.0.1 Release Date: 15/8/2018 @@ -325,7 +410,7 @@ Release Date: 15/8/2018 --------------------------- -EMA Version: v8.0.1-Release(0081) +EMA Version: v8.0.1-Release-v1.0(0081) Game Version: 8.0.1 Release Date: 10/8/2018 @@ -337,7 +422,7 @@ Release Date: 10/8/2018 --------------------------- -EMA Version: v8.0.1-Release(0078) +EMA Version: v8.0.1-Release-v1.0(0078) Game Version: 8.0.1 Release Date: 10/8/2018 @@ -348,7 +433,7 @@ Release Date: 10/8/2018 --------------------------- -EMA Version: v8.0.1-Release(0078) +EMA Version: v8.0.1-Release-v1.0(0078) Game Version: 8.0.1 Release Date: 10/8/2018 @@ -363,7 +448,7 @@ Release Date: 10/8/2018 --------------------------- -EMA Version: v8.0.1-Release(0077) +EMA Version: v8.0.1-Release-v1.0(0077) Game Version: 8.0.1 Release Date: 09/8/2018 @@ -379,7 +464,7 @@ Release Date: 09/8/2018 --------------------------- -EMA Version: v8.0.1-Release(0076) +EMA Version: v8.0.1-Release-v1.0(0076) Game Version: 8.0.1 Release Date: 3/8/2018 @@ -390,7 +475,7 @@ Release Date: 3/8/2018 --------------------------- -EMA Version: v8.0.1-Release(0075) +EMA Version: v8.0.1-Release-v1.0(0075) Game Version: 8.0.1 Release Date: 30/7/2018 @@ -412,7 +497,7 @@ Release Date: 30/7/2018 --------------------------- -EMA Version: v8.0.1-Release(0074) +EMA Version: v8.0.1-Release-v1.0(0074) Game Version: 8.0.1 Release Date: 20/7/2018 @@ -423,7 +508,7 @@ Release Date: 20/7/2018 --------------------------- -EMA Version: v8.0.1-Release(0073) +EMA Version: v8.0.1-Release-v1.0(0073) Game Version: 8.0.1 Release Date: 20/7/2018 @@ -436,7 +521,7 @@ Release Date: 20/7/2018 --------------------------- -EMA Version: v8.0.1-Release(0072) +EMA Version: v8.0.1-Release-v1.0(0072) Game Version: 8.0.1 Release Date: 19/7/2018 --------------------------- @@ -447,7 +532,7 @@ Release Date: 19/7/2018 --------------------------- -EMA Version: v8.0.1-Release(0071) +EMA Version: v8.0.1-Release-v1.0(0071) Game Version: 8.0.1 Release Date: 18/7/2018 @@ -461,7 +546,7 @@ Release Date: 18/7/2018 --------------------------- -EMA Version: v8.0.1-Release(0069) +EMA Version: v8.0.1-Release-v1.0(0069) Game Version: 8.0.1 Release Date: 18/7/2018 --------------------------- @@ -472,7 +557,7 @@ Release Date: 18/7/2018 --------------------------- -EMA Version: v8.0.1-Beta(0068) +EMA Version: v8.0.1-Beta-v1.0(0068) Game Version: 8.0.1 Release Date: 17/7/2018 --------------------------- diff --git a/Core/Communications.lua b/Core/Communications.lua index 876d117..f201f0e 100644 --- a/Core/Communications.lua +++ b/Core/Communications.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -99,6 +99,13 @@ local function GetConfiguration() get = "ConfigurationGetSetting", set = "ConfigurationSetSetting", args = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-comm config", + get = false, + set = "", + guiHidden = true, push = { type = "input", name = L["PUSH_SETTINGS"], diff --git a/Core/Core.lua b/Core/Core.lua index 6638622..ea94ddc 100644 --- a/Core/Core.lua +++ b/Core/Core.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -68,9 +68,14 @@ function EMA:OnEnable() if Jamba == true then StaticPopup_Show( "CAN_NOT_RUN_JAMBA_AND_EMA" ) end - if EMA.db.showStartupMessage8000 then + --[[ + if EMA.db.global.showStartupMessage8000 then StaticPopup_Show( "ALL_SETTINGS HAVE BEEN RESET" ) end + ]] + if EMA.db.global.showStartupMessage2000 then + StaticPopup_Show( "UpgradeTo_v2" ) + end end function EMA:OnDisable() @@ -81,7 +86,7 @@ local function InitializePopupDialogs() text = L["ALL_SETTINGS_RESET"], button1 = OKAY, OnAccept = function() - EMA.db.showStartupMessage8000 = false + EMA.db.global.showStartupMessage8000 = false end, showAlert = 1, timeout = 0, @@ -102,6 +107,18 @@ local function InitializePopupDialogs() hideOnEscape = 0, whileDead = 1, } + StaticPopupDialogs["UpgradeTo_v2"] = { + text = L["v2_NEWS"], + button1 = OKAY, + OnAccept = function() + EMA.db.global.showStartupMessage2000 = false + end, + showAlert = 1, + timeout = 0, + exclusive = 1, + hideOnEscape = 0, + whileDead = 1, + } end local function EMASettingsTreeSort( a, b ) @@ -212,9 +229,14 @@ EMAPrivate.SettingsFrame.Widget:Hide() -- Settings - the values to store and their defaults for the settings database. EMA.settings = { + global = { + ['**'] = { + showStartupMessage8000 = false, + showStartupMessage2000 = true, + }, + }, profile = { - showStartupMessage8000 = false, - }, + }, } -- Configuration. @@ -227,11 +249,21 @@ local function GetConfiguration() get = "ConfigurationGetSetting", set = "ConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema config", + get = false, + set = "", + order = 5, + guiHidden = true, + }, push = { type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_SETTINGS_INFO"], - usage = "/EMA push", + usage = "/ema push", get = false, set = "SendSettingsAllModules", order = 4, @@ -241,7 +273,7 @@ local function GetConfiguration() type = "input", name = L["RESET_SETTINGS_FRAME"], desc = L["RESET_SETTINGS_FRAME"], - usage = "/EMA resetsettingsframe", + usage = "/ema resetsettingsframe", get = false, set = "ResetSettingsFrame", order = 5, @@ -305,6 +337,20 @@ local function RegisterModule( moduleAddress, moduleName ) EMA.registeredModulesByAddress[moduleAddress] = moduleName end +local function UnRegisterModule( moduleAddress, moduleName ) + print("unRegister", moduleAddress, moduleName ) + if EMA.registeredModulesByName == nil then + EMA.registeredModulesByName = {} + end + if EMA.registeredModulesByAddress == nil then + EMA.registeredModulesByAddress = {} + end + + EMA.registeredModulesByName[moduleName] = nil + EMA.registeredModulesByAddress[moduleAddress] = nil +end + + ------------------------------------------------------------------------------------------------------------- -- Settings sending and receiving. ------------------------------------------------------------------------------------------------------------- @@ -507,13 +553,14 @@ function EMA:OnInitialize() EMA.registeredModulesByName = {} EMA.registeredModulesByAddress = {} -- Create the settings database supplying the settings values along with defaults. - EMA.completeDatabase = LibStub( "AceDB-3.0" ):New( EMA.settingsDatabaseName, EMA.settings ) + EMA.completeDatabase = LibStub( "AceDB-3.0" ):New( EMA.settingsDatabaseName, EMA.settings ) EMA.completeDatabase.RegisterCallback( EMA, "OnProfileChanged", "OnProfileChanged" ) EMA.completeDatabase.RegisterCallback( EMA, "OnProfileCopied", "OnProfileCopied" ) EMA.completeDatabase.RegisterCallback( EMA, "OnProfileReset", "OnProfileReset" ) EMA.completeDatabase.RegisterCallback( EMA, "OnProfileDeleted", "OnProfileDeleted" ) - + EMA.db = EMA.completeDatabase.profile + EMA.db.global = EMA.completeDatabase.global -- Create the settings. LibStub( "AceConfig-3.0" ):RegisterOptionsTable( EMA.moduleName, @@ -775,6 +822,7 @@ function EMA:CoreSettingsCreateInfo( top ) movingTop, L["COPYRIGHTTWO"] ) + movingTop = movingTop - labelContinueHeight return movingTop end @@ -828,15 +876,52 @@ function EMA:LoadEMASettings() end ]] +-- Does the Chat Command Exist +local function DoesTheChatCommandExist( configuration, command ) + local exist = false + for key, info in pairs( configuration ) do + if info.type == "input" then + if key == command then + exist = true + break + end + end + end + return exist +end + -- Handle the chat command. -function EMA:EMAChatCommand( input ) - if not input or input:trim() == "" then +function EMA:EMAChatCommand( inputBefore ) + input = string.lower( inputBefore ) + --EMA:Print("test", input ) + local inputString, tag = strsplit( " ", inputBefore ) + local CommandExist = DoesTheChatCommandExist( GetConfiguration().args, inputString ) + if input == "config" then + if InCombatLockdown() then + print( L["CANNOT_OPEN_IN_COMBAT"] ) + return + end + -- Show Config EMAPrivate.SettingsFrame.Widget:Show() EMAPrivate.SettingsFrame.WidgetTree:SelectByValue( L["NEWS"] ) EMAPrivate.SettingsFrame.Tree.ButtonClick( nil, nil, EMA.moduleDisplayName, false) - else - LibStub( "AceConfigCmd-3.0" ):HandleCommand( EMA.chatCommand, EMA.moduleName, input ) - end + elseif CommandExist then + --Command Found now Handle IT! + --print("Command Found", input ) + LibStub( "AceConfigCmd-3.0" ):HandleCommand( EMA.chatCommand, EMA.moduleName, input ) + else + -- hell knows what to do so HELP!!! + --print("No found Command Found HELP", input ) + for key, info in pairs( GetConfiguration().args ) do + if info.type == "input" then + print("|cFFFFFF00"..info.usage, "|cFFFFFFFF".." [ "..info.desc.." ]" ) + end + end + print( L["MODULE_LIST"] ) + for moduleName, moduleAddress in pairs( EMA.registeredModulesByName ) do + print("|cFFFFFF00/"..EMA.chatCommand.."-"..moduleName ) + end + end end function EMA:ResetSettingsFrame() @@ -847,8 +932,16 @@ function EMA:ResetSettingsFrame() EMAPrivate.SettingsFrame.Widget:Show() end +function EMA:SettingsTestBox( event, checked) + print("test", checked , EMA.db.testBox) + EMA.db.testBox = checked + EMA:SettingsRefresh() + +end + -- Functions available from EMA Core for other EMA internal objects. EMAPrivate.Core.RegisterModule = RegisterModule +EMAPrivate.Core.UnRegisterModule = UnRegisterModule EMAPrivate.Core.SendSettings = SendSettings EMAPrivate.Core.OnSettingsReceived = OnSettingsReceived EMAPrivate.Core.SendCommandToTeam = SendCommandToTeam diff --git a/Core/Message.lua b/Core/Message.lua index 0866e5e..a56ba3f 100644 --- a/Core/Message.lua +++ b/Core/Message.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -203,11 +203,19 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-message config", + get = false, + set = "", + }, push = { type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_SETTINGS_INFO"], - usage = "/EMA-message push", + usage = "/ema-message push", get = false, set = "EMASendSettings", }, diff --git a/Core/Module.lua b/Core/Module.lua index 9eeb095..54dfb70 100644 --- a/Core/Module.lua +++ b/Core/Module.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -10,7 +10,7 @@ -- -- -- ================================================================================ -- -local MAJOR, MINOR = "Module-1.0", 1 +local MAJOR, MINOR = "Module-1.0", 2 local EMAModule, oldMinor = LibStub:NewLibrary( MAJOR, MINOR ) if not EMAModule then @@ -19,6 +19,7 @@ end -- Load libraries. LibStub( "AceConsole-3.0" ):Embed( EMAModule ) +local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" ) ------------------------------------------------------------------------------------------------------------- -- EMA Module Mixin Management. @@ -34,7 +35,7 @@ local mixinMethods = { "EMASendCommandToTeam", "EMASendCommandToMaster", "EMASendMessageToTeam", "EMASendCommandToToon", "EMASendSettings", "EMAOnSettingsReceived", - "EMAChatCommand", + "EMAChatCommand", "EMAConfigurationGetSetting", "EMAConfigurationSetSetting", } @@ -88,19 +89,51 @@ end ------------------------------------------------------------------------------------------------------------- -- EMA Chat Commands. ------------------------------------------------------------------------------------------------------------- - --- Handle the chat command. -function EMAModule:EMAChatCommand( input ) - --print("test", input, self.chatCommand, self.moduleName ) - if not input or input:trim() == "" then +-- Does the Chat Command Exist +local function DoesTheChatCommandExist( configuration, command ) + local exist = false + for key, info in pairs( configuration ) do + stringName = string.lower( key ) + --print("aa", stringName, "vs", command ) + if info.type == "input" then + if stringName == command then + exist = true + break + end + end + end + return exist +end + +-- Handle the chat command v2 EMA. +function EMAModule:EMAChatCommand( inputBefore ) + input = string.lower( inputBefore ) + --print("test2", "input", input, "command", self.chatCommand, "module", self.moduleName ) + local inputString, tag = strsplit( " ", inputBefore ) + local CommandExist = DoesTheChatCommandExist( self:GetConfiguration().args, inputString ) + if input == "config" then + if InCombatLockdown() then + print( L["CANNOT_OPEN_IN_COMBAT"] ) + return + end + -- Show Config EMAPrivate.SettingsFrame.Widget:Show() EMAPrivate.SettingsFrame.TreeGroupStatus.groups[self.parentDisplayName] = true EMAPrivate.SettingsFrame.WidgetTree:SelectByPath( self.parentDisplayName, self.moduleDisplayName ) EMAPrivate.SettingsFrame.Tree.ButtonClick( nil, nil, self.moduleDisplayName, false) - else - LibStub( "AceConfigCmd-3.0" ):HandleCommand( self.chatCommand, self.moduleName, input ) - --LibStub( "AceConfigCmd-3.0" ):HandleCommand( self.chatCommandTwo, self.moduleName, input ) - end + elseif CommandExist then + --Command Found now Handle IT! + --print("Command Found", input ) + LibStub( "AceConfigCmd-3.0" ):HandleCommand( self.chatCommand, self.moduleName, input ) + else + -- hell knows what to do so HELP!!! + --print("No found Command Found HELP", input ) + for key, info in pairs( self:GetConfiguration().args ) do + if info.type == "input" then + print("|cFFFFFF00"..info.usage, "|cFFFFFFFF".." [ "..info.desc.." ]" ) + end + end + end end ------------------------------------------------------------------------------------------------------------- @@ -110,8 +143,9 @@ end -- Initialise the module. function EMAModule:EMAModuleInitialize( settingsFrame ) -- Create the settings database supplying the settings values along with defaults. - self.completeDatabase = LibStub( "AceDB-3.0" ):New( self.settingsDatabaseName, self.settings ) + self.completeDatabase = LibStub( "AceDB-3.0" ):New( self.settingsDatabaseName, self.settings ) self.db = self.completeDatabase.profile + self.db.global = self.completeDatabase.global -- Create the settings. LibStub( "AceConfig-3.0" ):RegisterOptionsTable( self.moduleName, self:GetConfiguration() ) self.settingsFrame = settingsFrame @@ -120,14 +154,6 @@ function EMAModule:EMAModuleInitialize( settingsFrame ) if self.chatCommand then self:RegisterChatCommand( self.chatCommand, "EMAChatCommand" ) end - --[[ - if self.chatCommandTwo then - self:RegisterChatCommand( self.chatCommandTwo, "EMAChatCommand" ) - end - if self.chatCommandThree then - --self:RegisterChatCommand( self.chatCommandThree, "EMAChatCommandThree" ) - end - ]] -- Remember the characters name. -- If server has a space in realm name GetRealmName() will show space this will not work with blizzard API so we need to hack this to work --ebony --local _, k = UnitFullName("player") diff --git a/Core/Tag.lua b/Core/Tag.lua index ed8745d..37f06be 100644 --- a/Core/Tag.lua +++ b/Core/Tag.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -53,11 +53,19 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-group confg", + get = false, + set = "", + }, add = { type = "input", name = L["ADD"], desc = L["ADD_TAG_HELP"], - usage = "/EMA-group add <NewGroupName>", + usage = "/ema-group add <NewGroupName>", get = false, set = "AddTagCommand", }, @@ -65,7 +73,7 @@ function EMA:GetConfiguration() type = "input", name = L["REMOVE"], desc = L["REMMOVE_TAG_HELP"], - usage = "/EMA-group remove <NewGroupName>", + usage = "/ema-group remove <NewGroupName>", get = false, set = "RemoveTagCommand", }, @@ -73,7 +81,7 @@ function EMA:GetConfiguration() type = "input", name = L["ADD_TO_GROUP"], desc = L["ADD_TO_GROUP_HELP"], - usage = "/EMA-group addtogroup <characterName> <GroupName>", + usage = "/ema-group addtogroup <characterName> <GroupName>", get = false, set = "AddToGroupCommand", }, @@ -81,7 +89,7 @@ function EMA:GetConfiguration() type = "input", name = L["REMOVE_FROM_GROUP"], desc = L["REMOVE_FROM_GROUP_HELP"], - usage = "/EMA-group removefromgroup <characterName> <NewGroupName>", + usage = "/ema-group removefromgroup <characterName> <NewGroupName>", get = false, set = "RemovefromGroupCommand", }, @@ -89,7 +97,7 @@ function EMA:GetConfiguration() type = "input", name = L["PUSH_ALL_SETTINGS"], desc = L["PUSH_SETTINGS_INFO"], - usage = "/EMA-tag push", + usage = "/ema-group push", get = false, set = "EMASendSettings", }, diff --git a/Core/Team.lua b/Core/Team.lua index 2d6d127..82c41f3 100644 --- a/Core/Team.lua +++ b/Core/Team.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -69,11 +69,19 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-team config", + get = false, + set = "", + }, add = { type = "input", name = L["ADD"], desc = L["ADD_HELP"], - usage = "/EMA-team add <name>", + usage = "/ema-team add <name>", get = false, set = "AddMemberCommand", }, @@ -81,7 +89,7 @@ function EMA:GetConfiguration() type = "input", name = L["REMOVE"], desc = L["REMOVE_REMOVE"], - usage = "/EMA-team remove <name>", + usage = "/ema-team remove <name>", get = false, set = "RemoveMemberCommand", }, @@ -89,7 +97,7 @@ function EMA:GetConfiguration() type = "input", name = L["MASTER"], desc = L["MASTER_HELP"], - usage = "/EMA-team master <name> <tag>", + usage = "/ema-team master <name> <tag>", get = false, set = "CommandSetMaster", }, @@ -97,7 +105,7 @@ function EMA:GetConfiguration() type = "input", name = L["I_AM_MASTER"], desc = L["I_AM_MASTER_HELP"], - usage = "/EMA-team iammaster <tag>", + usage = "/ema-team iammaster <tag>", get = false, set = "CommandIAmMaster", }, @@ -105,7 +113,7 @@ function EMA:GetConfiguration() type = "input", name = L["INVITE"], desc = L["INVITE_HELP"], - usage = "/EMA-team invite", + usage = "/ema-team invite", get = false, set = "InviteTeamToParty", }, @@ -113,7 +121,7 @@ function EMA:GetConfiguration() type = "input", name = L["DISBAND"], desc = L["DISBAND_HELP"], - usage = "/EMA-team disband", + usage = "/ema-team disband", get = false, set = "DisbandTeamFromParty", }, @@ -121,7 +129,7 @@ function EMA:GetConfiguration() type = "input", name = L["ADD_GROUPS_MEMBERS"], desc = L["ADD_GROUPS_MEMBERS_HELP"], - usage = "/EMA-team addparty", + usage = "/ema-team addparty", get = false, set = "AddPartyMembers", }, @@ -129,7 +137,7 @@ function EMA:GetConfiguration() type = "input", name = L["REMOVE_ALL_MEMBERS"], desc = L["REMOVE_ALL_MEMBERS_HELP"], - usage = "/EMA-team removeall", + usage = "/ema-team removeall", get = false, set = "DoRemoveAllMembersFromTeam", }, @@ -137,7 +145,7 @@ function EMA:GetConfiguration() type = "input", name = L["SET_TEAM_OFFLINE"], desc = L["SET_TEAM_OFFLINE_HELP"] , - usage = "/EMA-team setalloffline", + usage = "/ema-team setalloffline", get = false, set = "SetAllMembersOffline", }, @@ -145,7 +153,7 @@ function EMA:GetConfiguration() type = "input", name = L["SET_TEAM_ONLINE"], desc = L["SET_TEAM_ONLINE_HELP"], - usage = "/EMA-team setallonline", + usage = "/ema-team setallonline", get = false, set = "SetAllMembersOnline", }, @@ -153,7 +161,7 @@ function EMA:GetConfiguration() type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_SETTINGS_INFO"], - usage = "/EMA-team push", + usage = "/ema-team push", get = false, set = "EMASendSettings", }, @@ -989,7 +997,7 @@ function EMA:RemoveMemberCommand( info, parameters ) end local function RemoveAllMembersFromTeam() - for characterName, characterPosition in pairs( EMA.db.teamList ) do + for characterName, position in EMAApi.TeamList() do RemoveMember( characterName ) end end diff --git a/EMA.toc b/EMA.toc index cc3ec05..754a91f 100644 --- a/EMA.toc +++ b/EMA.toc @@ -1,8 +1,8 @@ -## Interface: 80000 +## Interface: 80100 ## Title: EMA ## Notes: Ebony's MultiBoxing Assistant -## Author: Jennifer Cally 'Ebony' -## Version: v8.1.0-Release(0108) +## Author: Jennifer Calladine 'Ebony' +## Version: v8.1.5-Release-v2.0(0121) ## 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/EbonyUtilities.lua b/EbonyUtilities.lua index 52bfa94..73b5c10 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 Jennifer Cally -- +-- License: MIT License 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -199,6 +199,19 @@ function EbonyUtilities:FixValueToRange( value, minValue, maxValue ) return value end +function EbonyUtilities:MerchantFrameIsShown() + local Show = false + if MerchantFrame:IsVisible() == true then + Show = true + else + if IsAddOnLoaded("TradeSkillMaster" ) == true then + if TSM_API.IsUIVisible("VENDORING") == true then + Show = true + end + end + end + return Show +end function EbonyUtilities:CheckIsFromMyRealm( name ) --print("test", name) diff --git a/Embeds.xml b/Embeds.xml index bc86ab5..17a3bf6 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 Jennifer Cally + License: MIT License 2018-2019 Jennifer Cally Some Code Used from 'Jamba' that is Released under the MIT License diff --git a/GUI/AceGUIContainer-EMATreeGroup.lua b/GUI/AceGUIContainer-EMATreeGroup.lua index 889a0e4..3923807 100644 --- a/GUI/AceGUIContainer-EMATreeGroup.lua +++ b/GUI/AceGUIContainer-EMATreeGroup.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -14,7 +14,7 @@ --[[ File modified from AceGUI TreeGroup container. Used under Ace3 modified BSD licence. -Version 2 Support for the new Jamba EE 8.0 Build +Version 2 For EMA ]]-- diff --git a/GUI/AceGUIContainer-EMAWindow.lua b/GUI/AceGUIContainer-EMAWindow.lua index 1c94f56..635e7b4 100644 --- a/GUI/AceGUIContainer-EMAWindow.lua +++ b/GUI/AceGUIContainer-EMAWindow.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- diff --git a/GUI/AceGUIWidget-EMAContinueLabel.lua b/GUI/AceGUIWidget-EMAContinueLabel.lua index 0b1f473..1c38461 100644 --- a/GUI/AceGUIWidget-EMAContinueLabel.lua +++ b/GUI/AceGUIWidget-EMAContinueLabel.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- diff --git a/GUI/AceGUIWidget-EMANormalLabel.lua b/GUI/AceGUIWidget-EMANormalLabel.lua index 0429e65..e18be20 100644 --- a/GUI/AceGUIWidget-EMANormalLabel.lua +++ b/GUI/AceGUIWidget-EMANormalLabel.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- diff --git a/GUI/EMAHelperSettings.lua b/GUI/EMAHelperSettings.lua index 0524b2f..4c56e02 100644 --- a/GUI/EMAHelperSettings.lua +++ b/GUI/EMAHelperSettings.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- diff --git a/LICENSE b/LICENSE index 5d38233..79846aa 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ All Rights Reserved -Copyright (c) 2015-2018 Jennifer Cally +Copyright (c) 2018-2019 Jennifer Cally All Rights Reserved unless otherwise explicitly stated. @@ -14,4 +14,30 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file +THE SOFTWARE. + +--------------- +Most Core Code: Uses "Jamba" and When "Jamba" Name is Used in EMA uses the following License: +--------------- + +The MIT License (MIT) + +Copyright (c) 2008-2016 Michael "Jafula" Miller + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Libs/AceAddon-3.0/AceAddon-3.0.lua b/Libs/AceAddon-3.0/AceAddon-3.0.lua index a7f7279..e9d4154 100644 --- a/Libs/AceAddon-3.0/AceAddon-3.0.lua +++ b/Libs/AceAddon-3.0/AceAddon-3.0.lua @@ -28,7 +28,7 @@ -- end -- @class file -- @name AceAddon-3.0.lua --- @release $Id: AceAddon-3.0.lua 1084 2013-04-27 20:14:11Z nevcairiel $ +-- @release $Id: AceAddon-3.0.lua 1184 2018-07-21 14:13:14Z nevcairiel $ local MAJOR, MINOR = "AceAddon-3.0", 12 local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR) @@ -62,43 +62,12 @@ local function errorhandler(err) return geterrorhandler()(err) end -local function CreateDispatcher(argCount) - local code = [[ - local xpcall, eh = ... - local method, ARGS - local function call() return method(ARGS) end - - local function dispatch(func, ...) - method = func - if not method then return end - ARGS = ... - return xpcall(call, eh) - end - - return dispatch - ]] - - local ARGS = {} - for i = 1, argCount do ARGS[i] = "arg"..i end - code = code:gsub("ARGS", tconcat(ARGS, ", ")) - return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler) -end - -local Dispatchers = setmetatable({}, {__index=function(self, argCount) - local dispatcher = CreateDispatcher(argCount) - rawset(self, argCount, dispatcher) - return dispatcher -end}) -Dispatchers[0] = function(func) - return xpcall(func, errorhandler) -end - local function safecall(func, ...) -- we check to see if the func is passed is actually a function here and don't error when it isn't -- this safecall is used for optional functions like OnInitialize OnEnable etc. When they are not -- present execution should continue without hinderance if type(func) == "function" then - return Dispatchers[select('#', ...)](func, ...) + return xpcall(func, errorhandler, ...) end end diff --git a/Libs/AceBucket-3.0/AceBucket-3.0.lua b/Libs/AceBucket-3.0/AceBucket-3.0.lua index d5e1065..5d42530 100644 --- a/Libs/AceBucket-3.0/AceBucket-3.0.lua +++ b/Libs/AceBucket-3.0/AceBucket-3.0.lua @@ -34,9 +34,9 @@ -- end -- @class file -- @name AceBucket-3.0.lua --- @release $Id: AceBucket-3.0.lua 895 2009-12-06 16:28:55Z nevcairiel $ +-- @release $Id: AceBucket-3.0.lua 1185 2018-07-21 14:15:16Z nevcairiel $ -local MAJOR, MINOR = "AceBucket-3.0", 3 +local MAJOR, MINOR = "AceBucket-3.0", 4 local AceBucket, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not AceBucket then return end -- No Upgrade needed @@ -68,39 +68,10 @@ local function errorhandler(err) return geterrorhandler()(err) end -local function CreateDispatcher(argCount) - local code = [[ - local xpcall, eh = ... - local method, ARGS - local function call() return method(ARGS) end - - local function dispatch(func, ...) - method = func - if not method then return end - ARGS = ... - return xpcall(call, eh) - end - - return dispatch - ]] - - local ARGS = {} - for i = 1, argCount do ARGS[i] = "arg"..i end - code = code:gsub("ARGS", tconcat(ARGS, ", ")) - return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler) -end - -local Dispatchers = setmetatable({}, {__index=function(self, argCount) - local dispatcher = CreateDispatcher(argCount) - rawset(self, argCount, dispatcher) - return dispatcher -end}) -Dispatchers[0] = function(func) - return xpcall(func, errorhandler) -end - local function safecall(func, ...) - return Dispatchers[select('#', ...)](func, ...) + if func then + return xpcall(func, errorhandler, ...) + end end -- FireBucket ( bucket ) @@ -110,7 +81,7 @@ local function FireBucket(bucket) local received = bucket.received -- we dont want to fire empty buckets - if next(received) then + if next(received) ~= nil then local callback = bucket.callback if type(callback) == "string" then safecall(bucket.object[callback], bucket.object, received) diff --git a/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua b/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua index 66416e8..d5cbc45 100644 --- a/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua +++ b/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua @@ -1,13 +1,13 @@ --- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables. -- @class file -- @name AceConfigDialog-3.0 --- @release $Id: AceConfigDialog-3.0.lua 1169 2018-02-27 16:18:28Z nevcairiel $ +-- @release $Id: AceConfigDialog-3.0.lua 1197 2019-01-21 23:41:10Z nevcairiel $ local LibStub = LibStub local gui = LibStub("AceGUI-3.0") local reg = LibStub("AceConfigRegistry-3.0") -local MAJOR, MINOR = "AceConfigDialog-3.0", 66 +local MAJOR, MINOR = "AceConfigDialog-3.0", 69 local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not AceConfigDialog then return end @@ -21,11 +21,11 @@ AceConfigDialog.frame.closing = AceConfigDialog.frame.closing or {} AceConfigDialog.frame.closeAllOverride = AceConfigDialog.frame.closeAllOverride or {} -- Lua APIs -local tconcat, tinsert, tsort, tremove, tsort = table.concat, table.insert, table.sort, table.remove, table.sort +local tinsert, tsort, tremove = table.insert, table.sort, table.remove local strmatch, format = string.match, string.format -local assert, loadstring, error = assert, loadstring, error +local error = error local pairs, next, select, type, unpack, wipe, ipairs = pairs, next, select, type, unpack, wipe, ipairs -local rawset, tostring, tonumber = rawset, tostring, tonumber +local tostring, tonumber = tostring, tonumber local math_min, math_max, math_floor = math.min, math.max, math.floor -- Global vars/functions that we don't upvalue since they might get hooked, or upgraded @@ -45,39 +45,10 @@ local function errorhandler(err) return geterrorhandler()(err) end -local function CreateDispatcher(argCount) - local code = [[ - local xpcall, eh = ... - local method, ARGS - local function call() return method(ARGS) end - - local function dispatch(func, ...) - method = func - if not method then return end - ARGS = ... - return xpcall(call, eh) - end - - return dispatch - ]] - - local ARGS = {} - for i = 1, argCount do ARGS[i] = "arg"..i end - code = code:gsub("ARGS", tconcat(ARGS, ", ")) - return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler) -end - -local Dispatchers = setmetatable({}, {__index=function(self, argCount) - local dispatcher = CreateDispatcher(argCount) - rawset(self, argCount, dispatcher) - return dispatcher -end}) -Dispatchers[0] = function(func) - return xpcall(func, errorhandler) -end - local function safecall(func, ...) - return Dispatchers[select("#", ...)](func, ...) + if func then + return xpcall(func, errorhandler, ...) + end end local width_multiplier = 170 @@ -1064,6 +1035,19 @@ local function InjectInfo(control, options, option, path, rootframe, appName) control:SetCallback("OnEnter", OptionOnMouseOver) end +local function CreateControl(userControlType, fallbackControlType) + local control + if userControlType then + control = gui:Create(userControlType) + if not control then + geterrorhandler()(("Invalid Custom Control Type - %s"):format(tostring(userControlType))) + end + end + if not control then + control = gui:Create(fallbackControlType) + end + return control +end --[[ options - root of the options table being fed @@ -1112,8 +1096,9 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName) local image, width, height = GetOptionsMemberValue("image",v, options, path, appName) - if type(image) == "string" or type(image) == "number" then - control = gui:Create("Icon") + local iconControl = type(image) == "string" or type(image) == "number" + control = CreateControl(v.dialogControl or v.control, iconControl and "Icon" or "Button") + if iconControl then if not width then width = GetOptionsMemberValue("imageWidth",v, options, path, appName) end @@ -1134,18 +1119,12 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin control:SetImageSize(width, height) control:SetLabel(name) else - control = gui:Create("Button") control:SetText(name) end control:SetCallback("OnClick",ActivateControl) elseif v.type == "input" then - local controlType = v.dialogControl or v.control or (v.multiline and "MultiLineEditBox") or "EditBox" - control = gui:Create(controlType) - if not control then - geterrorhandler()(("Invalid Custom Control Type - %s"):format(tostring(controlType))) - control = gui:Create(v.multiline and "MultiLineEditBox" or "EditBox") - end + control = CreateControl(v.dialogControl or v.control, v.multiline and "MultiLineEditBox" or "EditBox") if v.multiline and control.SetNumLines then control:SetNumLines(tonumber(v.multiline) or 4) @@ -1159,7 +1138,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin control:SetText(text) elseif v.type == "toggle" then - control = gui:Create("CheckBox") + control = CreateControl(v.dialogControl or v.control, "CheckBox") control:SetLabel(name) control:SetTriState(v.tristate) local value = GetOptionsMemberValue("get",v, options, path, appName) @@ -1182,7 +1161,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin end end elseif v.type == "range" then - control = gui:Create("Slider") + control = CreateControl(v.dialogControl or v.control, "Slider") control:SetLabel(name) control:SetSliderValues(v.softMin or v.min or 0, v.softMax or v.max or 100, v.bigStep or v.step or 0) control:SetIsPercent(v.isPercent) @@ -1238,12 +1217,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin control:ResumeLayout() control:DoLayout() else - local controlType = v.dialogControl or v.control or "Dropdown" - control = gui:Create(controlType) - if not control then - geterrorhandler()(("Invalid Custom Control Type - %s"):format(tostring(controlType))) - control = gui:Create("Dropdown") - end + control = CreateControl(v.dialogControl or v.control, "Dropdown") local itemType = v.itemControl if itemType and not gui:GetWidgetVersion(itemType) then geterrorhandler()(("Invalid Custom Item Type - %s"):format(tostring(itemType))) @@ -1263,8 +1237,6 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin local values = GetOptionsMemberValue("values", v, options, path, appName) local disabled = CheckOptionDisabled(v, options, path, appName) - local controlType = v.dialogControl or v.control - local valuesort = new() if values then for value, text in pairs(values) do @@ -1273,6 +1245,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin end tsort(valuesort) + local controlType = v.dialogControl or v.control if controlType then control = gui:Create(controlType) if not control then @@ -1346,7 +1319,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin del(valuesort) elseif v.type == "color" then - control = gui:Create("ColorPicker") + control = CreateControl(v.dialogControl or v.control, "ColorPicker") control:SetLabel(name) control:SetHasAlpha(GetOptionsMemberValue("hasAlpha",v, options, path, appName)) control:SetColor(GetOptionsMemberValue("get",v, options, path, appName)) @@ -1354,18 +1327,18 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin control:SetCallback("OnValueConfirmed",ActivateControl) elseif v.type == "keybinding" then - control = gui:Create("Keybinding") + control = CreateControl(v.dialogControl or v.control, "Keybinding") control:SetLabel(name) control:SetKey(GetOptionsMemberValue("get",v, options, path, appName)) control:SetCallback("OnKeyChanged",ActivateControl) elseif v.type == "header" then - control = gui:Create("Heading") + control = CreateControl(v.dialogControl or v.control, "Heading") control:SetText(name) control.width = "fill" elseif v.type == "description" then - control = gui:Create("Label") + control = CreateControl(v.dialogControl or v.control, "Label") control:SetText(name) local fontSize = GetOptionsMemberValue("fontSize",v, options, path, appName) @@ -1533,10 +1506,6 @@ local function GroupSelected(widget, event, uniquevalue) end BuildPath(feedpath, ("\001"):split(uniquevalue)) - local group = options - for i = 1, #feedpath do - group = GetSubOption(group, feedpath[i]) - end widget:ReleaseChildren() AceConfigDialog:FeedGroup(user.appName,options,widget,rootframe,feedpath) diff --git a/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua b/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua index f8ac3f9..1e40811 100644 --- a/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua +++ b/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua @@ -8,7 +8,7 @@ -- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName". -- @class file -- @name AceConfigRegistry-3.0 --- @release $Id: AceConfigRegistry-3.0.lua 1169 2018-02-27 16:18:28Z nevcairiel $ +-- @release $Id: AceConfigRegistry-3.0.lua 1193 2018-08-02 12:24:37Z funkydude $ local CallbackHandler = LibStub("CallbackHandler-1.0") local MAJOR, MINOR = "AceConfigRegistry-3.0", 18 @@ -59,7 +59,6 @@ local optstring={["nil"]=true,["string"]=true, _="string"} local optstringfunc={["nil"]=true,["string"]=true,["function"]=true, _="string or funcref"} local optstringnumberfunc={["nil"]=true,["string"]=true,["number"]=true,["function"]=true, _="string, number or funcref"} local optnumber={["nil"]=true,["number"]=true, _="number"} -local optmethod={["nil"]=true,["string"]=true,["function"]=true, _="methodname or funcref"} local optmethodfalse={["nil"]=true,["string"]=true,["function"]=true,["boolean"]={[false]=true}, _="methodname, funcref or false"} local optmethodnumber={["nil"]=true,["string"]=true,["function"]=true,["number"]=true, _="methodname, funcref or number"} local optmethodtable={["nil"]=true,["string"]=true,["function"]=true,["table"]=true, _="methodname, funcref or table"} diff --git a/Libs/AceDB-3.0/AceDB-3.0.lua b/Libs/AceDB-3.0/AceDB-3.0.lua index b42b442..c41e9a4 100644 --- a/Libs/AceDB-3.0/AceDB-3.0.lua +++ b/Libs/AceDB-3.0/AceDB-3.0.lua @@ -40,15 +40,15 @@ -- end -- @class file -- @name AceDB-3.0.lua --- @release $Id: AceDB-3.0.lua 1142 2016-07-11 08:36:19Z nevcairiel $ +-- @release $Id: AceDB-3.0.lua 1193 2018-08-02 12:24:37Z funkydude $ local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 26 -local AceDB, oldminor = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR) +local AceDB = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR) if not AceDB then return end -- No upgrade needed -- Lua APIs local type, pairs, next, error = type, pairs, next, error -local setmetatable, getmetatable, rawset, rawget = setmetatable, getmetatable, rawset, rawget +local setmetatable, rawset, rawget = setmetatable, rawset, rawget -- WoW APIs local _G = _G @@ -619,8 +619,6 @@ function DBObjectLib:ResetDB(defaultProfile) sv[k] = nil end - local parent = self.parent - initdb(sv, self.defaults, defaultProfile, self) -- fix the child namespaces diff --git a/Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua b/Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua index 5028fef..7477698 100644 --- a/Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua +++ b/Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua @@ -1,9 +1,9 @@ --- AceDBOptions-3.0 provides a universal AceConfig options screen for managing AceDB-3.0 profiles. -- @class file -- @name AceDBOptions-3.0 --- @release $Id: AceDBOptions-3.0.lua 1140 2016-07-03 07:53:29Z nevcairiel $ +-- @release $Id: AceDBOptions-3.0.lua 1193 2018-08-02 12:24:37Z funkydude $ local ACEDBO_MAJOR, ACEDBO_MINOR = "AceDBOptions-3.0", 15 -local AceDBOptions, oldminor = LibStub:NewLibrary(ACEDBO_MAJOR, ACEDBO_MINOR) +local AceDBOptions = LibStub:NewLibrary(ACEDBO_MAJOR, ACEDBO_MINOR) if not AceDBOptions then return end -- No upgrade needed diff --git a/Libs/AceGUI-3.0/AceGUI-3.0.lua b/Libs/AceGUI-3.0/AceGUI-3.0.lua index 08904e4..a31a85a 100644 --- a/Libs/AceGUI-3.0/AceGUI-3.0.lua +++ b/Libs/AceGUI-3.0/AceGUI-3.0.lua @@ -24,17 +24,17 @@ -- f:AddChild(btn) -- @class file -- @name AceGUI-3.0 --- @release $Id: AceGUI-3.0.lua 1177 2018-06-25 12:12:48Z nevcairiel $ +-- @release $Id: AceGUI-3.0.lua 1193 2018-08-02 12:24:37Z funkydude $ local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 36 local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR) if not AceGUI then return end -- No upgrade needed -- Lua APIs -local tconcat, tremove, tinsert = table.concat, table.remove, table.insert +local tinsert = table.insert local select, pairs, next, type = select, pairs, next, type -local error, assert, loadstring = error, assert, loadstring -local setmetatable, rawget, rawset = setmetatable, rawget, rawset +local error, assert = error, assert +local setmetatable, rawget = setmetatable, rawget local math_max = math.max -- WoW APIs @@ -66,39 +66,10 @@ local function errorhandler(err) return geterrorhandler()(err) end -local function CreateDispatcher(argCount) - local code = [[ - local xpcall, eh = ... - local method, ARGS - local function call() return method(ARGS) end - - local function dispatch(func, ...) - method = func - if not method then return end - ARGS = ... - return xpcall(call, eh) - end - - return dispatch - ]] - - local ARGS = {} - for i = 1, argCount do ARGS[i] = "arg"..i end - code = code:gsub("ARGS", tconcat(ARGS, ", ")) - return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler) -end - -local Dispatchers = setmetatable({}, {__index=function(self, argCount) - local dispatcher = CreateDispatcher(argCount) - rawset(self, argCount, dispatcher) - return dispatcher -end}) -Dispatchers[0] = function(func) - return xpcall(func, errorhandler) -end - local function safecall(func, ...) - return Dispatchers[select("#", ...)](func, ...) + if func then + return xpcall(func, errorhandler, ...) + end end -- Recycling functions @@ -690,14 +661,12 @@ AceGUI:RegisterLayout("Flow", --height of the current row local rowheight = 0 local rowoffset = 0 - local lastrowoffset local width = content.width or content:GetWidth() or 0 --control at the start of the row local rowstart local rowstartoffset - local lastrowstart local isfullheight local frameoffset diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua index 80fd582..ec98f4b 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua @@ -219,7 +219,7 @@ local function Constructor() statustext:SetText("") local titlebg = frame:CreateTexture(nil, "OVERLAY") - titlebg:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header") + titlebg:SetTexture(131080) -- Interface\\DialogFrame\\UI-DialogBox-Header titlebg:SetTexCoord(0.31, 0.67, 0, 0.63) titlebg:SetPoint("TOP", 0, 12) titlebg:SetWidth(100) @@ -235,14 +235,14 @@ local function Constructor() titletext:SetPoint("TOP", titlebg, "TOP", 0, -14) local titlebg_l = frame:CreateTexture(nil, "OVERLAY") - titlebg_l:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header") + titlebg_l:SetTexture(131080) -- Interface\\DialogFrame\\UI-DialogBox-Header titlebg_l:SetTexCoord(0.21, 0.31, 0, 0.63) titlebg_l:SetPoint("RIGHT", titlebg, "LEFT") titlebg_l:SetWidth(30) titlebg_l:SetHeight(40) local titlebg_r = frame:CreateTexture(nil, "OVERLAY") - titlebg_r:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header") + titlebg_r:SetTexture(131080) -- Interface\\DialogFrame\\UI-DialogBox-Header titlebg_r:SetTexCoord(0.67, 0.77, 0, 0.63) titlebg_r:SetPoint("LEFT", titlebg, "RIGHT") titlebg_r:SetWidth(30) @@ -260,7 +260,7 @@ local function Constructor() line1:SetWidth(14) line1:SetHeight(14) line1:SetPoint("BOTTOMRIGHT", -8, 8) - line1:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border") + line1:SetTexture(137057) -- Interface\\Tooltips\\UI-Tooltip-Border local x = 0.1 * 14/17 line1:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5) @@ -268,7 +268,7 @@ local function Constructor() line2:SetWidth(8) line2:SetHeight(8) line2:SetPoint("BOTTOMRIGHT", -8, 8) - line2:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border") + line2:SetTexture(137057) -- Interface\\Tooltips\\UI-Tooltip-Border local x = 0.1 * 8/17 line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5) diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua index 9afb54b..eb8e215 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua @@ -2,13 +2,13 @@ ScrollFrame Container Plain container that scrolls its content and doesn't grow in height. -------------------------------------------------------------------------------]] -local Type, Version = "ScrollFrame", 24 +local Type, Version = "ScrollFrame", 26 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end -- Lua APIs local pairs, assert, type = pairs, assert, type -local min, max, floor, abs = math.min, math.max, math.floor, math.abs +local min, max, floor = math.min, math.max, math.floor -- WoW APIs local CreateFrame, UIParent = CreateFrame, UIParent @@ -53,7 +53,7 @@ local methods = { self.scrollframe:SetPoint("BOTTOMRIGHT") self.scrollbar:Hide() self.scrollBarShown = nil - self.content.height, self.content.width = nil, nil + self.content.height, self.content.width, self.content.original_width = nil, nil, nil end, ["SetScroll"] = function(self, value) @@ -94,7 +94,6 @@ local methods = { local status = self.status or self.localstatus local height, viewheight = self.scrollframe:GetHeight(), self.content:GetHeight() local offset = status.offset or 0 - local curvalue = self.scrollbar:GetValue() -- Give us a margin of error of 2 pixels to stop some conditions that i would blame on floating point inaccuracys -- No-one is going to miss 2 pixels at the bottom of the frame, anyhow! if viewheight < height + 2 then @@ -103,6 +102,9 @@ local methods = { self.scrollbar:Hide() self.scrollbar:SetValue(0) self.scrollframe:SetPoint("BOTTOMRIGHT") + if self.content.original_width then + self.content.width = self.content.original_width + end self:DoLayout() end else @@ -110,6 +112,9 @@ local methods = { self.scrollBarShown = true self.scrollbar:Show() self.scrollframe:SetPoint("BOTTOMRIGHT", -20, 0) + if self.content.original_width then + self.content.width = self.content.original_width - 20 + end self:DoLayout() end local value = (offset / (viewheight - height) * 1000) @@ -128,6 +133,11 @@ local methods = { ["LayoutFinished"] = function(self, width, height) self.content:SetHeight(height or 0 + 20) + + -- update the scrollframe + self:FixScroll() + + -- schedule another update when everything has "settled" self.scrollframe:SetScript("OnUpdate", FixScrollOnUpdate) end, @@ -141,7 +151,8 @@ local methods = { ["OnWidthSet"] = function(self, width) local content = self.content - content.width = width + content.width = width - (self.scrollBarShown and 20 or 0) + content.original_width = width end, ["OnHeightSet"] = function(self, height) diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua index 95544c5..9129f9d 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua @@ -165,7 +165,6 @@ local methods = { ["BuildTabs"] = function(self) local hastitle = (self.titletext:GetText() and self.titletext:GetText() ~= "") - local status = self.status or self.localstatus local tablist = self.tablist local tabs = self.tabs diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua index 236f633..ba916d0 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua @@ -59,7 +59,6 @@ end local function UpdateButton(button, treeline, selected, canExpand, isExpanded) local self = button.obj local toggle = button.toggle - local frame = self.frame local text = treeline.text or "" local icon = treeline.icon local iconCoords = treeline.iconCoords @@ -78,8 +77,6 @@ local function UpdateButton(button, treeline, selected, canExpand, isExpanded) button:UnlockHighlight() button.selected = false end - local normalTexture = button:GetNormalTexture() - local line = button.line button.level = level if ( level == 1 ) then button:SetNormalFontObject("GameFontNormal") @@ -114,11 +111,11 @@ local function UpdateButton(button, treeline, selected, canExpand, isExpanded) if canExpand then if not isExpanded then - toggle:SetNormalTexture("Interface\\Buttons\\UI-PlusButton-UP") - toggle:SetPushedTexture("Interface\\Buttons\\UI-PlusButton-DOWN") + toggle:SetNormalTexture(130838) -- Interface\\Buttons\\UI-PlusButton-UP + toggle:SetPushedTexture(130836) -- Interface\\Buttons\\UI-PlusButton-DOWN else - toggle:SetNormalTexture("Interface\\Buttons\\UI-MinusButton-UP") - toggle:SetPushedTexture("Interface\\Buttons\\UI-MinusButton-DOWN") + toggle:SetNormalTexture(130821) -- Interface\\Buttons\\UI-MinusButton-UP + toggle:SetPushedTexture(130820) -- Interface\\Buttons\\UI-MinusButton-DOWN end toggle:Show() else @@ -201,7 +198,6 @@ end local function Button_OnDoubleClick(button) local self = button.obj - local status = self.status or self.localstatus local status = (self.status or self.localstatus).groups status[button.uniquevalue] = not status[button.uniquevalue] self:RefreshTree() @@ -376,7 +372,6 @@ local methods = { ["BuildLevel"] = function(self, tree, level, parent) local groups = (self.status or self.localstatus).groups - local hasChildren = self.hasChildren for i, v in ipairs(tree) do if v.children then diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua index 6825420..9818e6d 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua @@ -190,67 +190,67 @@ do frame:SetToplevel(true) local titlebg = frame:CreateTexture(nil, "BACKGROUND") - titlebg:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Title-Background]]) + titlebg:SetTexture(251966) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Title-Background titlebg:SetPoint("TOPLEFT", 9, -6) titlebg:SetPoint("BOTTOMRIGHT", frame, "TOPRIGHT", -28, -24) local dialogbg = frame:CreateTexture(nil, "BACKGROUND") - dialogbg:SetTexture([[Interface\Tooltips\UI-Tooltip-Background]]) + dialogbg:SetTexture(137056) -- Interface\\Tooltips\\UI-Tooltip-Background dialogbg:SetPoint("TOPLEFT", 8, -24) dialogbg:SetPoint("BOTTOMRIGHT", -6, 8) dialogbg:SetVertexColor(0, 0, 0, .75) local topleft = frame:CreateTexture(nil, "BORDER") - topleft:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) + topleft:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border topleft:SetWidth(64) topleft:SetHeight(64) topleft:SetPoint("TOPLEFT") topleft:SetTexCoord(0.501953125, 0.625, 0, 1) local topright = frame:CreateTexture(nil, "BORDER") - topright:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) + topright:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border topright:SetWidth(64) topright:SetHeight(64) topright:SetPoint("TOPRIGHT") topright:SetTexCoord(0.625, 0.75, 0, 1) local top = frame:CreateTexture(nil, "BORDER") - top:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) + top:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border top:SetHeight(64) top:SetPoint("TOPLEFT", topleft, "TOPRIGHT") top:SetPoint("TOPRIGHT", topright, "TOPLEFT") top:SetTexCoord(0.25, 0.369140625, 0, 1) local bottomleft = frame:CreateTexture(nil, "BORDER") - bottomleft:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) + bottomleft:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border bottomleft:SetWidth(64) bottomleft:SetHeight(64) bottomleft:SetPoint("BOTTOMLEFT") bottomleft:SetTexCoord(0.751953125, 0.875, 0, 1) local bottomright = frame:CreateTexture(nil, "BORDER") - bottomright:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) + bottomright:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border bottomright:SetWidth(64) bottomright:SetHeight(64) bottomright:SetPoint("BOTTOMRIGHT") bottomright:SetTexCoord(0.875, 1, 0, 1) local bottom = frame:CreateTexture(nil, "BORDER") - bottom:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) + bottom:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border bottom:SetHeight(64) bottom:SetPoint("BOTTOMLEFT", bottomleft, "BOTTOMRIGHT") bottom:SetPoint("BOTTOMRIGHT", bottomright, "BOTTOMLEFT") bottom:SetTexCoord(0.376953125, 0.498046875, 0, 1) local left = frame:CreateTexture(nil, "BORDER") - left:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) + left:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border left:SetWidth(64) left:SetPoint("TOPLEFT", topleft, "BOTTOMLEFT") left:SetPoint("BOTTOMLEFT", bottomleft, "TOPLEFT") left:SetTexCoord(0.001953125, 0.125, 0, 1) local right = frame:CreateTexture(nil, "BORDER") - right:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) + right:SetTexture(251963) -- Interface\\PaperDollInfoFrame\\UI-GearManager-Border right:SetWidth(64) right:SetPoint("TOPRIGHT", topright, "BOTTOMRIGHT") right:SetPoint("BOTTOMRIGHT", bottomright, "TOPRIGHT") @@ -290,7 +290,7 @@ do line1:SetWidth(14) line1:SetHeight(14) line1:SetPoint("BOTTOMRIGHT", -8, 8) - line1:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border") + line1:SetTexture(137057) -- Interface\\Tooltips\\UI-Tooltip-Border local x = 0.1 * 14/17 line1:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5) @@ -299,7 +299,7 @@ do line2:SetWidth(8) line2:SetHeight(8) line2:SetPoint("BOTTOMRIGHT", -8, 8) - line2:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border") + line2:SetTexture(137057) -- Interface\\Tooltips\\UI-Tooltip-Border local x = 0.1 * 8/17 line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5) diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua index 44cab23..be9ae81 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua @@ -1,7 +1,7 @@ --[[----------------------------------------------------------------------------- Checkbox Widget -------------------------------------------------------------------------------]] -local Type, Version = "CheckBox", 24 +local Type, Version = "CheckBox", 26 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -26,7 +26,7 @@ local function AlignImage(self) self.text:SetPoint("LEFT", self.checkbg, "RIGHT") self.text:SetPoint("RIGHT") else - self.text:SetPoint("LEFT", self.checkbg, "RIGHT", self.image:GetWidth() + 2, 0) + self.text:SetPoint("LEFT", self.image, "RIGHT", 1, 0) self.text:SetPoint("RIGHT") end end @@ -91,7 +91,7 @@ local methods = { if self.desc then self.desc:SetWidth(width - 30) if self.desc:GetText() and self.desc:GetText() ~= "" then - self:SetHeight(28 + self.desc:GetHeight()) + self:SetHeight(28 + self.desc:GetStringHeight()) end end end, @@ -119,20 +119,20 @@ local methods = { end end, - ["SetValue"] = function(self,value) + ["SetValue"] = function(self, value) local check = self.check self.checked = value if value then - SetDesaturation(self.check, false) - self.check:Show() + SetDesaturation(check, false) + check:Show() else --Nil is the unknown tristate value if self.tristate and value == nil then - SetDesaturation(self.check, true) - self.check:Show() + SetDesaturation(check, true) + check:Show() else - SetDesaturation(self.check, false) - self.check:Hide() + SetDesaturation(check, false) + check:Hide() end end self:SetDisabled(self.disabled) @@ -155,21 +155,21 @@ local methods = { local size if type == "radio" then size = 16 - checkbg:SetTexture("Interface\\Buttons\\UI-RadioButton") + checkbg:SetTexture(130843) -- Interface\\Buttons\\UI-RadioButton checkbg:SetTexCoord(0, 0.25, 0, 1) - check:SetTexture("Interface\\Buttons\\UI-RadioButton") + check:SetTexture(130843) -- Interface\\Buttons\\UI-RadioButton check:SetTexCoord(0.25, 0.5, 0, 1) check:SetBlendMode("ADD") - highlight:SetTexture("Interface\\Buttons\\UI-RadioButton") + highlight:SetTexture(130843) -- Interface\\Buttons\\UI-RadioButton highlight:SetTexCoord(0.5, 0.75, 0, 1) else size = 24 - checkbg:SetTexture("Interface\\Buttons\\UI-CheckBox-Up") + checkbg:SetTexture(130755) -- Interface\\Buttons\\UI-CheckBox-Up checkbg:SetTexCoord(0, 1, 0, 1) - check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check") + check:SetTexture(130751) -- Interface\\Buttons\\UI-CheckBox-Check check:SetTexCoord(0, 1, 0, 1) check:SetBlendMode("BLEND") - highlight:SetTexture("Interface\\Buttons\\UI-CheckBox-Highlight") + highlight:SetTexture(130753) -- Interface\\Buttons\\UI-CheckBox-Highlight highlight:SetTexCoord(0, 1, 0, 1) end checkbg:SetHeight(size) @@ -211,7 +211,7 @@ local methods = { self.desc:Show() --self.text:SetFontObject(GameFontNormal) self.desc:SetText(desc) - self:SetHeight(28 + self.desc:GetHeight()) + self:SetHeight(28 + self.desc:GetStringHeight()) else if self.desc then self.desc:SetText("") @@ -255,11 +255,11 @@ local function Constructor() checkbg:SetWidth(24) checkbg:SetHeight(24) checkbg:SetPoint("TOPLEFT") - checkbg:SetTexture("Interface\\Buttons\\UI-CheckBox-Up") + checkbg:SetTexture(130755) -- Interface\\Buttons\\UI-CheckBox-Up local check = frame:CreateTexture(nil, "OVERLAY") check:SetAllPoints(checkbg) - check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check") + check:SetTexture(130751) -- Interface\\Buttons\\UI-CheckBox-Check local text = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight") text:SetJustifyH("LEFT") @@ -268,7 +268,7 @@ local function Constructor() text:SetPoint("RIGHT") local highlight = frame:CreateTexture(nil, "HIGHLIGHT") - highlight:SetTexture("Interface\\Buttons\\UI-CheckBox-Highlight") + highlight:SetTexture(130753) -- Interface\\Buttons\\UI-CheckBox-Highlight highlight:SetBlendMode("ADD") highlight:SetAllPoints(checkbg) diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua index 05e2b57..4e911db 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua @@ -1,7 +1,7 @@ --[[----------------------------------------------------------------------------- ColorPicker Widget -------------------------------------------------------------------------------]] -local Type, Version = "ColorPicker", 23 +local Type, Version = "ColorPicker", 24 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -140,10 +140,11 @@ local function Constructor() local colorSwatch = frame:CreateTexture(nil, "OVERLAY") colorSwatch:SetWidth(19) colorSwatch:SetHeight(19) - colorSwatch:SetTexture("Interface\\ChatFrame\\ChatFrameColorSwatch") + colorSwatch:SetTexture(130939) -- Interface\\ChatFrame\\ChatFrameColorSwatch colorSwatch:SetPoint("LEFT") local texture = frame:CreateTexture(nil, "BACKGROUND") + colorSwatch.background = texture texture:SetWidth(16) texture:SetHeight(16) texture:SetColorTexture(1, 1, 1) @@ -151,9 +152,10 @@ local function Constructor() texture:Show() local checkers = frame:CreateTexture(nil, "BACKGROUND") + colorSwatch.checkers = checkers checkers:SetWidth(14) checkers:SetHeight(14) - checkers:SetTexture("Tileset\\Generic\\Checkers") + checkers:SetTexture(188523) -- Tileset\\Generic\\Checkers checkers:SetTexCoord(.25, 0, 0.5, .25) checkers:SetDesaturated(true) checkers:SetVertexColor(1, 1, 1, 0.75) @@ -168,7 +170,7 @@ local function Constructor() text:SetPoint("RIGHT") --local highlight = frame:CreateTexture(nil, "HIGHLIGHT") - --highlight:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight") + --highlight:SetTexture(136810) -- Interface\\QuestFrame\\UI-QuestTitleHighlight --highlight:SetBlendMode("ADD") --highlight:SetAllPoints(frame) diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua index 5748e4f..549ce3e 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua @@ -1,4 +1,4 @@ ---[[ $Id: AceGUIWidget-DropDown-Items.lua 1167 2017-08-29 22:08:48Z funkydude $ ]]-- +--[[ $Id: AceGUIWidget-DropDown-Items.lua 1192 2018-07-30 18:03:51Z funkydude $ ]]-- local AceGUI = LibStub("AceGUI-3.0") @@ -169,7 +169,7 @@ function ItemBase.Create(type) self.text = text local highlight = frame:CreateTexture(nil, "OVERLAY") - highlight:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight") + highlight:SetTexture(136810) -- Interface\\QuestFrame\\UI-QuestTitleHighlight highlight:SetBlendMode("ADD") highlight:SetHeight(14) highlight:ClearAllPoints() @@ -182,7 +182,7 @@ function ItemBase.Create(type) check:SetWidth(16) check:SetHeight(16) check:SetPoint("LEFT",frame,"LEFT",3,-1) - check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check") + check:SetTexture(130751) -- Interface\\Buttons\\UI-CheckBox-Check check:Hide() self.check = check @@ -190,7 +190,7 @@ function ItemBase.Create(type) sub:SetWidth(16) sub:SetHeight(16) sub:SetPoint("RIGHT",frame,"RIGHT",-3,-1) - sub:SetTexture("Interface\\ChatFrame\\ChatFrameExpandArrow") + sub:SetTexture(130940) -- Interface\\ChatFrame\\ChatFrameExpandArrow sub:Hide() self.sub = sub diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua index 1aaf3f5..862ae88 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua @@ -51,14 +51,14 @@ local function Constructor() left:SetHeight(8) left:SetPoint("LEFT", 3, 0) left:SetPoint("RIGHT", label, "LEFT", -5, 0) - left:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border") + left:SetTexture(137057) -- Interface\\Tooltips\\UI-Tooltip-Border left:SetTexCoord(0.81, 0.94, 0.5, 1) local right = frame:CreateTexture(nil, "BACKGROUND") right:SetHeight(8) right:SetPoint("RIGHT", -3, 0) right:SetPoint("LEFT", label, "RIGHT", 5, 0) - right:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border") + right:SetTexture(137057) -- Interface\\Tooltips\\UI-Tooltip-Border right:SetTexCoord(0.81, 0.94, 0.5, 1) local widget = { diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua index 561da73..bc3d02a 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua @@ -118,7 +118,7 @@ local function Constructor() local highlight = frame:CreateTexture(nil, "HIGHLIGHT") highlight:SetAllPoints(image) - highlight:SetTexture("Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight") + highlight:SetTexture(136580) -- Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight highlight:SetTexCoord(0, 1, 0.23, 0.77) highlight:SetBlendMode("ADD") diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua index 036efee..255dd97 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua @@ -8,13 +8,6 @@ if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end -- Lua APIs local select, pairs = select, pairs --- WoW APIs -local CreateFrame, UIParent = CreateFrame, UIParent - --- Global vars/functions that we don't upvalue since they might get hooked, or upgraded --- List them here for Mikk's FindGlobals script --- GLOBALS: GameFontHighlightSmall - --[[----------------------------------------------------------------------------- Scripts -------------------------------------------------------------------------------]] diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua index 75817a0..7a754f6 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua @@ -2,7 +2,7 @@ Label Widget Displays text and optionally an icon. -------------------------------------------------------------------------------]] -local Type, Version = "Label", 24 +local Type, Version = "Label", 26 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -39,23 +39,28 @@ local function UpdateImageAnchor(self) label:SetPoint("TOP", image, "BOTTOM") label:SetPoint("LEFT") label:SetWidth(width) - height = image:GetHeight() + label:GetHeight() + height = image:GetHeight() + label:GetStringHeight() else -- image on the left image:SetPoint("TOPLEFT") - if image:GetHeight() > label:GetHeight() then + if image:GetHeight() > label:GetStringHeight() then label:SetPoint("LEFT", image, "RIGHT", 4, 0) else label:SetPoint("TOPLEFT", image, "TOPRIGHT", 4, 0) end label:SetWidth(width - imagewidth - 4) - height = max(image:GetHeight(), label:GetHeight()) + height = max(image:GetHeight(), label:GetStringHeight()) end else -- no image shown label:SetPoint("TOPLEFT") label:SetWidth(width) - height = label:GetHeight() + height = label:GetStringHeight() + end + + -- avoid zero-height labels, since they can used as spacers + if not height or height == 0 then + height = 1 end self.resizing = true diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua index 20d0887..5a81759 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua @@ -57,10 +57,9 @@ local function Frame_OnMouseDown(frame) AceGUI:ClearFocus() end -local function Slider_OnValueChanged(frame) +local function Slider_OnValueChanged(frame, newvalue) local self = frame.obj if not frame.setup then - local newvalue = frame:GetValue() if self.step and self.step > 0 then local min_value = self.min or 0 newvalue = floor((newvalue - min_value) / self.step + 0.5) * self.step + min_value diff --git a/Libs/EMALibActionButton-1.0.lua b/Libs/EMALibActionButton-1.0.lua index e687cf7..bfb67bc 100644 --- a/Libs/EMALibActionButton-1.0.lua +++ b/Libs/EMALibActionButton-1.0.lua @@ -1199,7 +1199,7 @@ function UpdateCount(self) if self:IsConsumableOrStackable() then local count = self:GetCount() if count ~= 0 then - if count > (self.maxDisplayCount or 999) then + if count > (self.maxDisplayCount or 9999) then --TODO: Relly this should show digits then * if over 999 self.Count:SetText("*") else @@ -1558,7 +1558,7 @@ Item.GetActionText = function(self) return "" end Item.GetTexture = function(self) return GetItemIcon(self._state_action) end Item.GetCharges = function(self) return nil end --Item.GetCount = function(self) return GetItemCount(self._state_action, nil, true) end --- Ebony changes for Ema-EE to count the stacks all chars and display in the bar! +-- Ebony changes for Ema to count the stacks all chars and display in the bar! Item.GetCount = function(self) return EMAApi.GetMaxItemCountFromItemID( self._state_action ) end Item.GetCooldown = function(self) return GetItemCooldown(getItemId(self._state_action)) end Item.IsAttack = function(self) return nil end diff --git a/Locales/Core-Locale-deDE.lua b/Locales/Core-Locale-deDE.lua index d58685f..7ec287b 100644 --- a/Locales/Core-Locale-deDE.lua +++ b/Locales/Core-Locale-deDE.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -337,6 +337,7 @@ L["ITEM_BAR_CLEARED"] = "Gegenstands Anzeige geleert" L["TEAM_BAGS"] = "Gegenstände des Teams" L["BAG_BANK"] = "Taschen (Bank)" + -------------------------- -- EMA-Sell Locale L["SELL"] = "Verkauf" diff --git a/Locales/Core-Locale-enUS.lua b/Locales/Core-Locale-enUS.lua index d895671..8460c01 100644 --- a/Locales/Core-Locale-enUS.lua +++ b/Locales/Core-Locale-enUS.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -12,14 +12,11 @@ local L = LibStub("AceLocale-3.0"):NewLocale( "Core", "enUS", true ) - - -- NewLocales --PreCoded ALL L["JAMBA"] = "Jamba" L["JAMBA EE"] = "Jamba EE" - L["EMA"] = "EMA" L[""] = true L[" "] = true @@ -30,6 +27,8 @@ L[" / "] = true L["/"] = true L["%"] = true L["N/A"] = true +L["OPEN_CONFIG"] = "Opens The Config" +L["OPEN_CONFIG_HELP"] = "Opens The Configuration GUI" L["PUSH_SETTINGS"] = "Push Settings" L["PUSH_ALL_SETTINGS"] = "Push All Settings" L["PUSH_SETTINGS_INFO"] = "Push Settings To Team Members" @@ -41,11 +40,18 @@ L["MESSAGES_HEADER"] = "Messages" L["MESSAGE_AREA"] = "Message Area" L["SEND_WARNING_AREA"] = "Warning Area" L["PH"] = "PH" +L["PH_HELP"] = "Place Holder" L["CTRL"] = "Ctrl" L["SHIFT"] = "Shift" L["ALT"] = "Alt" L["UPDATE"] = "Update" L["ISBOXER_ADDON_NOT_LOADED"] = "ISBoxer Addon Not Installed Or Loaded" +L["GLOBAL_LIST"] = "Use Global List" +L["GLOBAL_SETTINGS_LIST_HELP"] = "Use A Global List \nThis Works Across All Characters" +L["COPY"] = "Copy" +L["COPY_HELP"] = "Copy From Local To Global List" +L["MODULE_LIST"] = "Module List" +L["CANNOT_OPEN_IN_COMBAT"] = "|cFFFF0000Cannot Open The GUI Config In Combat" -- Display Options L["APPEARANCE_LAYOUT_HEALDER"] = "Appearance & Layout" @@ -133,7 +139,7 @@ L["A_IS_NOT_IN_TEAM"] = function( characterName ) end -------------------------- -- Core Locale -L["STATUSTEXT"] = "EMA: The Even More Awesome MultiBoxing Assistant" +L["STATUSTEXT"] = "EMA: Ebony's MultiBoxing Assistant" L["RESET_SETTINGS_FRAME"] = "Reset Settings Frame" L["MODULE_NOT_LOADED"] = "Module Not Loaded Or Is Out Of Date" L["RELEASE_NOTES"] = "Release Notes " @@ -144,9 +150,9 @@ L["RESETTING_PROFILE"] = "Resetting profile: " L["PROFILE_DELETED"] = "Profile deleted - iterating all modules." L["DELETING_PROFILE"] = "Deleting profile: " L["Failed_LOAD_MODULE"] = "Failed to load EMA Module: " -L["TEXT1"] = "Ebony's MultiBoxing Assistant v8 For BFA!" +L["TEXT1"] = "Ebony's MultiBoxing Assistant v2.0 For 8.1.0!" L["TEXT2"] = "" -L["TEXT3"] = "This Build Is Beta!" +L["TEXT3"] = "Welcome To v2! 2019!" L["TEXT4"] = "" L["TEXT5"] = "" L["TEXT6"] = "Read The ChangeLog For More Information" @@ -155,7 +161,7 @@ L["TEXT8"] = "" L["TEXT9"] = "" L["TEXT10"] = "" L["SPECIAL_THANKS"] = "Special Thanks:" -L["THANKS1"] = "Michael \"Jafula\" Miller For Making Jamba That Some Of This Code Is Based Of" +L["THANKS1"] = "Michael \"Jafula\" Miller For Making Jamba That Some Of This Code Is Based On" L["THANKS2"] = "tk911 For Translating EMA To German (DE)" L["THANKS3"] = "" L["WEBSITES"] = "Websites" @@ -166,12 +172,15 @@ L["ISB"] = "" L["TEMP_WEBSITE1"] = "" L["TEMP_WEBSITE2"] = "" L["TEMP_WEBSITE3"] = "" -L["COPYRIGHT"] = "Copyright (c) 2015-2018 Jennifer Cally" -L["COPYRIGHTTWO"] = "Released Under License: The MIT License" +L["COPYRIGHT"] = "Copyright (c) 2015-2019 Jennifer Cally" +L["COPYRIGHTTWO"] = "Released Under License: All Rights Reserved unless otherwise explicitly stated" L["FRAME_RESET"] = "Frame Reset" -- Msg 8000 L["ALL_SETTINGS_RESET"] = "Thank You For Using EMA \nYour settings have been reset. \n\nPlease report any bugs to the source control issue tracker." L["CAN_NOT_RUN_JAMBA_AND_EMA"] = "|cFFFF0000 You Can Not Run \"Jamba\" With EMA \nDisabling Jamba Addon \n\nThis Will Reload Your UI" +-- BETA CHANGE ME!!! +L["v2_NEWS"] = "|cFFFFFF00Thank You For Upgrading EMA \nYou Are Now On Beta v2.0 \n\n|cFFFFFFFFRead Changelog For More Information" + -------------------------- -- Communications Locale @@ -337,6 +346,7 @@ L["NUMBER_OF_ITEMS"] = "Number Of Items" L["ITEM_BAR_CLEARED"] = "Item Bar Cleared" L["TEAM_BAGS"] = "Items In Team Bags" L["BAG_BANK"] = "Bag (Banks)" +L["QUEST_ITEM"] = "Quest Item" -------------------------- -- Sell Locale @@ -347,6 +357,7 @@ L["ALT_SELL_ALL"] = "Hold [Alt] While Selling An Item, To Sell On All Toons" L["ALT_SELL_ALL_HELP"] = "Hold [Alt] Key While Selling An Item To The Vendor, To Sell That Item On All Toons" L["AUTO_SELL_ITEMS"] = "Automatically Sell Items" L["AUTO_SELL_ITEMS_HELP"] = "Automatically Sell Items Below" +L["GLOBAL_SELL_LIST"] = "Global Sell List" L["BLACKLIST_ITEM"] = "Black List" L["BLACKLIST_ITEM_HELP"] = "EMA Can Not Sell This Item \ne.g.: Philosopher's Stones" L["DESTROY_ITEM"] = "Destroy Items" @@ -363,6 +374,10 @@ L["SELL_RARE"] = "|cff0070dd Sell Rare Items" L["SELL_RARE_HELP"] = "Sell All Rare(Blue) Items" L["SELL_EPIC"] = "|cffa335ee Sell Epic Items" L["SELL_EPIC_HELP"] = "Sell All Epic(Purple) Items" +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["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?" @@ -411,16 +426,15 @@ L["TELL_TEAM_BOE_RARE"] = "Tell Team BoE Rare" L["TELL_TEAM_BOE_RARE_HELP"] = "Tell The Team If I Loot A BoE Rare" L["TELL_TEAM_BOE_EPIC"] = "Tell Team BoE Epic" L["TELL_TEAM_BOE_EPIC_HELP"] = "Tell The Team If I Loot A BoE Epic" +L["TELL_TEAM_BOE_MOUNT"] = "Tell Team Mount" +L["TELL_TEAM_BOE_MOUNT_HELP"] = "Tell The Team If I Loot A BoE Mount" L["I_HAVE_LOOTED_X_Y_ITEM"] = function( rarity, itemName ) return string.format( "I Have Looted A %q BoE Item: %s", rarity, itemName ) end L["EPIC"] = "Epic" L["RARE"] = "Rare" L["REQUESTED_STOP_X"] = function( sender ) - return string.format( "I Have Requested a Stop From %s", sender ) -end -L["SETTINGS_RECEIVED_FROM_A"] = function( characterName ) - return string.format( "Settings Received From %s.", characterName ) + return string.format( "I Have Requested A Taxi Stop From %s", sender ) end L["I_AM_UNABLE_TO_FLY_TO_A"] = function( nodename ) return string.format( "I Am Unable To Fly To %s.", nodename ) @@ -566,7 +580,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 From Your Bags)" +L["ITEM_DROP"] = "Item (DRAG ITEM TO BOX)" L["PURCHASE_ITEMS"] = "Auto Purchase Items" L["ADD_ITEM"] = "Add Item" L["AMOUNT"] = "Amount" @@ -582,8 +596,9 @@ L["ERROR_CURR"] = "I Do Not Have Enough Other Currency To Complete My Purchases. -- Trade Locale L["REMOVE_TRADE_LIST"] = "Are You Sure You Wish To Remove The Selected Item From The Trade Items List?" L["TRADE_LIST_HEADER"] = "Trade Item List" -L["TRADE_LIST"] = "Trade The Items With The EMA-Group Members" -L["TRADE_LIST_HELP"] = "The List Will Trade With The Selected EMA-Group Member" +L["TRADE_LIST"] = "Trade Items" +L["GLOBAL_TRADE_LIST"] = "Global Trade List" +L["TRADE_LIST_HELP"] = "Trade Items With The Selected EMA-Group Member" L["TRADE_BOE_ITEMS"] = "Trades Binds When Equipped Items With:" L["TRADE_BOE_ITEMS_HELP"] = "Trade All Binds When Equipped Items with EMA Group" L["TRADE_REAGENTS"] = "Trades Crafting Reagents Items With:" @@ -831,8 +846,8 @@ L["HIDE_QUEST_WATCHER_HELP"] = "Hides The Objective/Quest EMA Tracker Window." L["QUEST_TRACKER_HEADER"] = "Quest Tracker Settings" L["ENABLE_TRACKER"] = "Enable Objective Tracker" L["ENABLE_TRACKER_HELP"] = "Enables The EMA Objective/Quest Tracker" -L["UNLOCK_TRACKER"] = "Unlocks The Objective Tracker" -L["UNLOCK_TRACKER_HELP"] = "Unlocks The Objective/Quest Tracker \n\nHold Alt key To Move It\nLock to Click Through" +L["UNLOCK_TRACKER"] = "Disable Click-Through" +L["UNLOCK_TRACKER_HELP"] = "Disable Click-Through on the The Objective/Quest Tracker" L["HIDE_BLIZZ_OBJ_TRACKER"] = "Hide Blizzard's Objectives Tracker" L["HIDE_BLIZZ_OBJ_TRACKER_HELP"] = "Hides Default Blizzard Objective\Quest Tracker" L["SHOW_JOT_ON_MASTER"] = "Show The EMA Objective Tracker On Master Toon" diff --git a/Locales/Locales.xml b/Locales/Locales.xml index a1f1076..7858b67 100644 --- a/Locales/Locales.xml +++ b/Locales/Locales.xml @@ -2,7 +2,7 @@ Jamba EE - ( The Awesome MultiBoxing Assistant Ebony's Edition ) Current Author: Jennifer Cally (Ebony) - License: All Rights Reserved 2018 Jennifer Cally + License: All Rights Reserved 2018-2019 Jennifer Cally --> <Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd" xmlns="http://www.blizzard.com/wow/ui/"> diff --git a/Modules/Bank.lua b/Modules/Bank.lua index eb0283b..bdf7649 100644 --- a/Modules/Bank.lua +++ b/Modules/Bank.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -68,11 +68,19 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-bank config", + get = false, + set = "", + }, push = { type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_ALL_SETTINGS"], - usage = "/EMA-Bank push", + usage = "/ema-Bank push", get = false, set = "EMASendSettings", guiHidden = true, diff --git a/Modules/DisplayTeam.lua b/Modules/DisplayTeam.lua index 576917c..b84af82 100644 --- a/Modules/DisplayTeam.lua +++ b/Modules/DisplayTeam.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -129,11 +129,19 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-display config", + get = false, + set = "", + }, push = { type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_SETTINGS_INFO"], - usage = "/EMA-display-team push", + usage = "/ema-display-team push", get = false, set = "EMASendSettings", }, @@ -141,7 +149,7 @@ function EMA:GetConfiguration() type = "input", name = L["HIDE_TEAM_DISPLAY"], desc = L["HIDE_TEAM_DISPLAY_HELP"], - usage = "/EMA-display-team hide", + usage = "/ema-display-team hide", get = false, set = "HideTeamListCommand", }, @@ -149,7 +157,7 @@ function EMA:GetConfiguration() type = "input", name = L["SHOW_TEAM_DISPLAY"], desc = L["SHOW_TEAM_DISPLAY_HELP"], - usage = "/EMA-display-team show", + usage = "/ema-display-team show", get = false, set = "ShowTeamListCommand", }, diff --git a/Modules/Follow.lua b/Modules/Follow.lua index 8af39b7..5830884 100644 --- a/Modules/Follow.lua +++ b/Modules/Follow.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -80,11 +80,19 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-team config", + get = false, + set = "", + }, push = { type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_SETTINGS_INFO"], - usage = "/EMA-follow push", + usage = "/ema-follow push", get = false, set = "EMASendSettings", }, @@ -92,7 +100,7 @@ function EMA:GetConfiguration() type = "input", name = L["FOLLOW_MASTER"], desc = L["FOLLOW_MASTER_HELP"], - usage = "/EMA-follow master <tag>", + usage = "/ema-follow master <group>", get = false, set = "FollowMasterCommand", }, @@ -100,7 +108,7 @@ function EMA:GetConfiguration() type = "input", name = L["FOLLOW_TARGET"], desc = L["FOLLOW_TARGET_HELP"], - usage = "/EMA-follow target <target> <tag>", + usage = "/ema-follow target <target> <group>", get = false, set = "FollowTargetCommand", }, @@ -108,13 +116,13 @@ function EMA:GetConfiguration() type = "input", name = L["FOLLOW_AFTER_COMBAT"], desc = L["FOLLOW_AFTER_COMBAT_HELP"], - usage = "/EMA-follow aftercombat <on|off> <tag>", + usage = "/ema-follow aftercombat <on|off> <group>", }, strobeOn = { type = "input", name = L["FOLLOW_STROBING"], desc = L["FOLLOW_STROBING_HELP"], - usage = "/EMA-follow strobeon <target> <tag>", + usage = "/ema-follow strobeon <target> <group>", get = false, set = "FollowStrobeOnCommand", }, @@ -122,7 +130,7 @@ function EMA:GetConfiguration() type = "input", name = L["FOLLOW_STROBING_ME"], desc = L["FOLLOW_STROBING_ME_HELP"], - usage = "/EMA-follow strobeonme <tag>", + usage = "/ema-follow strobeonme <group>", get = false, set = "FollowStrobeOnMeCommand", }, @@ -130,7 +138,7 @@ function EMA:GetConfiguration() type = "input", name = L["FOLLOW_STROBING_END"], desc = L["FOLLOW_STROBING_END_HELP"], - usage = "/EMA-follow strobeoff <tag>", + usage = "/ema-follow strobeoff <group>", get = false, set = "FollowStrobeOffCommand", }, @@ -138,7 +146,7 @@ function EMA:GetConfiguration() type = "input", name = L["FOLLOW_SET_MASTER"], desc = L["FOLLOW_SET_MASTER_HELP"], - usage = "/EMA-follow setmaster <name> <tag>", + usage = "/ema-follow setmaster <name> <group>", get = false, set = "CommandSetFollowMaster", }, @@ -146,7 +154,7 @@ function EMA:GetConfiguration() type = "input", name = L["TRAIN"], desc = L["TRAIN_HELP"], - usage = "/EMA-follow train <tag>", + usage = "/ema-follow train <group>", get = false, set = "CommandFollowTrain", }, @@ -154,7 +162,7 @@ function EMA:GetConfiguration() type = "input", name = L["FOLLOW_ME"], desc = L["FOLLOW_ME_HELP"], - usage = "/EMA-follow me <tag>", + usage = "/ema-follow me <group>", get = false, set = "CommandFollowMe", }, @@ -162,7 +170,7 @@ function EMA:GetConfiguration() type = "input", name = L["SNW"], desc = L["SNW_HELP"], - usage = "/EMA-follow snw", + usage = "/ema-follow snw", get = false, set = "SuppressNextFollowWarningCommand", }, @@ -649,7 +657,7 @@ function EMA:UPDATE_BINDINGS() if key2 then SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowSecureButtonFollowStrobeOff" ) end - local key1, key2 = GetBindingKey( "FOLLOWTEAIN" ) + local key1, key2 = GetBindingKey( "FOLLOWTEAIN" ) if key1 then SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowSecureButtonFollowTrain" ) end diff --git a/Modules/Guild.lua b/Modules/Guild.lua index 093c71c..6cc9206 100644 --- a/Modules/Guild.lua +++ b/Modules/Guild.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -41,9 +41,15 @@ EMA.moduleOrder = 20 -- Settings - the values to store and their defaults for the settings database. EMA.settings = { + global = { + ['**'] = { + autoGuildItemsListGlobal = {}, + }, + }, profile = { messageArea = EMAApi.DefaultMessageArea(), showEMAGuildWindow = false, + globalGuildList = false, blackListItem = false, guildBoEItems = false, autoGuildBankTabBoE = "1", @@ -51,7 +57,7 @@ EMA.settings = { autoBoEItemTag = EMAApi.AllGroup(), guildCRItems = false, autoGuildBankTabCR = "1", - autoCRItemTag = EMAApi.AllGroup(), + autoGuildCRItemTag = EMAApi.AllGroup(), autoGuildItemsList = {}, adjustMoneyWithGuildBank = false, goldAmountToKeepOnToon = 250, @@ -68,15 +74,31 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-guild config", + get = false, + set = "", + }, push = { type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_ALL_SETTINGS"], - usage = "/EMA-Guild push", + usage = "/ema-guild push", get = false, set = "EMASendSettings", guiHidden = true, }, + copy = { + type = "input", + name = L["COPY"], + desc = L["COPY_HELP"], + usage = "/ema-guild copy", + get = false, + set = "CopyListCommmand", + }, }, } return configuration @@ -216,13 +238,22 @@ function EMA:SettingsCreateGuild( top ) movingTop = movingTop - headingHeight EMA.settingsControl.checkBoxShowEMAGuildWindow = EMAHelperSettings:CreateCheckBox( EMA.settingsControl, - headingWidth, - left2, + halfWidth, + left, movingTop, L["GUILD_LIST"], EMA.SettingsToggleShowEMAGuildWindow, L["GUILD_LIST_HELP"] ) + EMA.settingsControl.checkBoxGlobalGuildList = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + halfWidth, + left3, + movingTop, + L["GLOBAL_LIST"], + EMA.SettingsToggleGlobalGuildList, + L["GLOBAL_SETTINGS_LIST_HELP"] + ) movingTop = movingTop - checkBoxHeight EMA.settingsControl.GuildItemsHighlightRow = 1 EMA.settingsControl.GuildItemsOffset = 1 @@ -547,7 +578,7 @@ function EMA:GBTabDropDownListCR (event, value ) if value == " " or value == nil then return end - EMA.db.autoGuildBankTabCR = value + EMA.db.autoGuildBankTabCR = tonumber(value) EMA:SettingsRefresh() end @@ -558,7 +589,7 @@ function EMA:GroupListDropDownListCR (event, value ) end for index, groupName in ipairs( EMAApi.GroupList() ) do if index == value then - EMA.db.autoCRItemTag = groupName + EMA.db.autoGuildCRItemTag = groupName break end end @@ -580,6 +611,11 @@ function EMA:SettingsSetMessageArea( event, value ) EMA:SettingsRefresh() end +function EMA:SettingsToggleGlobalGuildList( event, checked ) + EMA.db.globalGuildList = checked + EMA:SettingsRefresh() +end + function EMA:SettingsToggleShowEMAGuildWindow( event, checked ) EMA.db.showEMAGuildWindow = checked EMA:SettingsRefresh() @@ -603,20 +639,29 @@ function EMA:EditBoxChangedGoldAmountToLeaveOnToon( event, text ) EMA:SettingsRefresh() end +function EMA:CopyListCommmand() + EMA:Print("Copying Local List To Global List") + EMA.db.global.autoGuildItemsListGlobal = EMAUtilities:CopyTable( EMA.db.autoGuildItemsList ) + EMA:SettingsRefresh() +end + + -- Settings received. function EMA:EMAOnSettingsReceived( characterName, settings ) if characterName ~= EMA.characterName then -- Update the settings. EMA.db.messageArea = settings.messageArea EMA.db.showEMAGuildWindow = settings.showEMAGuildWindow + EMA.db.globalGuildList = settings.globalGuildList EMA.db.guildTagName = settings.guildTagName EMA.db.guildBoEItems = settings.guildBoEItems EMA.db.autoGuildBankTabBoE = settings.autoGuildBankTabBoE EMA.db.autoBoEItemTag = settings.autoBoEItemTag EMA.db.guildCRItems = settings.guildCRItems EMA.db.autoGuildBankTabCR = settings.autoGuildBankTabCR - EMA.db.autoCRItemTag = settings.autoCRItemTag + EMA.db.autoGuildCRItemTag = settings.autoGuildCRItemTag EMA.db.autoGuildItemsList = EMAUtilities:CopyTable( settings.autoGuildItemsList ) + EMA.db.global.autoGuildItemsListGlobal = EMAUtilities:CopyTable( settings.global.autoGuildItemsListGlobal ) EMA.db.adjustMoneyWithGuildBank = settings.adjustMoneyWithGuildBank EMA.db.goldAmountToKeepOnToon = settings.goldAmountToKeepOnToon -- Refresh the settings. @@ -635,6 +680,9 @@ end function EMA:SettingsRefresh() EMA.settingsControl.checkBoxShowEMAGuildWindow:SetValue( EMA.db.showEMAGuildWindow ) + -- global CheckBox + EMA.settingsControl.checkBoxGlobalGuildList:SetValue( EMA.db.globalGuildList ) + EMA.settingsControl.checkBoxGlobalGuildList:SetDisabled( not EMA.db.showEMAGuildWindow ) EMA.settingsControl.GuildItemsEditBoxGuildTag:SetText( EMA.db.guildTagName ) EMA.settingsControl.checkBoxGuildBoEItems:SetValue( EMA.db.guildBoEItems ) EMA.settingsControl.listCheckBoxBoxOtherBlackListItem:SetValue( EMA.db.blackListItem ) @@ -642,7 +690,7 @@ function EMA:SettingsRefresh() EMA.settingsControl.guildTradeBoEItemsTagBoE:SetText( EMA.db.autoBoEItemTag ) EMA.settingsControl.checkBoxGuildCRItems:SetValue( EMA.db.guildCRItems ) EMA.settingsControl.tabNumListDropDownListCR:SetText( EMA.db.autoGuildBankTabCR ) - EMA.settingsControl.guildTradeCRItemsTagCR:SetText( EMA.db.autoCRItemTag ) + EMA.settingsControl.guildTradeCRItemsTagCR:SetText( EMA.db.autoGuildCRItemTag ) EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea ) EMA.settingsControl.checkBoxAdjustMoneyOnToonViaGuildBank:SetValue( EMA.db.adjustMoneyWithGuildBank ) EMA.settingsControl.editBoxGoldAmountToLeaveOnToon:SetText( tostring( EMA.db.goldAmountToKeepOnToon ) ) @@ -676,11 +724,19 @@ end ------------------------------------------------------------------------------------------------------------- function EMA:GetGuildItemsMaxPosition() - return #EMA.db.autoGuildItemsList + if EMA.db.globalGuildList == true then + return #EMA.db.global.autoGuildItemsListGlobal + else + return #EMA.db.autoGuildItemsList + end end function EMA:GetGuildItemsAtPosition( position ) - return EMA.db.autoGuildItemsList[position] + if EMA.db.globalGuildList == true then + return EMA.db.global.autoGuildItemsListGlobal[position] + else + return EMA.db.autoGuildItemsList[position] + end end function EMA:AddItem( itemLink, GBTab, itemTag, blackList ) @@ -695,14 +751,22 @@ function EMA:AddItem( itemLink, GBTab, itemTag, blackList ) itemInformation.GBTab = GBTab itemInformation.tag = itemTag itemInformation.blackList = blackList + if EMA.db.globalGuildList == true then + table.insert( EMA.db.global.autoGuildItemsListGlobal, itemInformation ) + else table.insert( EMA.db.autoGuildItemsList, itemInformation ) - EMA:SettingsRefresh() - EMA:SettingsGuildItemsRowClick( 1, 1 ) + end + EMA:SettingsRefresh() + EMA:SettingsGuildItemsRowClick( 1, 1 ) end end function EMA:RemoveItem() - table.remove( EMA.db.autoGuildItemsList, EMA.settingsControl.GuildItemsHighlightRow ) + if EMA.db.globalGuildList == true then + table.remove( EMA.db.global.autoGuildItemsListGlobal, EMA.settingsControl.listHighlightRow ) + else + table.remove( EMA.db.autoGuildItemsList, EMA.settingsControl.GuildItemsHighlightRow ) + end EMA:SettingsRefresh() EMA:SettingsGuildItemsRowClick( EMA.settingsControl.GuildItemsHighlightRow - 1, 1 ) end @@ -717,7 +781,7 @@ function EMA:GUILDBANKFRAME_OPENED() end function EMA:AddAllToGuildBank() - local delay = 1 + local delay = 0 for bagID = 0, NUM_BAG_SLOTS do for slotID = 1,GetContainerNumSlots( bagID ),1 do --EMA:Print( "Bags OK. checking", itemLink ) @@ -747,15 +811,21 @@ function EMA:AddAllToGuildBank() end if EMA.db.guildCRItems == true then if isCraftingReagent == true then - if EMAApi.IsCharacterInGroup( EMA.characterName, EMA.db.autoCRItemTag ) == true then + if EMAApi.IsCharacterInGroup( EMA.characterName, EMA.db.autoGuildCRItemTag ) == true then if isBop == false then canPlace = true - bankTab = EMA.db.autoGuildBankTabCR + bankTab = EMA.db.autoGuildBankTabCR end end end end - for position, itemInformation in pairs( EMA.db.autoGuildItemsList ) do + + if EMA.db.globalGuildList == true then + itemTable = EMA.db.global.autoGuildItemsListGlobal + else + itemTable = EMA.db.autoGuildItemsList + end + for position, itemInformation in pairs( itemTable ) do if EMAUtilities:DoItemLinksContainTheSameItem( itemLink, itemInformation.link ) then if EMAApi.IsCharacterInGroup( EMA.characterName, itemInformation.tag ) == true then --EMA:Print("DataTest", itemInformation.link, itemInformation.blackList ) @@ -768,8 +838,9 @@ function EMA:AddAllToGuildBank() end end end + -- EMA:Print("tester", canPlace, bankTab, itemLink, "a", bagID, slotID ) if canPlace == true and bankTab ~= 0 then - delay = delay + 3 + delay = delay + 1 EMA:ScheduleTimer("PlaceItemInGuildBank", delay , bagID, slotID, bankTab ) end end @@ -794,10 +865,10 @@ function EMA:PlaceItemInGuildBank(bagID, slotID, tab) for slot = 1, MAX_GUILDBANK_SLOTS_PER_TAB or 98 do local texture, count, locked = GetGuildBankItemInfo(tab, slot) if not locked then - PickupContainerItem( bagID ,slotID ) + --PickupContainerItem( bagID ,slotID ) UseContainerItem( bagID ,slotID ) end - end + end end end end diff --git a/Modules/ISBoxer.lua b/Modules/ISBoxer.lua index 347d3ae..c8e0440 100644 --- a/Modules/ISBoxer.lua +++ b/Modules/ISBoxer.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -59,6 +59,14 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-isboxer config", + get = false, + set = "", + }, push = { type = "input", name = L["PUSH_SETTINGS"], diff --git a/Modules/Information.lua b/Modules/Information.lua index 43a8b4a..d41e940 100644 --- a/Modules/Information.lua +++ b/Modules/Information.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -85,6 +85,11 @@ EMA.currTypes.RichAzeriteFragment = 1565 EMA.currTypes.SeafarersDubloon = 1710 EMA.currTypes.SealofWartornFate = 1580 EMA.currTypes.WarSupplies = 1587 +--8.1 +EMA.currTypes.SeventhLegionService = 1717 +EMA.currTypes.HonorboundService = 1716 +EMA.currTypes.TitanResiduum = 1718 + -------------------------------------- End of edit -------------------------------------------------------------- @@ -150,11 +155,19 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-information config", + get = false, + set = "", + }, show = { type = "input", name = L["SHOW_CURRENCY"], desc = L["SHOW_CURRENCY_HELP"], - usage = "/EMA-curr show", + usage = "ema-information show", get = false, set = "EMAToonRequestCurrency", }, @@ -162,7 +175,7 @@ function EMA:GetConfiguration() type = "input", name = L["HIDE_CURRENCY"], desc = L["HIDE_CURRENCY_HELP"], - usage = "/EMA-curr hide", + usage = "ema-information hide", get = false, set = "EMAToonHideCurrency", }, @@ -170,7 +183,7 @@ function EMA:GetConfiguration() type = "input", name = L["PUSH_ALL_SETTINGS"], desc = L["PUSH_SETTINGS_INFO"], - usage = "/EMA-curr push", + usage = "ema-information push", get = false, set = "EMASendSettings", }, diff --git a/Modules/Interaction.lua b/Modules/Interaction.lua index d7a184b..d89321a 100644 --- a/Modules/Interaction.lua +++ b/Modules/Interaction.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -51,7 +51,8 @@ EMA.settings = { --Loot autoLoot = false, tellBoERare = false, - tellBoEEpic = false, + tellBoEEpic = false, + tellBoEMount = false, messageArea = EMAApi.DefaultMessageArea(), warningArea = EMAApi.DefaultWarningArea() }, @@ -67,11 +68,19 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-interaction config", + get = false, + set = "", + }, push = { type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_SETTINGS_INFO"], - usage = "/EMA-interaction push", + usage = "/ema-interaction push", get = false, set = "EMASendSettings", order = 4, @@ -290,6 +299,16 @@ function EMA:SettingsCreateTaxi( top ) EMA.SettingsToggleTellBoEEpic, L["TELL_TEAM_BOE_EPIC_HELP"] ) + movingTop = movingTop - checkBoxHeight + EMA.settingsControl.checkBoxTellBoEMount = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["TELL_TEAM_BOE_MOUNT"] , + EMA.SettingsToggleTellBoEMount, + L["TELL_TEAM_BOE_MOUNT_HELP"] + ) movingTop = movingTop - sliderHeight - verticalSpacing EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown( EMA.settingsControl, @@ -380,6 +399,11 @@ function EMA:SettingsToggleTellBoEEpic( event, checked ) EMA:SettingsRefresh() end +function EMA:SettingsToggleTellBoEMount( event, checked ) + EMA.db.tellBoEMount = checked + EMA:SettingsRefresh() +end + -- Settings received. function EMA:EMAOnSettingsReceived( characterName, settings ) if characterName ~= EMA.characterName then @@ -396,7 +420,7 @@ function EMA:EMAOnSettingsReceived( characterName, settings ) EMA.db.autoLoot = settings.autoLoot EMA.db.tellBoERare = settings.tellBoERare EMA.db.tellBoEEpic = settings.tellBoEEpic - + EMA.db.tellBoEMount = settings.tellBoEMount EMA.db.messageArea = settings.messageArea EMA.db.warningArea = settings.warningArea -- Refresh the settings. @@ -426,6 +450,7 @@ function EMA:SettingsRefresh() EMA.settingsControl.checkBoxAutoLoot:SetValue( EMA.db.autoLoot ) EMA.settingsControl.checkBoxTellBoERare:SetValue( EMA.db.tellBoERare ) EMA.settingsControl.checkBoxTellBoEEpic:SetValue( EMA.db.tellBoEEpic ) + EMA.settingsControl.checkBoxTellBoEMount:SetValue( EMA.db.tellBoEMount ) -- Set state. EMA.settingsControl.checkBoxDismountWithTeam:SetDisabled( not EMA.db.mountWithTeam ) EMA.settingsControl.checkBoxDismountWithMaster:SetDisabled( not EMA.db.dismountWithTeam or not EMA.db.mountWithTeam ) @@ -720,19 +745,21 @@ function EMA:doLoot( tries ) local _, name, _, _, lootQuality, locked = GetLootSlotInfo(slot) --EMA:Print("items", slot, locked, name, tries) if locked ~= nil and ( not locked ) then + --DEBUG + --EMA:ScheduleTimer( "TellTeamEpicBoE", 1 , "Minion of Grumpus") + -- if EMA.db.tellBoERare == true then if lootQuality == 3 then EMA:ScheduleTimer( "TellTeamEpicBoE", 1 , name) end end - if EMA.db.tellBoEEpic == true then + if EMA.db.tellBoEEpic == true or EMA.db.tellBoEMount == true then if lootQuality == 4 then EMA:ScheduleTimer( "TellTeamEpicBoE", 1 , name) end - end + end ---EMA:Print("canLoot", "slot", slot, "name", name ) LootSlot(slot) - numloot = GetNumLootItems() end end @@ -749,7 +776,7 @@ end function EMA:doLootLoop( tries ) --EMA:Print("loop", tries) - EMA:ScheduleTimer("doLoot", 0.5, tries ) + EMA:ScheduleTimer("doLoot", 0.6, tries ) end function EMA:EnableAutoLoot() @@ -766,11 +793,12 @@ function EMA:TellTeamEpicBoE( name ) for bagID = 0, NUM_BAG_SLOTS do for slotID = 1,GetContainerNumSlots( bagID ),1 do --EMA:Print( "Bags OK. checking", itemLink ) + local rarity = nil local item = Item:CreateFromBagAndSlot(bagID, slotID) if ( item ) then local bagItemName = item:GetItemName() - if ( bagItemName ) then - if bagItemName == name then + if ( bagItemName ) then + if bagItemName == name then --EMA:Print("test", bagItemName) local location = item:GetItemLocation() local itemLink = item:GetItemLink() @@ -781,16 +809,31 @@ function EMA:TellTeamEpicBoE( name ) --EMA:Print("loottest", itemLink, itemRarity , itemType ) if isBop == false then --EMA:Print("test", isBop ) - local rarity = nil - if itemRarity == 4 then - rarity = L["EPIC"] - else - rarity = L["RARE"] - end - --EMA:Print("I have looted a Epic BOE Item: ", rarity, itemName ) - EMA:EMASendMessageToTeam( EMA.db.messageArea, L["I_HAVE_LOOTED_X_Y_ITEM"]( rarity, itemLink ), false ) - end - end + if itemRarity == 4 then + rarity = L["EPIC"] + else + rarity = L["RARE"] + end + end + else + if EMA.db.tellBoEMount == true then + if isBop == false then + local mountIDs = C_MountJournal.GetMountIDs() + for i = 1, #mountIDs do + local creatureName, mountSpellID,_,_,_,_,_,_,_,_, isCollected, mountID = C_MountJournal.GetMountInfoByID(mountIDs[i]) + --EMA:Print("test2", itemLink) + if name == creatureName then + --EMA:Print("FoundAMount", bagItemName) + rarity = L["MOUNT"] + end + end + end + end + --EMA:Print("I have looted a Epic BOE Item: ", rarity, itemLink ) + if rarity ~= nil then + EMA:EMASendMessageToTeam( EMA.db.messageArea, L["I_HAVE_LOOTED_X_Y_ITEM"]( rarity, itemLink ), false ) + end + end end end end diff --git a/Modules/ItemUse.lua b/Modules/ItemUse.lua index d14facf..d65bc20 100644 --- a/Modules/ItemUse.lua +++ b/Modules/ItemUse.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -109,11 +109,19 @@ function EMA:GetConfiguration() handler = EMA, type = 'group', args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-team config", + get = false, + set = "", + }, push = { type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_SETTINGS_INFO"], - usage = "/EMA-item-use push", + usage = "/ema-item-use push", get = false, set = "EMASendSettings", }, @@ -121,7 +129,7 @@ function EMA:GetConfiguration() type = "input", name = L["HIDE_ITEM_BAR"], desc = L["HIDE_ITEM_BAR_HELP"], - usage = "/EMA-item-use hide", + usage = "/ema-item-use hide", get = false, set = "HideItemUseCommand", }, @@ -129,7 +137,7 @@ function EMA:GetConfiguration() type = "input", name = L["SHOW_ITEM_BAR"], desc = L["SHOW_ITEM_BAR_HELP"], - usage = "/EMA-item-use show", + usage = "/ema-item-use show", get = false, set = "ShowItemUseCommand", }, @@ -137,7 +145,7 @@ function EMA:GetConfiguration() type = "input", name = L["CLEAR_ITEM_BAR"], desc = L["CLEAR_ITEM_BAR_HELP"], - usage = "/EMA-item-use clear", + usage = "/ema-item-use clear", get = false, set = "ClearItemUseCommand", }, @@ -361,10 +369,12 @@ function EMA:UpdateQuestItemsInBar() local kind = itemInfo.kind local action = itemInfo.action if kind == "item" then - local itemLink,_,_,_,_,questItem = GetItemInfo( action ) + --local itemLink,_,_,_,_,questItem = GetItemInfo( action ) + --local text, text2 = EMAUtilities:TooltipScaner( action ) + local _, _, _, _, _, _ , _, _, _, _, _, _, _, bindType = GetItemInfo( action ) local canUse = GetItemSpell( action ) - --EMA:Print("Checking Item...", itemLink, action, questItem ) - if ( canUse ) and questItem == QUEST then + --EMA:Print("Checking Item...", action, canUse, "a", bindType ) + if ( canUse ) and ( bindType == 4 ) then local IsInInventory = EMA:IsInInventory( action ) if IsInInventory == false then --EMA:Print("NOT IN BAGS", IsInInventory, action) diff --git a/Modules/LDBBar.lua b/Modules/LDBBar.lua index a0a40d1..3eb7351 100644 --- a/Modules/LDBBar.lua +++ b/Modules/LDBBar.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- diff --git a/Modules/Mail.lua b/Modules/Mail.lua index 2a139f9..b4e6dff 100644 --- a/Modules/Mail.lua +++ b/Modules/Mail.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -41,9 +41,15 @@ EMA.moduleOrder = 20 -- Settings - the values to store and their defaults for the settings database. EMA.settings = { + global = { + ['**'] = { + autoMailItemsListGlobal = {}, + }, + }, profile = { messageArea = EMAApi.DefaultMessageArea(), showEMAMailWindow = false, + globalMailList = false, blackListItem = false, MailBoEItems = false, autoMailToonNameBoE = "", @@ -71,15 +77,31 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-mail config", + get = false, + set = "", + }, push = { type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_ALL_SETTINGS"], - usage = "/EMA-Mail push", + usage = "/ema-mail push", get = false, set = "EMASendSettings", guiHidden = true, }, + copy = { + type = "input", + name = L["COPY"], + desc = L["COPY_HELP"], + usage = "/ema-mail copy", + get = false, + set = "CopyListCommmand", + }, }, } return configuration @@ -198,13 +220,22 @@ function EMA:SettingsCreateMail( top ) movingTop = movingTop - headingHeight EMA.settingsControl.checkBoxShowEMAMailWindow = EMAHelperSettings:CreateCheckBox( EMA.settingsControl, - headingWidth, - left2, + halfWidth, + left, movingTop, L["MAIL_LIST"], EMA.SettingsToggleShowEMAMailWindow, L["MAIL_LIST_HELP"] ) + EMA.settingsControl.checkBoxGlobalMailList = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + halfWidth, + left3, + movingTop, + L["GLOBAL_LIST"], + EMA.SettingsToggleGlobalMailList, + L["GLOBAL_SETTINGS_LIST_HELP"] + ) movingTop = movingTop - checkBoxHeight EMA.settingsControl.MailItemsHighlightRow = 1 EMA.settingsControl.MailItemsOffset = 1 @@ -592,6 +623,11 @@ function EMA:SettingsToggleShowEMAMailWindow( event, checked ) EMA:SettingsRefresh() end +function EMA:SettingsToggleGlobalMailList( event, checked ) + EMA.db.globalMailList = checked + EMA:SettingsRefresh() +end + -- Gold Stuff! function EMA:SettingsToggleAdjustMoneyOnToonViaMail( event, checked ) @@ -630,6 +666,11 @@ function EMA:EditMailToonNameGold (event, value ) EMA:SettingsRefresh() end +function EMA:CopyListCommmand() + EMA:Print("Copying Local List To Global List") + EMA.db.global.autoMailItemsListGlobal = EMAUtilities:CopyTable( EMA.db.autoMailItemsList ) + EMA:SettingsRefresh() +end -- Settings received. function EMA:EMAOnSettingsReceived( characterName, settings ) @@ -637,6 +678,7 @@ function EMA:EMAOnSettingsReceived( characterName, settings ) -- Update the settings. EMA.db.messageArea = settings.messageArea EMA.db.showEMAMailWindow = settings.showEMAMailWindow + EMA.db.globalMailList = settings.globalMailList EMA.db.MailTagName = settings.MailTagName EMA.db.MailBoEItems = settings.MailBoEItems EMA.db.autoMailToonNameBoE = settings.autoMailToonNameBoE @@ -645,6 +687,7 @@ function EMA:EMAOnSettingsReceived( characterName, settings ) EMA.db.autoMailToonNameCR = settings.autoMailToonNameCR EMA.db.autoCRItemTag = settings.autoCRItemTag EMA.db.autoMailItemsList = EMAUtilities:CopyTable( settings.autoMailItemsList ) + EMA.db.global.autoMailItemsListGlobal = EMAUtilities:CopyTable( settings.global.autoMailItemsListGlobal ) EMA.db.adjustMoneyWithMail = settings.adjustMoneyWithMail EMA.db.goldAmountToKeepOnToon = settings.goldAmountToKeepOnToon EMA.db.autoMailToonNameGold = settings.autoMailToonNameGold @@ -665,6 +708,9 @@ end function EMA:SettingsRefresh() EMA.settingsControl.checkBoxShowEMAMailWindow:SetValue( EMA.db.showEMAMailWindow ) +-- global CheckBox + EMA.settingsControl.checkBoxGlobalMailList:SetValue( EMA.db.globalMailList ) + EMA.settingsControl.checkBoxGlobalMailList:SetDisabled( not EMA.db.showEMAMailWindow ) EMA.settingsControl.MailItemsEditBoxMailTag:SetText( EMA.db.MailTagName ) EMA.settingsControl.listCheckBoxBoxOtherBlackListItem:SetValue( EMA.db.blackListItem ) EMA.settingsControl.checkBoxMailBoEItems:SetValue( EMA.db.MailBoEItems ) @@ -712,11 +758,19 @@ end ------------------------------------------------------------------------------------------------------------- function EMA:GetMailItemsMaxPosition() - return #EMA.db.autoMailItemsList + if EMA.db.globalMailList == true then + return #EMA.db.global.autoMailItemsListGlobal + else + return #EMA.db.autoMailItemsList + end end function EMA:GetMailItemsAtPosition( position ) - return EMA.db.autoMailItemsList[position] + if EMA.db.globalMailList == true then + return EMA.db.global.autoMailItemsListGlobal[position] + else + return EMA.db.autoMailItemsList[position] + end end function EMA:AddItem( itemLink, GBTab, itemTag, blackList ) @@ -731,14 +785,22 @@ function EMA:AddItem( itemLink, GBTab, itemTag, blackList ) itemInformation.GBTab = GBTab itemInformation.tag = itemTag itemInformation.blackList = blackList + if EMA.db.globalMailList == true then + table.insert( EMA.db.global.autoMailItemsListGlobal, itemInformation ) + else table.insert( EMA.db.autoMailItemsList, itemInformation ) - EMA:SettingsRefresh() - EMA:SettingsMailItemsRowClick( 1, 1 ) + end + EMA:SettingsRefresh() + EMA:SettingsMailItemsRowClick( 1, 1 ) end end function EMA:RemoveItem() - table.remove( EMA.db.autoMailItemsList, EMA.settingsControl.MailItemsHighlightRow ) + if EMA.db.globalMailList == true then + table.remove( EMA.db.global.autoMailItemsListGlobal, EMA.settingsControl.listHighlightRow ) + else + table.remove( EMA.db.autoMailItemsList, EMA.settingsControl.MailItemsHighlightRow ) + end EMA:SettingsRefresh() EMA:SettingsMailItemsRowClick( EMA.settingsControl.MailItemsHighlightRow - 1, 1 ) end @@ -754,8 +816,7 @@ function EMA:MAIL_SHOW(event, ...) end end if EMA.db.adjustMoneyWithMail == true and EMA.db.showEMAMailWindow == true then - EMA:ScheduleTimer( "AddGoldToMailBox", 0.1 ) - -- AddGoldToMailBox() + EMA:ScheduleTimer( "AddGoldToMailBox", 0.3 ) end end @@ -810,7 +871,12 @@ function EMA:AddAllToMailBox() end end end - for position, itemInformation in pairs( EMA.db.autoMailItemsList ) do + if EMA.db.globalMailList == true then + itemTable = EMA.db.global.autoMailItemsListGlobal + else + itemTable = EMA.db.autoMailItemsList + end + for position, itemInformation in pairs( itemTable ) do if EMAUtilities:DoItemLinksContainTheSameItem( itemLink, itemInformation.link ) then if EMAApi.IsCharacterInGroup( EMA.characterName, itemInformation.tag ) == true then --EMA:Print("DataTest", itemInformation.link, itemInformation.blackList ) @@ -841,13 +907,18 @@ function EMA:AddAllToMailBox() end end end - EMA:ScheduleTimer( "DoSendMail", 0.8, nil ) + EMA:ScheduleTimer( "DoSendMail", 1, nil ) end function EMA:MAIL_SEND_SUCCESS( event, ... ) --EMA:Print("try sendMail Again") - if EMA.ShiftkeyDown == false and EMA.Count < 1 then - EMA:ScheduleTimer( "AddAllToMailBox", 1, nil ) + if EMA.db.showEMAMailWindow == true then + if EMA.ShiftkeyDown == false and EMA.Count < 1 then + EMA:ScheduleTimer( "AddAllToMailBox", 1, nil ) + end + end + if EMA.db.adjustMoneyWithMail == true and EMA.db.showEMAMailWindow == true then + EMA:ScheduleTimer( "AddGoldToMailBox", 2 ) end end @@ -882,18 +953,24 @@ function EMA:AddGoldToMailBox() if moneyToDepositOrWithdraw > 0 and HasSendMailItem("1") == false then local currentMailToon = SendMailNameEditBox:GetText() local characterName = EMAUtilities:AddRealmToNameIfMissing( toonName ) - if toonName == currentMailToon or currentMailToon == "" and characterName ~= EMA.characterName then - if EMAApi.IsCharacterInGroup( EMA.characterName, EMA.db.autoMailMoneyTag ) == true then - local gold, silver, copper = EMAUtilities:MoneyString( moneyToDepositOrWithdraw ) - local coinText = GetCoinText( moneyToDepositOrWithdraw ) - --EMA:Print("Send", "gold", gold, "silver", silver, "copper", copper ) - SendMailSubjectEditBox:SetText( (L["SENT_AUTO_MAILER_GOLD"](coinText) ) ) - SendMailNameEditBox:SetText( toonName ) - SendMailMoneyGold:SetText(gold) - SendMailMoneySilver:SetText(silver) - SendMailMoneyCopper:SetText(copper) - EMA:ScheduleTimer( "DoSendMail", 0.8, true ) - end - end - end + if MailFrame:IsVisible() == true then + --EMA:Print("blizzardFarme") + if toonName == currentMailToon or currentMailToon == "" and characterName ~= EMA.characterName then + if EMAApi.IsCharacterInGroup( EMA.characterName, EMA.db.autoMailMoneyTag ) == true then + local gold, silver, copper = EMAUtilities:MoneyString( moneyToDepositOrWithdraw ) + local coinText = GetCoinText( moneyToDepositOrWithdraw ) + --EMA:Print("Send", "gold", gold, "silver", silver, "copper", copper ) + MailFrameTab_OnClick(nil, "2") + SendMailSubjectEditBox:SetText( (L["SENT_AUTO_MAILER_GOLD"](coinText) ) ) + SendMailNameEditBox:SetText( toonName ) + SendMailMoneyGold:SetText(gold) + SendMailMoneySilver:SetText(silver) + SendMailMoneyCopper:SetText(copper) + EMA:ScheduleTimer( "DoSendMail", 1, true ) + end + end + else + EMA:Print("[PH] Can Only Mail From BlizzardUI Mail Frame!") + end + end end \ No newline at end of file diff --git a/Modules/Modules.xml b/Modules/Modules.xml index 60007ce..8c3ab38 100644 --- a/Modules/Modules.xml +++ b/Modules/Modules.xml @@ -1,7 +1,7 @@ <!-- EMA - ( Ebony's MultiBoxing Assistant ) Current Author: Jennifer Cally (Ebony) - License: All Rights Reserved 2018 Jennifer Cally + License: All Rights Reserved 2018-2019 Jennifer Cally Some Code Used from 'Jamba' that is Released under the MIT License diff --git a/Modules/Purchase.lua b/Modules/Purchase.lua index 1e49e29..f278180 100644 --- a/Modules/Purchase.lua +++ b/Modules/Purchase.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -38,9 +38,15 @@ EMA.moduleOrder = 60 -- Settings - the values to store and their defaults for the settings database. EMA.settings = { + global = { + ['**'] = { + autoBuyItemsListGlobal = {}, + }, + }, profile = { autoBuy = false, autoBuyOverflow = true, + globalBuyList = false, messageArea = EMAApi.DefaultMessageArea(), autoBuyItems = {} }, @@ -56,14 +62,30 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-purchase config", + get = false, + set = "", + }, push = { type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_ALL_SETTINGS"], - usage = "/EMA-purchase push", + usage = "/ema-purchase push", get = false, set = "EMASendSettings", }, + copy = { + type = "input", + name = L["COPY"], + desc = L["COPY_HELP"], + usage = "/ema-purchase copy", + get = false, + set = "CopyListCommmand", + }, }, } return configuration @@ -90,6 +112,9 @@ end function EMA:SettingsRefresh() EMA.settingsControl.checkBoxAutoBuy:SetValue( EMA.db.autoBuy ) + -- global CheckBox + EMA.settingsControl.checkBoxGlobalBuyList:SetValue( EMA.db.globalBuyList ) + EMA.settingsControl.checkBoxGlobalBuyList:SetDisabled( not EMA.db.autoBuy ) EMA.settingsControl.checkBoxAutoBuyOverflow:SetValue( EMA.db.autoBuyOverflow ) EMA.settingsControl.editBoxTag:SetText( EMA.autoBuyItemTag ) EMA.settingsControl.editBoxAmount:SetText( EMA.autoBuyAmount ) @@ -108,9 +133,11 @@ function EMA:EMAOnSettingsReceived( characterName, settings ) if characterName ~= EMA.characterName then -- Update the settings. EMA.db.autoBuy = settings.autoBuy + EMA.db.globalBuyList = settings.globalBuyList EMA.db.autoBuyOverflow = settings.autoBuyOverflow EMA.db.messageArea = settings.messageArea EMA.db.autoBuyItems = EMAUtilities:CopyTable( settings.autoBuyItems ) + EMA.db.global.autoBuyItemsListGlobal = EMAUtilities:CopyTable( settings.global.autoBuyItemsListGlobal ) -- Refresh the settings. EMA:SettingsRefresh() -- Tell the player. @@ -133,10 +160,14 @@ local function SettingsCreateOptions( top ) local headingHeight = EMAHelperSettings:HeadingHeight() local headingWidth = EMAHelperSettings:HeadingWidth( false ) local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing() + local indentContinueLabel = horizontalSpacing * 18 local verticalSpacing = EMAHelperSettings:GetVerticalSpacing() local halfWidth = (headingWidth - horizontalSpacing) / 2 - local left2 = left + halfWidth + horizontalSpacing + local thirdWidth = (headingWidth - indentContinueLabel) / 3 + local left2 = left + thirdWidth + horizontalSpacing + local left3 = left2 + thirdWidth + horizontalSpacing local dropBoxWidth = (headingWidth - horizontalSpacing) / 4 + local movingTop = top -- A blank to get layout to show right? EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false ) @@ -145,7 +176,7 @@ local function SettingsCreateOptions( top ) movingTop = movingTop - headingHeight EMA.settingsControl.checkBoxAutoBuy = EMAHelperSettings:CreateCheckBox( EMA.settingsControl, - halfWidth, + thirdWidth, left, movingTop, L["AUTO_BUY_ITEMS"], @@ -153,12 +184,21 @@ local function SettingsCreateOptions( top ) ) EMA.settingsControl.checkBoxAutoBuyOverflow = EMAHelperSettings:CreateCheckBox( EMA.settingsControl, - halfWidth, + thirdWidth, left2, movingTop, L["OVERFLOW"], EMA.SettingsToggleAutoBuyItemsOverflow ) + EMA.settingsControl.checkBoxGlobalBuyList = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + thirdWidth, + left3, + movingTop, + L["GLOBAL_LIST"], + EMA.SettingsToggleGlobalBuyList, + L["GLOBAL_SETTINGS_LIST_HELP"] + ) movingTop = movingTop - checkBoxHeight EMA.settingsControl.highlightRow = 1 EMA.settingsControl.offset = 1 @@ -189,7 +229,7 @@ local function SettingsCreateOptions( top ) EMA.settingsControl.buttonRemove = EMAHelperSettings:CreateButton( EMA.settingsControl, buttonControlWidth, - left, + left2 + 50, movingTop, L["REMOVE"], EMA.SettingsRemoveClick, @@ -200,8 +240,8 @@ local function SettingsCreateOptions( top ) movingTop = movingTop - headingHeight EMA.settingsControl.editBoxItem = EMAHelperSettings:CreateEditBox( EMA.settingsControl, - headingWidth, - left, + thirdWidth, + left2, movingTop, L["ITEM_DROP"] ) @@ -209,7 +249,7 @@ local function SettingsCreateOptions( top ) movingTop = movingTop - editBoxHeight EMA.settingsControl.editBoxTag = EMAHelperSettings:CreateDropdown( EMA.settingsControl, - dropBoxWidth, + thirdWidth, left, movingTop, L["GROUP_LIST"] @@ -219,7 +259,7 @@ local function SettingsCreateOptions( top ) EMA.settingsControl.editBoxAmount = EMAHelperSettings:CreateEditBox( EMA.settingsControl, dropBoxWidth, - left + dropBoxWidth + horizontalSpacing, + left3, movingTop, L["AMOUNT"] ) @@ -228,7 +268,7 @@ local function SettingsCreateOptions( top ) EMA.settingsControl.buttonAdd = EMAHelperSettings:CreateButton( EMA.settingsControl, buttonControlWidth, - left, + left2 + 50, movingTop, L["ADD"], EMA.SettingsAddClick @@ -337,6 +377,11 @@ function EMA:SettingsToggleAutoBuyItemsOverflow( event, checked ) EMA:SettingsRefresh() end +function EMA:SettingsToggleGlobalBuyList( event, checked ) + EMA.db.globalBuyList = checked + EMA:SettingsRefresh() +end + function EMA:SettingsRemoveClick( event ) StaticPopup_Show( "EMAPURCHASE_CONFIRM_REMOVE_AUTO_BUY_ITEM" ) end @@ -360,10 +405,6 @@ function EMA:GroupDropDownList (event, value ) EMA:SettingsRefresh() end - - - - function EMA:SettingsEditBoxChangedAmount( event, text ) if not text or text:trim() == "" or text:find( "^(%d+)$" ) == nil then EMA:Print( L["NUM_ERROR"] ) @@ -382,6 +423,12 @@ function EMA:SettingsAddClick( event ) end end +function EMA:CopyListCommmand() + EMA:Print("Copying Local List To Global List") + EMA.db.global.autoBuyItemsListGlobal = EMAUtilities:CopyTable( EMA.db.autoBuyItems ) + EMA:SettingsRefresh() +end + ------------------------------------------------------------------------------------------------------------- -- Popup Dialogs. ------------------------------------------------------------------------------------------------------------- @@ -436,11 +483,19 @@ end ------------------------------------------------------------------------------------------------------------- function EMA:GetItemsMaxPosition() - return #EMA.db.autoBuyItems + if EMA.db.globalBuyList == true then + return #EMA.db.global.autoBuyItemsListGlobal + else + return #EMA.db.autoBuyItems + end end function EMA:GetItemAtPosition( position ) - return EMA.db.autoBuyItems[position] + if EMA.db.globalBuyList == true then + return EMA.db.global.autoBuyItemsListGlobal[position] + else + return EMA.db.autoBuyItems[position] + end end function EMA:AddItem( itemLink, itemTag, amountToBuy ) @@ -453,14 +508,22 @@ function EMA:AddItem( itemLink, itemTag, amountToBuy ) itemInformation.name = name itemInformation.tag = itemTag itemInformation.amount = amountToBuy - table.insert( EMA.db.autoBuyItems, itemInformation ) + if EMA.db.globalBuyList == true then + table.insert( EMA.db.global.autoBuyItemsListGlobal, itemInformation ) + else + table.insert( EMA.db.autoBuyItems, itemInformation ) + end EMA:SettingsRefresh() EMA:SettingsRowClick( 1, 1 ) end end function EMA:RemoveItem() - table.remove( EMA.db.autoBuyItems, EMA.settingsControl.highlightRow ) + if EMA.db.globalBuyList == true then + table.remove( EMA.db.global.autoBuyItemsListGlobal, EMA.settingsControl.listHighlightRow ) + else + table.remove( EMA.db.autoBuyItems, EMA.settingsControl.highlightRow ) + end EMA:SettingsRefresh() EMA:SettingsRowClick( 1, 1 ) end @@ -481,7 +544,13 @@ function EMA:DoMerchantAutoBuy() local outOfMoney = false local outOfOtherCurrency = false -- Iterate all the wanted items... - for position, itemInfoTable in pairs( EMA.db.autoBuyItems ) do + if EMA.db.globalBuyList == true then + itemTable = EMA.db.global.autoBuyItemsListGlobal + else + itemTable = EMA.db.autoBuyItems + end + for position, itemInfoTable in pairs( itemTable ) do + local maxItemAmount = tonumber( itemInfoTable.amount ) local itemTag = itemInfoTable.tag local itemLink = itemInfoTable.link diff --git a/Modules/Quest.lua b/Modules/Quest.lua index f920d5c..f6650c9 100644 --- a/Modules/Quest.lua +++ b/Modules/Quest.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -93,11 +93,19 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-quest config", + get = false, + set = "", + }, push = { type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_SETTINGS_INFO"], - usage = "/EMA-quest push", + usage = "/ema-quest push", get = false, set = "EMASendSettings", }, diff --git a/Modules/QuestWatcher.lua b/Modules/QuestWatcher.lua index c3cf20a..09b7781 100644 --- a/Modules/QuestWatcher.lua +++ b/Modules/QuestWatcher.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -88,11 +88,19 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-quest-watcher config", + get = false, + set = "", + }, show = { type = "input", name = L["SHOW_QUEST_WATCHER"], desc = L["SHOW_QUEST_WATCHER_HELP"], - usage = "/EMA-quest-watcher show", + usage = "/ema-quest-watcher show", get = false, set = "ShowFrameCommand", }, @@ -100,7 +108,7 @@ function EMA:GetConfiguration() type = "input", name = L["HIDE_QUEST_WATCHER"] , desc = L["HIDE_QUEST_WATCHER_HELP"] , - usage = "/EMA-quest-watcher hide", + usage = "/ema-quest-watcher hide", get = false, set = "HideFrameCommand", }, @@ -108,7 +116,7 @@ function EMA:GetConfiguration() type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_SETTINGS_INFO"], - usage = "/EMA-quest-watcher push", + usage = "/ema-quest-watcher push", get = false, set = "EMASendSettings", }, @@ -279,8 +287,8 @@ function EMA:SettingsCreateQuestWatcherControl( top ) EMA.SettingsToggleEnableQuestWatcher, L["ENABLE_TRACKER_HELP"] ) - - movingTop = movingTop - checkBoxHeight +--[[ + movingTop = movingTop - checkBoxHeight EMA.settingsControlWatcher.checkBoxUnlockWatcherFrame = EMAHelperSettings:CreateCheckBox( EMA.settingsControlWatcher, headingWidth, @@ -290,6 +298,7 @@ function EMA:SettingsCreateQuestWatcherControl( top ) EMA.SettingsToggleUnlockWatcherFrame, L["UNLOCK_TRACKER_HELP"] ) +]] movingTop = movingTop - checkBoxHeight EMA.settingsControlWatcher.checkBoxHideBlizzardWatchFrame = EMAHelperSettings:CreateCheckBox( EMA.settingsControlWatcher, @@ -774,7 +783,7 @@ function EMA:SettingsRefresh() EMA.settingsControlWatcher.questWatchBorderColourPicker:SetColor( EMA.db.watchFrameBorderColourR, EMA.db.watchFrameBorderColourG, EMA.db.watchFrameBorderColourB, EMA.db.watchFrameBorderColourA ) EMA.settingsControlWatcher.displayOptionsQuestWatcherLinesSlider:SetValue( EMA.db.watcherListLines ) EMA.settingsControlWatcher.displayOptionsQuestWatcherFrameWidthSlider:SetValue( EMA.db.watcherFrameWidth ) - EMA.settingsControlWatcher.checkBoxUnlockWatcherFrame:SetValue( EMA.db.unlockWatcherFrame ) +-- EMA.settingsControlWatcher.checkBoxUnlockWatcherFrame:SetValue( EMA.db.unlockWatcherFrame ) EMA.settingsControlWatcher.checkBoxHideBlizzardWatchFrame:SetValue( EMA.db.hideBlizzardWatchFrame ) EMA.settingsControlWatcher.checkBoxShowCompletedObjectivesAsDone:SetValue( EMA.db.showCompletedObjectivesAsDone ) EMA.settingsControlWatcher.checkBoxHideQuestIfAllComplete:SetValue( EMA.db.hideQuestIfAllComplete ) @@ -794,7 +803,7 @@ function EMA:SettingsRefresh() EMA.settingsControlWatcher.questWatchBorderColourPicker:SetDisabled( not EMA.db.enableQuestWatcher ) EMA.settingsControlWatcher.displayOptionsQuestWatcherLinesSlider:SetDisabled( not EMA.db.enableQuestWatcher ) EMA.settingsControlWatcher.displayOptionsQuestWatcherFrameWidthSlider:SetDisabled( not EMA.db.enableQuestWatcher ) - EMA.settingsControlWatcher.checkBoxUnlockWatcherFrame:SetDisabled( not EMA.db.enableQuestWatcher ) +-- EMA.settingsControlWatcher.checkBoxUnlockWatcherFrame:SetDisabled( not EMA.db.enableQuestWatcher ) EMA.settingsControlWatcher.checkBoxHideBlizzardWatchFrame:SetDisabled( not EMA.db.enableQuestWatcher ) EMA.settingsControlWatcher.checkBoxShowCompletedObjectivesAsDone:SetDisabled( not EMA.db.enableQuestWatcher ) EMA.settingsControlWatcher.checkBoxHideQuestIfAllComplete:SetDisabled( not EMA.db.enableQuestWatcher ) diff --git a/Modules/Sell.lua b/Modules/Sell.lua index 5ebc073..413f21d 100644 --- a/Modules/Sell.lua +++ b/Modules/Sell.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -42,11 +42,17 @@ EMA.moduleListOrder = 1 -- Settings - the values to store and their defaults for the settings database. EMA.settings = { + global = { + ['**'] = { + autoSellOtherItemsListGlobal = {}, + }, + }, profile = { sellItemOnAllWithAltKey = false, -- Other Items autoSellOtherItemsList = {}, messageArea = EMAApi.DefaultMessageArea(), + globalSellList = false, autoSellItem = false, blackListItem = false, destroyItem = false, @@ -65,6 +71,9 @@ EMA.settings = { autoSellEpic = false, autoSellIlvlEpic = 0, autoSellBoEEpic = false, + -- Toys + autoSellToys = false, + autoSellMounts = false, }, } @@ -78,14 +87,30 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-team config", + get = false, + set = "", + }, push = { type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_SETTINGS_INFO"], - usage = "/EMA-sell push", + usage = "/ema-sell push", get = false, set = "EMASendSettings", }, + copy = { + type = "input", + name = L["COPY"], + desc = L["COPY_HELP"], + usage = "/ema-sell copy", + get = false, + set = "CopyListCommmand", + }, }, } return configuration @@ -129,8 +154,11 @@ end function EMA:SettingsRefresh() -- Sell on all with alt key. EMA.settingsControl.checkBoxSellItemOnAllWithAltKey:SetValue( EMA.db.sellItemOnAllWithAltKey ) + -- global Sell CheckBox + EMA.settingsControl.checkBoxGlobalSellList:SetValue( EMA.db.globalSellList ) + EMA.settingsControl.checkBoxGlobalSellList:SetDisabled( not EMA.db.autoSellItem ) -- Auto sell Quality and Ilvl items. - EMA.settingsControl.checkBoxAutoSellItems:SetValue( EMA.db.autoSellItem ) + EMA.settingsControl.checkBoxAutoSellItems:SetValue( EMA.db.autoSellItem ) -- Poor EMA.settingsControl.checkBoxAutoSellPoor:SetValue ( EMA.db.autoSellPoor ) EMA.settingsControl.checkBoxAutoSellBoEPoor:SetValue ( EMA.db.autoSellBoEPoor ) @@ -157,6 +185,11 @@ function EMA:SettingsRefresh() EMA.settingsControl.checkBoxAutoSellEpic:SetDisabled ( not EMA.db.autoSellItem ) EMA.settingsControl.editBoxAutoSellIlvlEpic:SetDisabled ( not EMA.db.autoSellEpic or not EMA.db.autoSellItem ) EMA.settingsControl.checkBoxAutoSellBoEEpic:SetDisabled ( not EMA.db.autoSellEpic or not EMA.db.autoSellItem ) + -- Toys + EMA.settingsControl.checkBoxAutoSellToys:SetValue( EMA.db.autoSellToys ) + EMA.settingsControl.checkBoxAutoSellToys:SetDisabled ( not EMA.db.autoSellItem ) +EMA.settingsControl.checkBoxAutoSellMounts:SetValue( EMA.db.autoSellMounts ) + EMA.settingsControl.checkBoxAutoSellMounts:SetDisabled ( not EMA.db.autoSellItem ) -- Messages. EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea ) -- list. @@ -180,6 +213,7 @@ function EMA:EMAOnSettingsReceived( characterName, settings ) if characterName ~= EMA.characterName then -- Update the settings. EMA.db.sellItemOnAllWithAltKey = settings.sellItemOnAllWithAltKey + EMA.db.globalSellList = settings.globalSellList EMA.db.autoSellItem = settings.autoSellItem EMA.db.autoSellPoor = settings.autoSellPoor EMA.db.autoSellBoEPoor = settings.autoSellBoEPoor @@ -192,10 +226,13 @@ function EMA:EMAOnSettingsReceived( characterName, settings ) EMA.db.autoSellEpic = settings.autoSellEpic EMA.db.autoSellIlvlEpic = settings.autoSellIlvlEpic EMA.db.autoSellBoEEpic = settings.autoSellBoEEpic + EMA.db.autoSellToys = settings.autoSellToys + EMA.db.autoSellMounts = settings.autoSellMounts EMA.db.blackListItem = settings.blackListItem EMA.db.destroyItem = settings.destroyItem EMA.db.messageArea = settings.messageArea EMA.db.autoSellOtherItemsList = EMAUtilities:CopyTable( settings.autoSellOtherItemsList ) + EMA.db.global.autoSellOtherItemsListGlobal = EMAUtilities:CopyTable( settings.global.autoSellOtherItemsListGlobal ) -- Refresh the settings. EMA:SettingsRefresh() -- Tell the player. @@ -243,18 +280,29 @@ local function SettingsCreateMain( top ) EMA.SettingsToggleSellItemOnAllWithAltKey, L["ALT_SELL_ALL_HELP"] ) - movingTop = movingTop - checkBoxHeight + movingTop = movingTop - checkBoxHeight EMAHelperSettings:CreateHeading( EMA.settingsControl, L["SELL_LIST"], movingTop, false ) movingTop = movingTop - headingHeight EMA.settingsControl.checkBoxAutoSellItems = EMAHelperSettings:CreateCheckBox( EMA.settingsControl, - headingWidth, - left2, + halfWidth, + left, movingTop, L["AUTO_SELL_ITEMS"], EMA.SettingsToggleAutoSellItems, L["AUTO_SELL_ITEMS_HELP"] ) + EMA.settingsControl.checkBoxGlobalSellList = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + halfWidth, + left3, + movingTop, + L["GLOBAL_LIST"], + EMA.SettingsToggleGlobalSellList, + L["GLOBAL_SETTINGS_LIST_HELP"] + ) + + movingTop = movingTop - checkBoxHeight EMA.settingsControl.listHighlightRow = 1 EMA.settingsControl.listOffset = 1 @@ -301,7 +349,7 @@ local function SettingsCreateMain( top ) thirdWidth, left2, movingTop, - L["SELL_LIST_DROP_ITEM"] + L["ITEM_DROP"] ) EMA.settingsControl.listEditBoxOtherItem:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedOtherItem ) movingTop = movingTop - editBoxHeight @@ -451,6 +499,26 @@ local function SettingsCreateMain( top ) L["iLVL_HELP"] ) EMA.settingsControl.editBoxAutoSellIlvlEpic:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedIlvlEpic ) +-- Toy + movingTop = movingTop - editBoxHeight - 3 + EMA.settingsControl.checkBoxAutoSellToys = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + thirdWidth, + left, + movingTop + movingTopEdit, + L["AUTO_SELL_TOYS"], + EMA.SettingsToggleAutoSellToys, + L["AUTO_SELL_TOYS_HELP"] + ) +EMA.settingsControl.checkBoxAutoSellMounts = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + thirdWidth, + left2, + movingTop + movingTopEdit, + L["AUTO_SELL_MOUNTS"], + EMA.SettingsToggleAutoSellMounts, + L["AUTO_SELL_MOUNTS_HELP"] + ) movingTop = movingTop - editBoxHeight - 3 EMAHelperSettings:CreateHeading( EMA.settingsControl, L["SELL"]..L[" "]..L["MESSAGES_HEADER"], movingTop, false ) movingTop = movingTop - headingHeight @@ -528,7 +596,6 @@ function EMA:SettingslistScrollRefresh() EMA.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetText( listInformation.tag ) EMA.settingsControl.list.rows[iterateDisplayRows].columns[3].textString:SetText( blackListText ) EMA.settingsControl.list.rows[iterateDisplayRows].columns[4].textString:SetText( destroyText ) - -- Highlight the selected row. if dataRowNumber == EMA.settingsControl.listHighlightRow then EMA.settingsControl.list.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) @@ -553,11 +620,26 @@ function EMA:SettingsToggleSellItemOnAllWithAltKey( event, checked ) EMA:SettingsRefresh() end +function EMA:SettingsToggleAutoSellToys( event, checked ) + EMA.db.autoSellToys = checked + EMA:SettingsRefresh() +end + +function EMA:SettingsToggleAutoSellMounts( event, checked ) + EMA.db.autoSellMounts = checked + EMA:SettingsRefresh() +end + function EMA:SettingsToggleAutoSellItems( event, checked ) EMA.db.autoSellItem = checked EMA:SettingsRefresh() end +function EMA:SettingsToggleGlobalSellList( event, checked ) + EMA.db.globalSellList = checked + EMA:SettingsRefresh() +end + -- Poor function EMA:SettingsToggleAutoSellPoor( event, checked ) EMA.db.autoSellPoor = checked @@ -678,6 +760,12 @@ function EMA:SettingslistAddClick( event ) end end +function EMA:CopyListCommmand() + EMA:Print("Copying Local List To Global List") + EMA.db.global.autoSellOtherItemsListGlobal = EMAUtilities:CopyTable( EMA.db.autoSellOtherItemsList ) + EMA:SettingsRefresh() +end + ------------------------------------------------------------------------------------------------------------- -- Popup Dialogs. ------------------------------------------------------------------------------------------------------------- @@ -739,7 +827,7 @@ end -- The ContainerFrameItemButton_OnModifiedClick hook. function EMA:ContainerFrameItemButton_OnModifiedClick( self, event, ... ) - if EMA.db.sellItemOnAllWithAltKey == true and IsAltKeyDown() and MerchantFrame:IsVisible() then + if EMA.db.sellItemOnAllWithAltKey == true and IsAltKeyDown() and EMAUtilities:MerchantFrameIsShown() then local bag, slot = self:GetParent():GetID(), self:GetID() local texture, count, locked, quality, readable, lootable, link = GetContainerItemInfo( bag, slot ) EMA:EMASendCommandToTeam( EMA.COMMAND_SELL_ITEM, link ) @@ -757,7 +845,7 @@ function EMA:DoSellItem( itemlink ) local bagItemName = item:GetItemName() if (bagItemLink ) then if EMAUtilities:DoItemLinksContainTheSameItem( bagItemLink, itemlink ) then - if MerchantFrame:IsVisible() == true then + if EMAUtilities:MerchantFrameIsShown() == true then UseContainerItem( bagID, slotID ) -- Tell the Boss. EMA:EMASendMessageToTeam( EMA.db.messageArea, L["I_HAVE_SOLD_X"]( bagItemLink ), false ) @@ -770,11 +858,19 @@ function EMA:DoSellItem( itemlink ) end function EMA:GetlistMaxPosition() - return #EMA.db.autoSellOtherItemsList + if EMA.db.globalSellList == true then + return #EMA.db.global.autoSellOtherItemsListGlobal + else + return #EMA.db.autoSellOtherItemsList + end end function EMA:GetOtherAtPosition( position ) - return EMA.db.autoSellOtherItemsList[position] + if EMA.db.globalSellList == true then + return EMA.db.global.autoSellOtherItemsListGlobal[position] + else + return EMA.db.autoSellOtherItemsList[position] + end end function EMA:AddOther( itemLink, itemTag, blackList, destroy ) @@ -789,14 +885,22 @@ function EMA:AddOther( itemLink, itemTag, blackList, destroy ) itemInformation.tag = itemTag itemInformation.blackList = blackList itemInformation.destroyItem = destroy - table.insert( EMA.db.autoSellOtherItemsList, itemInformation ) + if EMA.db.globalSellList == true then + table.insert( EMA.db.global.autoSellOtherItemsListGlobal, itemInformation ) + else + table.insert( EMA.db.autoSellOtherItemsList, itemInformation ) + end EMA:SettingsRefresh() EMA:SettingslistRowClick( EMA:GetlistMaxPosition() , 1 ) end end function EMA:RemoveOther() - table.remove( EMA.db.autoSellOtherItemsList, EMA.settingsControl.listHighlightRow ) + if EMA.db.globalSellList == true then + table.remove( EMA.db.global.autoSellOtherItemsListGlobal, EMA.settingsControl.listHighlightRow ) + else + table.remove( EMA.db.autoSellOtherItemsList, EMA.settingsControl.listHighlightRow ) + end EMA:SettingsRefresh() EMA:SettingslistRowClick( EMA.settingsControl.listHighlightRow -1, 1 ) end @@ -804,7 +908,7 @@ end function EMA:MERCHANT_SHOW() -- Sell Items if EMA.db.autoSellItem == true then - EMA:DoMerchantSellItems() + EMA:ScheduleTimer("DoMerchantSellItems", 0.5 ) end end @@ -820,9 +924,10 @@ end function EMA:DoMerchantSellItems() local count = 0 + local sellCount = 0 local gold = 0 for bagID = 0, NUM_BAG_SLOTS do - for slotID = 1,GetContainerNumSlots( bagID ),1 do + for slotID = 1,GetContainerNumSlots( bagID ) do --EMA:Print( "Bags OK. checking", itemLink ) local item = Item:CreateFromBagAndSlot(bagID, slotID) if ( item ) then @@ -835,8 +940,9 @@ function EMA:DoMerchantSellItems() local itemRarity = C_Item.GetItemQuality( location ) local iLvl = C_Item.GetCurrentItemLevel( location ) local _, itemCount = GetContainerItemInfo( bagID, slotID ) - local _, _, _, _, _, _, _, _, _, _, itemSellPrice = GetItemInfo( itemLink ) - --EMA:Print("ItemTest", itemLink, itemRarity, itemType, isBop, itemRarity, iLvl, itemSellPrice) + 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 @@ -894,7 +1000,7 @@ function EMA:DoMerchantSellItems() end end end - -- Epic + -- Epic if EMA.db.autoSellEpic == true then if itemRarity == EMA.ITEM_QUALITY_EPIC then if itemType ~= 0 then @@ -917,8 +1023,49 @@ function EMA:DoMerchantSellItems() end end end + -- Toys + if EMA.db.autoSellToys == true then + if hasToy == true and isBop == true then + --EMA:Print("ToyTest", hasToy, itemSellPrice ) + if itemSellPrice > 0 then + --EMA:Print("canSellToy") + canSell = true + else + --EMA:Print("canNotSellToy") + canSell = true + canDestroy = true + end + end + end + -- Mounts + if EMA.db.autoSellMounts == true then + local mountIDs = C_MountJournal.GetMountIDs() + for i = 1, #mountIDs do + local creatureName,mountSpellID,_,_,_,_,_,_,_,_, isCollected, mountID = C_MountJournal.GetMountInfoByID(mountIDs[i]) + if itemName == creatureName then + --EMA:Print("found a mount", creatureName) + if isCollected == true and isBop == true then + --EMA:Print("Mount is Known!", creatureName ) + if itemSellPrice > 0 then + --EMA:Print("canSellToy") + canSell = true + else + --EMA:Print("canNotSellToy") + canSell = true + canDestroy = true + end + end + end + end + end -- Sell List/BackList - for position, itemInformation in pairs( EMA.db.autoSellOtherItemsList ) do + if EMA.db.globalSellList == true then + itemTable = EMA.db.global.autoSellOtherItemsListGlobal + else + itemTable = EMA.db.autoSellOtherItemsList + end + for position, itemInformation in pairs( itemTable ) do + if EMAApi.IsCharacterInGroup( EMA.characterName, itemInformation.tag ) == true then if EMAUtilities:DoItemLinksContainTheSameItem( itemLink, itemInformation.link ) then --EMA:Print("DataTest", itemInformation.blackList, itemInformation.destroyItem ) @@ -935,9 +1082,9 @@ function EMA:DoMerchantSellItems() end end if canSell == true then - --EMA:Print("END OF LOOT", canSell, itemLink) + --EMA:Print("END OF LOOT", canSell, itemLink, itemCount) if itemSellPrice ~= nil and itemSellPrice > 0 then - if MerchantFrame:IsVisible() == true then + if EMAUtilities:MerchantFrameIsShown() == true then if itemCount > 1 then count = count + itemCount gold = gold + itemSellPrice * itemCount @@ -945,11 +1092,15 @@ function EMA:DoMerchantSellItems() count = count + 1 gold = gold + itemSellPrice end - UseContainerItem( bagID, slotID ) + sellCount = sellCount + 0.4 + --UseContainerItem( bagID, slotID ) + + --EMA:Print("can sell now", bagID, slotID ) + EMA:ScheduleTimer("SellItem", sellCount, bagID, slotID, itemCount ) end else if canDestroy == true then - if MerchantFrame:IsVisible() == true then + if EMAUtilities:MerchantFrameIsShown() == true then PickupContainerItem(bagID,slotID) DeleteCursorItem() EMA:EMASendMessageToTeam( EMA.db.messageArea, L["DELETE_ITEM"]( itemLink ), false ) @@ -960,34 +1111,26 @@ function EMA:DoMerchantSellItems() end end end - end + end if count > 0 then - EMA.sellCountTotal = EMA.sellCountTotal + count - EMA.sellGoldTotal = EMA.sellGoldTotal + gold - end - if MerchantFrame:IsVisible() == true and EMA.TrySellIAgainCount > 0 then - EMA:ScheduleTimer("TrySellIAgain", 1.0, count, gold ) + EMA:ScheduleTimer("TellTeam", sellCount + 1 , count, gold ) end end -function EMA:TrySellIAgain( count, gold ) - local sellGoldTotal = EMA.sellGoldTotal - local sellCountTotal = EMA.sellCountTotal - --EMA:Print("test", count, gold, sellGoldTotal, sellCountTotal, EMA.SellFristTime, EMA.TrySellIAgainCount ) - if count <= 0 and EMA.SellFristTime == false then - --EMA:Print("Can SELL ALL ITEMS", "count", sellCountTotal, "gold", sellGoldTotal ) - if sellGoldTotal > 0 then - local formattedGoldAmount = GetCoinTextureString(sellGoldTotal) - EMA:EMASendMessageToTeam( EMA.db.messageArea, L["I_SOLD_ITEMS_PLUS_GOLD"]( sellCountTotal )..formattedGoldAmount, false ) - end - EMA.TrySellIAgainCount = 0 - sellCountTotal = sellCountTotal - count - sellGoldTotal = sellGoldTotal - gold + +function EMA:SellItem( bagID, slotID, itemCount ) + --EMA:Print("sellItem", bagID, slotID ) + if EMAUtilities:MerchantFrameIsShown() == true then + UseContainerItem( bagID, slotID ) end - if EMA.TrySellIAgainCount > 0 then - EMA.SellFristTime = false - EMA.TrySellIAgainCount = EMA.TrySellIAgainCount - 1 - EMA:DoMerchantSellItems() +end + + +function EMA:TellTeam( count, gold ) + --EMA:Print("tellTeam", count, gold ) + if count > 0 then + local formattedGoldAmount = GetCoinTextureString(gold) + EMA:EMASendMessageToTeam( EMA.db.messageArea, L["I_SOLD_ITEMS_PLUS_GOLD"]( count )..formattedGoldAmount, false ) end end diff --git a/Modules/Sync.lua b/Modules/Sync.lua index fb58fc6..3960ef6 100644 --- a/Modules/Sync.lua +++ b/Modules/Sync.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -55,11 +55,19 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-sync config", + get = false, + set = "", + }, push = { type = "input", name = L["Push Settings"], desc = L["Push the Mount settings to all characters in the team."], - usage = "/EMA-mount push", + usage = "/EMA-sync push", get = false, set = "EMASendSettings", order = 4, diff --git a/Modules/Talk.lua b/Modules/Talk.lua index f5cd8b8..4455bfb 100644 --- a/Modules/Talk.lua +++ b/Modules/Talk.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -62,11 +62,19 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-talk config", + get = false, + set = "", + }, push = { type = "input", name = L["PUSH_ALL_SETTINGS"], desc = L["PUSH_SETTINGS_INFO"], - usage = "/EMA-talk push", + usage = "/ema-talk push", get = false, set = "EMASendSettings", }, diff --git a/Modules/Toon.lua b/Modules/Toon.lua index b790921..1a9ef40 100644 --- a/Modules/Toon.lua +++ b/Modules/Toon.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -94,11 +94,19 @@ function EMA:GetConfiguration() handler = EMA, type = 'group', args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-toon config", + get = false, + set = "", + }, push = { type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_ALL_SETTINGS"], - usage = "/EMA-toon push", + usage = "/ema-toon push", get = false, set = "EMASendSettings", }, diff --git a/Modules/Trade.lua b/Modules/Trade.lua index ec9baf0..dcd7166 100644 --- a/Modules/Trade.lua +++ b/Modules/Trade.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018 Jennifer Cally -- +-- License: All Rights Reserved 2018-2019 Jennifer Cally -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -41,9 +41,15 @@ EMA.moduleOrder = 10 -- Settings - the values to store and their defaults for the settings database. EMA.settings = { + global = { + ['**'] = { + autoTradeItemsListGlobal = {}, + }, + }, profile = { messageArea = EMAApi.DefaultMessageArea(), showEMATradeWindow = false, + globalTadeList = false, blackListItem = false, tradeBoEItems = false, tradeCRItems = false, @@ -66,16 +72,32 @@ function EMA:GetConfiguration() get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-team config", + get = false, + set = "", + }, push = { type = "input", name = L["PUSH_SETTINGS"], desc = L["PUSH_ALL_SETTINGS"], - usage = "/EMA-trade push", + usage = "/ema-trade push", get = false, set = "EMASendSettings", guiHidden = true, }, - }, + copy = { + type = "input", + name = L["COPY"], + desc = L["COPY_HELP"], + usage = "/ema-trade copy", + get = false, + set = "CopyListCommmand", + }, + }, } return configuration end @@ -191,13 +213,22 @@ function EMA:SettingsCreateTrade( top ) movingTop = movingTop - headingHeight EMA.settingsControl.checkBoxShowEMATradeWindow = EMAHelperSettings:CreateCheckBox( EMA.settingsControl, - headingWidth, - left + 130, + halfWidth, + left, --+ 130, movingTop, L["TRADE_LIST"], EMA.SettingsToggleShowEMATradeWindow, L["TRADE_LIST_HELP"] ) + EMA.settingsControl.checkBoxGlobalTradeList = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + halfWidth, + left3, + movingTop, + L["GLOBAL_LIST"], + EMA.SettingsToggleGlobalTradeList, + L["GLOBAL_SETTINGS_LIST_HELP"] + ) movingTop = movingTop - checkBoxHeight EMA.settingsControl.tradeItemsHighlightRow = 1 EMA.settingsControl.tradeItemsOffset = 1 @@ -449,6 +480,11 @@ function EMA:SettingsSetMessageArea( event, value ) EMA:SettingsRefresh() end +function EMA:SettingsToggleGlobalTradeList( event, checked ) + EMA.db.globalTradeList = checked + EMA:SettingsRefresh() +end + function EMA:SettingsToggleShowEMATradeWindow( event, checked ) EMA.db.showEMATradeWindow = checked EMA:SettingsRefresh() @@ -517,17 +553,25 @@ function EMA:EditBoxChangedGoldAmountToLeaveOnToonTrade( event, text ) EMA:SettingsRefresh() end +function EMA:CopyListCommmand() + EMA:Print("Copying Local List To Global List") + EMA.db.global.autoTradeItemsListGlobal = EMAUtilities:CopyTable( EMA.db.autoTradeItemsList ) + EMA:SettingsRefresh() +end + -- Settings received. function EMA:EMAOnSettingsReceived( characterName, settings ) if characterName ~= EMA.characterName then -- Update the settings. EMA.db.messageArea = settings.messageArea EMA.db.showEMATradeWindow = settings.showEMATradeWindow + EMA.db.globalTradeList = settings.globalTradeList EMA.db.autoSellOtherItemTag = settings.autoSellOtherItemTag EMA.db.blackListItem = settings.blackListItem EMA.db.tradeBoEItems = settings.tradeBoEItems EMA.db.tradeCRItems = settings.tradeCRItems EMA.db.autoTradeItemsList = EMAUtilities:CopyTable( settings.autoTradeItemsList ) + EMA.db.global.autoTradeItemsListGlobal = EMAUtilities:CopyTable( settings.global.autoTradeItemsListGlobal ) EMA.db.adjustMoneyWithGuildBank = settings.adjustMoneyWithGuildBank EMA.db.goldAmountToKeepOnToon = settings.goldAmountToKeepOnToon EMA.db.adjustMoneyWithMasterOnTrade = settings.adjustMoneyWithMasterOnTrade @@ -548,6 +592,9 @@ end function EMA:SettingsRefresh() EMA.settingsControl.checkBoxShowEMATradeWindow:SetValue( EMA.db.showEMATradeWindow ) + -- global CheckBox + EMA.settingsControl.checkBoxGlobalTradeList:SetValue( EMA.db.globalTradeList ) + EMA.settingsControl.checkBoxGlobalTradeList:SetDisabled( not EMA.db.showEMATradeWindow ) EMA.settingsControl.listCheckBoxBoxOtherBlackListItem:SetValue( EMA.db.blackListItem ) EMA.settingsControl.checkBoxTradeBoEItems:SetValue( EMA.db.tradeBoEItems) EMA.settingsControl.checkBoxTradeCRItems:SetValue( EMA.db.tradeCRItems) @@ -584,11 +631,19 @@ end -- New Trade stuff function EMA:GetTradeItemsMaxPosition() - return #EMA.db.autoTradeItemsList + if EMA.db.globalTradeList == true then + return #EMA.db.global.autoTradeItemsListGlobal + else + return #EMA.db.autoTradeItemsList + end end function EMA:GetTradeItemsAtPosition( position ) - return EMA.db.autoTradeItemsList[position] + if EMA.db.globalTradeList == true then + return EMA.db.global.autoTradeItemsListGlobal[position] + else + return EMA.db.autoTradeItemsList[position] + end end function EMA:AddItem( itemLink, itemTag, blackList ) @@ -602,14 +657,22 @@ function EMA:AddItem( itemLink, itemTag, blackList ) itemInformation.name = name itemInformation.tag = itemTag itemInformation.blackList = blackList - table.insert( EMA.db.autoTradeItemsList, itemInformation ) + if EMA.db.globalTradeList == true then + table.insert( EMA.db.global.autoTradeItemsListGlobal, itemInformation ) + else + table.insert( EMA.db.autoTradeItemsList, itemInformation ) + end EMA:SettingsRefresh() EMA:SettingsTradeItemsRowClick( 1 , 1 ) end end function EMA:RemoveItem() - table.remove( EMA.db.autoTradeItemsList, EMA.settingsControl.tradeItemsHighlightRow ) + if EMA.db.globalTradeList == true then + table.remove( EMA.db.global.autoTradeItemsListGlobal, EMA.settingsControl.listHighlightRow ) + else + table.remove( EMA.db.autoTradeItemsList, EMA.settingsControl.tradeItemsHighlightRow ) + end EMA:SettingsRefresh() EMA:SettingsTradeItemsRowClick( EMA.settingsControl.tradeItemsHighlightRow -1 , 1 ) end @@ -685,7 +748,12 @@ function EMA:TradeAllItems() end end end - for position, itemInformation in pairs( EMA.db.autoTradeItemsList ) do + if EMA.db.globalTradeList == true then + itemTable = EMA.db.global.autoTradeItemsListGlobal + else + itemTable = EMA.db.autoTradeItemsList + end + for position, itemInformation in pairs( itemTable ) do if EMAApi.IsCharacterInGroup( characterName, itemInformation.tag ) == true then if EMAUtilities:DoItemLinksContainTheSameItem( itemLink, itemInformation.link ) then --EMA:Print("DataTest", itemInformation.link, itemInformation.blackList ) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml deleted file mode 100644 index d4cedeb..0000000 --- a/bitbucket-pipelines.yml +++ /dev/null @@ -1,8 +0,0 @@ -image: maven:3.3.3 - -pipelines: - default: - - step: - script: - - mvn -B clean install - - curl -X POST --user "${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${blossom_ebony}/${ema}/downloads" --form files=@"target/EMA.zip" \ No newline at end of file