From 96c430fda11c6c3714abd8dc794442aa5b6647bb Mon Sep 17 00:00:00 2001 From: Jennifer Calladine Date: Wed, 30 Mar 2022 13:45:28 +0100 Subject: [PATCH] Release-v4.1(0208) --- Bindings.xml | 99 +- CHANGELOG.txt | 343 ++- Core/Communications.lua | 46 +- Core/Core.lua | 324 +-- Core/Message.lua | 2 +- Core/Module.lua | 2 +- Core/Tag.lua | 2 +- Core/Team.lua | 390 +++- EMA.toc | 8 +- EMA_Mainline.toc | 28 + EMA_TBC.toc | 28 + EMA_Vanilla.toc | 28 + GUI/AceGUIContainer-EMATreeGroup.lua | 4 +- GUI/AceGUIContainer-EMAWindow.lua | 10 +- GUI/AceGUIWidget-EMAContinueLabel.lua | 2 +- GUI/AceGUIWidget-EMANormalLabel.lua | 2 +- GUI/EMAHelperSettings.lua | 19 +- LICENSE | 26 - Libs/AceComm-3.0/ChatThrottleLib.lua | 2 +- .../AceConfigDialog-3.0/AceConfigDialog-3.0.lua | 18 +- .../AceGUI-3.0-SharedMediaWidgets.toc | 8 +- .../BackgroundWidget.lua | 4 +- .../AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua | 2 +- .../AceGUI-3.0-SharedMediaWidgets/FontWidget.lua | 2 +- .../SharedFunctions.lua | 55 - .../AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua | 2 +- .../StatusbarWidget.lua | 2 +- .../AceGUI-3.0-SharedMediaWidgets/prototypes.lua | 8 +- .../AceGUI-3.0-SharedMediaWidgets/CHANGES r-65.txt | 12 + Libs/AceGUI-3.0-SharedMediaWidgets/CHANGES.txt | 25 - ...g-AceGUI-3.0-SharedMediaWidgets-r48-release.txt | 19 - ...Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt | 7 - ...ngelog-AceGUI-3.0-SharedMediaWidgets-v3.3.2.txt | 17 - Libs/AceGUI-3.0/AceGUI-3.0.lua | 4 +- .../widgets/AceGUIContainer-BlizOptionsGroup.lua | 4 +- Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua | 4 +- .../widgets/AceGUIContainer-TabGroup.lua | 2 +- Libs/AceHook-3.0/AceHook-3.0.lua | 8 +- Libs/EMALibActionButton-1.0.lua | 30 +- Libs/EbonyUtilities.lua | 344 +++ Libs/LibBagUtils-1.0/LibBagUtils-1.0.lua | 14 +- Libs/changelog-Ace3-r1252.txt | 441 ++++ Libs/changelogAce3-r1244.txt | 435 ++++ Locales/Core-Locale-deDE.lua | 4 +- Locales/Core-Locale-enUS.lua | 94 +- Modules/Bank.lua | 2 +- Modules/DisplayTeam.lua | 304 ++- Modules/Follow.lua | 168 +- Modules/Guild.lua | 14 +- Modules/ISBoxer.lua | 534 ----- Modules/Information-Classic.lua | 1135 ++++++++++ Modules/Information.lua | 9 +- Modules/Interaction.lua | 500 +++-- Modules/ItemUse.lua | 62 +- Modules/LDBBar.lua | 4 +- Modules/Macro.lua | 2 +- Modules/Mail.lua | 13 +- Modules/Modules.xml | 7 +- Modules/Purchase.lua | 7 +- Modules/Quest-Classic.lua | 2295 ++++++++++++++++++++ Modules/Quest.lua | 34 +- Modules/QuestWatcher-Classic.lua | 2254 +++++++++++++++++++ Modules/QuestWatcher.lua | 15 +- Modules/Sell.lua | 144 +- Modules/Sync.lua | 380 ---- Modules/Talk.lua | 2 +- Modules/Toon.lua | 272 ++- Modules/Trade.lua | 2 +- 68 files changed, 9001 insertions(+), 2088 deletions(-) create mode 100644 EMA_Mainline.toc create mode 100644 EMA_TBC.toc create mode 100644 EMA_Vanilla.toc delete mode 100644 Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SharedFunctions.lua create mode 100644 Libs/AceGUI-3.0-SharedMediaWidgets/CHANGES r-65.txt delete mode 100644 Libs/AceGUI-3.0-SharedMediaWidgets/CHANGES.txt delete mode 100644 Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r48-release.txt delete mode 100644 Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt delete mode 100644 Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-v3.3.2.txt delete mode 100644 Libs/AceGUI-3.0-SharedMediaWidgets/R61 updated.txt create mode 100644 Libs/EbonyUtilities.lua create mode 100644 Libs/changelog-Ace3-r1252.txt create mode 100644 Libs/changelogAce3-r1244.txt delete mode 100644 Modules/ISBoxer.lua create mode 100644 Modules/Information-Classic.lua create mode 100644 Modules/Quest-Classic.lua create mode 100644 Modules/QuestWatcher-Classic.lua delete mode 100644 Modules/Sync.lua diff --git a/Bindings.xml b/Bindings.xml index 6d28388..31f384a 100644 --- a/Bindings.xml +++ b/Bindings.xml @@ -18,6 +18,50 @@ --[[dummy]] + + --[[dummy]] + + + --[[dummy]] + + + --[[dummy]] + + + --[[dummy]] + + + --[[dummy]] + + + --[[dummy]] + + + --[[dummy]] + + + --[[dummy]] + + + --[[dummy]] + + + --[[dummy]] + + + --[[dummy]] + + + --[[dummy]] + + + --[[dummy]] + + + --[[dummy]] + + + --[[dummy]] @@ -28,68 +72,79 @@ --[[dummy]] - + + --[[dummy]] + + + --[[dummy]] - + + - + + --[[dummy]] + + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + --[[dummy]] - + + + --[[dummy]] + diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 96ee9da..52a5128 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,7 +1,348 @@ --------------------------- ChangeLogs: --------------------------- -EMA Version: v9.0.1-Release-v3.1(0170) +EMA Version: Release-v4.1(0208) +Game Version: 9.2.0/2.5.2/1.1.14 +Release Date: 06/03/2022 + +## Core + --updated classic toc. + +## Information-Classic + -- should now save settings. + +## Guild Bank + -- Now Loads With TBBC + + + +--------------------------- +EMA Version: Release-v4.1(0207) +Game Version: 9.2.0/2.5.2/1.1.14 +Release Date: 06/03/2022 + +## Interaction + -- Fixed Team Mount in TBBC (again!) + -- come on please be fixxed! + + + + +--------------------------- +EMA Version: Release-v4.1(0206) +Game Version: 9.2.0/2.5.2/1.1.14 +Release Date: 05/03/2022 + +Updated TOC +Updated CopyRight Dates (Happy New Year) + + +## Interaction + -- Fixed Team Mount in Live (again!) + -- issue#63/#55 + -- Fixed issue #85 + +## Quest-Watcher + -- added a space Issue#60 + + + +--------------------------- +EMA Version: Release-v4.1(0205) +Game Version: 9.1.5/2.5.2/1.1.14 +Release Date: 11/12/2021 + +## Toon + --Fixed some errors in for classic/tbc + + +--------------------------- +EMA Version: Release-v4.1(0204) +Game Version: 9.1.5/2.5.2/1.1.14 +Release Date: 11/12/2021 + +## Core + -- Update Ace3 + -- Added Support for classic-era! + + + + +--------------------------- +EMA Version: Release-v4.1(0203) +Game Version: 9.1.5/2.5.2 +Release Date: 06/11/2021 + +-- Sorry am not playing wow, so everything i do is if i can, (rember i don't get paid for this) + +## interaction + -- Fixed a bug with mountWithTeam with retail issue #55 + +--------------------------- +EMA Version: Release-v4.0(0202) +Game Version: 9.1.0/2.5.1 +Release Date: 28/08/2021 + +## Team + -- Fixed Team Invite On TBCC + +## Quest-Tracker + -- Has Come Back From Was AWL + +## Communications + -- Seems 9.1 is running like classic/tbc on sending big data though channels. + +--------------------------- +EMA Version: Release-v4.0(0201) +Game Version: 9.1.0/2.5.1 +Release Date: 26/08/2021 + + +## Toon + -- Fixed a GuildBank funds to repair issue #50 (Jumped the gun on this one) + +## Interaction + -- Stoped Live Code leacking from Retail On Stop Fight! issue #51 + +## Quest-Wascher + -- Wrong Version Of quest-watcher for retail was packed in this Build. Issue #56 + + +--------------------------- +ChangeLogs: +--------------------------- +EMA Version: Release-v4.0(0200) +Game Version: 9.1.0/2.5.1 +Release Date: 22/08/2021 +--------------------------- + +## Core + -- Now supports Classic-TBC 2.5.1 EMA-BCC.toc for tbc, EMA-MainLine.toc + -- All Non Working Live stuff on TBC removed! + -- New Config/GUI Layout. + -- Public API Reworked! + -- Added A WOW_KeyBindings Button to Main Setting Page. + +## Communications + -- On Classic/Tbc When Sending Setting Table Data Over Non Guild Channels Will Send To Whisper + +## Item-Use + -- You Can Now use spells that the other team Members don't have without a Lua Error. + +## Toon + *TODO! + -- Added in loot options for tbc-classic + +## Trade + *TODO + -- Added a Keybinding To Accept Trade( must be pressed on all team members ) + +## Quest-Tracker + *TODO + -- Toggle EMA-Tracker with keybinding + -- Option to Hide Blizzard tracker olny when ema-tracker is showen. + +## Quest-Tracker-Classic (classic/tbc) + -- Has its own copy for classic tracking due to many api changes. + +## Quest-Classic (Classic/tbc) + -- Has its own copy for classic tracking due to many api changes. + -- Added Choose Best Quest Reward + +## Information-Classic + -- Has its own copy for classic tracking due to many api changes. + + +--------------------------- +EMA Version: v9.0.5-Release-v3.1(0189) +Game Version: 9.0.5 +Release Date: 11/03/2021 +--------------------------- + +## Quest-Watcher + -- fixed the watcher Alpha + +--------------------------- +EMA Version: v9.0.5-Release-v3.1(0188) +Game Version: 9.0.5 +Release Date: 11/03/2021 +--------------------------- + +*.TOC Bump + +--------------------------- +EMA Version: v9.0.2-Release-v3.1(0187) +Game Version: 9.0.2 +Release Date: 27/02/2021 + +##Core + +-- Esc key close the config screen, issue/pull #31 #43 + +## Quest Wacher + -- case sensitive error in scenarios and torghast part of the addon. ( pull request #34 ) + +## Quest + -- Fix #21 + +--------------------------- +EMA Version: v9.0.2-Release-v3.1(0186) +Game Version: 9.0.2 +Release Date: 27/02/2021 + +## Vender/Sell + -- Removed Destroying Of Items Due To Api Changes. + +--------------------------- +EMA Version: v9.0.2-Release-v3.1(0185) +Game Version: 9.0.2 +Release Date: 26/02/2021 + + +## Interaction + -- Fixed the Dismounting options issue #35 + -- Works with the keybindings as well. (Team not the master one) + +## Mail + -- Fixed Issue #41 Where gold would still send if shift key was held down. + +## follow + -- Added Request #45 + +--------------------------- +EMA Version: v9.0.2-Release-v3.1(0184) +Game Version: 9.0.2 +Release Date: 04/12/2020 + +## KeyBinding + -- Added a keybinding for "SetView" + +# Display-Team + -- Removed Artifact Power xp Bar ( if they add somthing like this it probs get all changed again ) + - so changed to "Gold". + -- Added Gold to the Display Team + +# Toon + -- Added A Setview Command With Or Without Team + - :) yes you olny have to press it on one toon + + + + + +--------------------------- +EMA Version: v9.0.2-Release-v3.1(0183) +Game Version: 9.0.2 +Release Date: 25/11/2020 + +# Quest + -- Fixed A non-Api change on Shadowlands quest givers when handing in mutiple quests . + + + + +--------------------------- +EMA Version: v9.0.2-Release-v3.1(0182) +Game Version: 9.0.2 +Release Date: 22/11/2020 + +## Team + -- Added New Set Focus KeyBindings to set the team members in the order they sit in the GUI + +## /Click macros + -- Made some easyer to work with see doc at: + https://github.com/ebonyfaye/ema/wiki/Click-Macros + + +--------------------------- +EMA Version: v9.0.2-Release-v3.1(0181) +Game Version: 9.0.2 +Release Date: 20/11/2020 + +## Interaction + --Undo the mount change in (0180) + -- New Mount Option + -New command: "/ema-interaction mount " + - New KeyBinding, now calls "/ema-interaction mount all" + - Will Now tell the team to summon a "Random Favorite Mount" (everyone summons there own random mount) + -- Dev note: This works with with shift!!!!!!!. + -- You do not need to Have the settings ticked in the options to copy mount! + +--------------------------- +EMA Version: v9.0.2-Release-v3.1(0180) +Game Version: 9.0.2 +Release Date: 19/11/2020 + +## Interaction + --Added a keybinding to mount from you "Summon Random Favorite Mount" ( you need mount team on for the team to copy ) request #20 + +--------------------------- +EMA Version: v9.0.2-Release-v3.1(0179) +Game Version: 9.0.2 +Release Date: 19/11/2020 + +## Follow + SNW now works again (less follow borken spam!) + /ema-follow me and KeyBinding + -- No Longer spams follow borken when you change Follow Target. + -- No Longer Trys to follow it self in "Vehicle" + + + +--------------------------- +EMA Version: v9.0.2-Release-v3.1(0178) +Game Version: 9.0.2 +Release Date: 18/11/2020 + +## Core + -- Updated Ace3 + -- Updated Ace3-SharedMediaWidgets + +## Information + --Fixed a lua error from changes with the new patch + +--------------------------- +EMA Version: v9.0.1-Release-v3.1(0175) +Game Version: 9.0.1 +Release Date: 13/11/2020 + +## Team + -- Added A new KeyBinding Toggle Click To Move. + -- Added A new CommadLine "/ema-team ctm " + - dev note: (this is a non-boardcasting key to toggle) as well u can set + groups if use the commandline /ema-team ctm , it will not toggle it "on" the the window you send the command from. + (master free) but it will turn it off so if u change windows it will change. + + +--------------------------- +EMA Version: v9.0.1-Release-v3.1(0174) +Game Version: 9.0.1 +Release Date: 11/11/2020 + +## Team + -- Added 3 New KeyBindings + -- Focus Master + -- Target Master + -- Assist Master + -dev note: They will need to be pressed on every Character by "hand"/Window as well they will not update in combat. + + -- You can use /click in custom macros + /click EMAAssistMaster + /click EMATargetMaster + /click EMAFocusMaster + +--------------------------- +EMA Version: v9.0.1-Release-v3.1(0173) +Game Version: 9.0.1 +Release Date: 10/11/2020 + +## Follow + -- Added a new command to stop follow your current Target. + -- KeyBinding can be set the normal way. + -- /ema-follow stop all + +--------------------------- +EMA Version: v9.0.1-Release-v3.1(0170/0171) Game Version: 9.0.1 Release Date: 07/11/2020 diff --git a/Core/Communications.lua b/Core/Communications.lua index dd85fa7..43ebb66 100644 --- a/Core/Communications.lua +++ b/Core/Communications.lua @@ -149,7 +149,7 @@ local function CreateCommandToSend( moduleName, commandName, ... ) message = message..commandName..EMA.COMMAND_SEPERATOR -- Add any arguments to the message (serialized and seperated). local numberArguments = select( "#", ... ) - + --EMA:Print("makecommand", numberArguments, "command",... ) for iterateArguments = 1, numberArguments do local argument = select( iterateArguments, ... ) message = message..AceSerializer:Serialize( argument ) @@ -174,7 +174,7 @@ end local function DefaultCommand( message ) local channel = nil - -- toon has to be in a group + -- toon has to be in a group if UnitInBattleground( "player" ) then channel = "INSTANCE_CHAT" elseif IsInGroup() then @@ -199,7 +199,7 @@ local function DefaultCommand( message ) end end end - --EMA:Print( "CHANNEL", channel) + --EMA:Print( "CHANNEL", channel) if channel then EMA:DebugMessage("Sending command to group.", message, "channel", channel, nil) --EMA:Print("Sending command to group.", message, "channel", channel, nil) @@ -244,12 +244,36 @@ local function CommandAll( moduleName, commandName, ... ) end end --- Should this get removed at some point and use all comms on one channel??? --- WHISPER's don't work cross-realm but do work connected-realm so sending msg to masters would not send. --- TODO: Maybe remove masters???, and fall back to everyone being the master? --- Not really sure what to do so for now will keep with the master, and whisper them, --- if was to use party/raid then everyone will get the command and masters would not work. +-- Classic/tbc Due to a Slow/nonsending Comms in party/raid when Sending settings Tables we need fall over Whisper/Guild +local function CommandSettings( moduleName, commandName, ... ) +--[[ + if EMAPrivate.Core.isEmaClassicBuild() == false then + CommandAll( moduleName, commandName, ... ) + else +]] + local message = CreateCommandToSend( moduleName, commandName, ... ) + if EMA.db.useGuildComms == true then + CommandGuild( message ) + else + for characterName, characterOrder in EMAPrivate.Team.TeamList() do + EMA:DebugMessage( "Toon not in party:", characterName) + if IsCharacterOnline( characterName ) == true then + EMA:DebugMessage("Sending command to others not in party/raid.", message, "WHISPER", characterName) + EMA:SendCommMessage( + EMA.COMMAND_PREFIX, + message, + EMA.COMMUNICATION_WHISPER, + characterName, + EMA.COMMUNICATION_PRIORITY_BULK + ) + --EMA:Print("testWis", EMA.COMMAND_PREFIX, EMA.COMMUNICATION_WHISPER, characterName , EMA.COMMUNICATION_PRIORITY_ALERT) + end + end + end +-- end +end +-- Is This is use? -- Send a command to the master. local function CommandMaster( moduleName, commandName, ... ) EMA:DebugMessage( "Command Master: ", moduleName, commandName, ... ) @@ -269,7 +293,8 @@ local function CommandMaster( moduleName, commandName, ... ) end end --- Send a command to the master. +-- Is This is use? +-- Send a command to the Toon. local function CommandToon( moduleName, characterName, commandName, ... ) -- Get the message to send. local message = CreateCommandToSend( moduleName, commandName, ... ) @@ -342,6 +367,7 @@ function EMA:CommandReceived( prefix, message, distribution, sender ) local argumentsTableSerialized = { strsplit( EMA.COMMAND_ARGUMENT_SEPERATOR, argumentsStringSerialized ) } for index, argumentSerialized in ipairs( argumentsTableSerialized ) do local success, argument = AceSerializer:Deserialize( argumentSerialized ) + --EMA:Print("testSerialized", success, argument ) if success == true then table.insert( argumentsTable, argument ) else @@ -372,7 +398,7 @@ end local function SendSettings( moduleName, settings ) -- Send a push settings command to all. --EMA:Print("test", moduleName, EMA.COMMAND_INTERNAL_SEND_SETTINGS, settings ) - CommandAll( moduleName, EMA.COMMAND_INTERNAL_SEND_SETTINGS, settings ) + CommandSettings( moduleName, EMA.COMMAND_INTERNAL_SEND_SETTINGS, settings ) end -- Command all members of the current team. diff --git a/Core/Core.lua b/Core/Core.lua index f7ef5cf..9556a3e 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -39,7 +39,7 @@ EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\NewsIcon.tga" EMA.pofileIcon = "Interface\\Addons\\EMA\\Media\\SettingsIcon.tga" -- order EMA.moduleOrder = 1 - +local version = GetAddOnMetadata("EMA", "version") -- Load libraries. local AceGUI = LibStub("AceGUI-3.0") @@ -52,8 +52,9 @@ EMAPrivate.SettingsFrame = {} EMAPrivate.SettingsFrame.Widget = AceGUI:Create( "EMAWindow" ) EMAPrivate.SettingsFrame.Widget:SetTitle( "" ) EMAPrivate.SettingsFrame.Widget:SetStatusText(L["STATUSTEXT"]) -EMAPrivate.SettingsFrame.Widget:SetWidth(900) -EMAPrivate.SettingsFrame.Widget:SetHeight(800) +EMAPrivate.SettingsFrame.Widget:EnableResize( false ) +EMAPrivate.SettingsFrame.Widget:SetWidth(800) +EMAPrivate.SettingsFrame.Widget:SetHeight(700) EMAPrivate.SettingsFrame.Widget:SetLayout( "Fill" ) EMAPrivate.SettingsFrame.WidgetTree = AceGUI:Create( "EMATreeGroup" ) EMAPrivate.SettingsFrame.WidgetTree:SetLayout( "Fill" ) @@ -93,7 +94,7 @@ local function InitializePopupDialogs() exclusive = 1, hideOnEscape = 1, whileDead = 1, - } + } StaticPopupDialogs["CAN_NOT_RUN_JAMBA_AND_EMA"] = { text = L["CAN_NOT_RUN_JAMBA_AND_EMA"], button1 = OKAY, @@ -106,7 +107,7 @@ local function InitializePopupDialogs() exclusive = 1, hideOnEscape = 0, whileDead = 1, - } + } StaticPopupDialogs["UpgradeTo_v2"] = { text = L["v2_NEWS"], button1 = OKAY, @@ -121,7 +122,7 @@ local function InitializePopupDialogs() } end -local function EMASettingsTreeSort( a, b ) +local function EmaSettingsTreeSort( a, b ) local aText = "" local bText = "" local aEMAOrder = 0 @@ -148,7 +149,7 @@ local function EMASettingsTreeSort( a, b ) return aEMAOrder < bEMAOrder end -local function EMATreeGroupTreeGetParent( parentName ) +local function EmaTreeGroupTreeGetParent( parentName ) local parent for index, tableInfo in ipairs( EMAPrivate.SettingsFrame.Tree.Data ) do if tableInfo.value == parentName then @@ -158,35 +159,35 @@ local function EMATreeGroupTreeGetParent( parentName ) return parent end -local function EMAAddModuleToSettings( childName, parentName, moduleIcon, order, moduleFrame ) +local function EmaAddModuleToSettings( childName, parentName, moduleIcon, order, moduleFrame ) -- childName is the parentName then make the child the parent. if childName == parentName then - local parent = EMATreeGroupTreeGetParent( parentName ) + local parent = EmaTreeGroupTreeGetParent( parentName ) if parent == nil then table.insert( EMAPrivate.SettingsFrame.Tree.Data, { value = childName, text = childName, EMAOrder = order, icon = moduleIcon } ) - table.sort( EMAPrivate.SettingsFrame.Tree.Data, EMASettingsTreeSort ) + table.sort( EMAPrivate.SettingsFrame.Tree.Data, EmaSettingsTreeSort ) EMAPrivate.SettingsFrame.Tree.ModuleFrames[childName] = moduleFrame end else - local parent = EMATreeGroupTreeGetParent( parentName ) + local parent = EmaTreeGroupTreeGetParent( parentName ) if parent == nil then table.insert( EMAPrivate.SettingsFrame.Tree.Data, { value = parentName, text = parentName, EMAOrder = order } ) end - local parent = EMATreeGroupTreeGetParent( parentName ) + local parent = EmaTreeGroupTreeGetParent( parentName ) if parent.children == nil then parent.children = {} end table.insert( parent.children, { value = childName, text = childName, EMAOrder = order, icon = moduleIcon } ) - table.sort( EMAPrivate.SettingsFrame.Tree.Data, EMASettingsTreeSort ) - table.sort( parent.children, EMASettingsTreeSort ) + table.sort( EMAPrivate.SettingsFrame.Tree.Data, EmaSettingsTreeSort ) + table.sort( parent.children, EmaSettingsTreeSort ) EMAPrivate.SettingsFrame.Tree.ModuleFrames[childName] = moduleFrame end end -local function EMAModuleSelected( tree, event, treeValue, selected ) +local function EmaModuleSelected( tree, event, treeValue, selected ) --EMA:Print("test", tree, event, treeValue, selected) local parentValue, value = strsplit( "\001", treeValue ) if tree == nil and event == nil then @@ -209,34 +210,33 @@ local function EMAModuleSelected( tree, event, treeValue, selected ) moduleFrame.frame:SetAllPoints() moduleFrame.frame:Show() EMAPrivate.SettingsFrame.Tree.CurrentChild = moduleFrame - if value == L["OPTIONS"] then + if value == L["OPTIONS"] then LibStub( "AceConfigDialog-3.0" ):Open( EMA.moduleName..L["OPTIONS"], moduleFrame ) - end + end return end end end + EMAPrivate.SettingsFrame.Tree = {} EMAPrivate.SettingsFrame.Tree.Data = {} EMAPrivate.SettingsFrame.Tree.ModuleFrames = {} EMAPrivate.SettingsFrame.Tree.CurrentChild = nil -EMAPrivate.SettingsFrame.Tree.Add = EMAAddModuleToSettings -EMAPrivate.SettingsFrame.Tree.ButtonClick = EMAModuleSelected +EMAPrivate.SettingsFrame.Tree.Add = EmaAddModuleToSettings +EMAPrivate.SettingsFrame.Tree.ButtonClick = EmaModuleSelected EMAPrivate.SettingsFrame.WidgetTree:SetTree( EMAPrivate.SettingsFrame.Tree.Data ) EMAPrivate.SettingsFrame.WidgetTree:SetCallback( "OnClick", EMAPrivate.SettingsFrame.Tree.ButtonClick ) EMAPrivate.SettingsFrame.Widget:Hide() ---table.insert( UISpecialFrames, "EMASettingsWindowsFrame" ) -- Settings - the values to store and their defaults for the settings database. EMA.settings = { global = { - ['**'] = { - showStartupMessage8000 = false, - showStartupMessage2000 = true, - showStartupMessage3000 = true - }, + showStartupMessage8000 = false, + showStartupMessage2000 = false, + showStartupMessage3000 = false, }, profile = { + useGlobalSettings = true, }, } @@ -284,7 +284,6 @@ local function GetConfiguration() } return configuration end - -- Get a settings value. function EMA:ConfigurationGetSetting( key ) return EMA.db[key[#key]] @@ -299,17 +298,6 @@ local function DebugMessage( ... ) EMA:Print( ... ) end ---WOW BetaBuild! -local function isBetaBuild() - local _, _, _, tocversion = GetBuildInfo() - -- Build For BFA 8.0.1 2018 - if tocversion >= 80000 then - return true - else - return false - end -end - --Ema Alpha local function isEmaAlphaBuild() local EMAVersion = GetAddOnMetadata("EMA", "version") @@ -321,11 +309,37 @@ local function isEmaAlphaBuild() return false end end +-- EMA classic build +local function isEmaClassicBuild() + local classic = false + -- Classic + if _G.WOW_PROJECT_ID == _G.WOW_PROJECT_CLASSIC then + classic = true + end + return classic +end + +-- EMA TBC Build +local function isEmaClassicBccBuild() + local classic = false + if _G.WOW_PROJECT_ID == _G.WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + classic = true + end + -- Classic + if _G.WOW_PROJECT_ID == _G.WOW_PROJECT_CLASSIC then + classic = true + end + return classic +end ------------------------------------------------------------------------------------------------------------- -- Module management. ------------------------------------------------------------------------------------------------------------- +local function globalSetting() + return EMA.db.useGlobalSettings +end + -- Register a EMA module. local function RegisterModule( moduleAddress, moduleName ) if EMA.registeredModulesByName == nil then @@ -388,13 +402,13 @@ function EMA:SendSettingsAllModules() end end - ------------------------------------------------------------------------------------------------------------- -- Commands sending and receiving. ------------------------------------------------------------------------------------------------------------- -- Send a command for the module specified (using its address) to other EMA Team characters. local function SendCommandToTeam( moduleAddress, commandName, ... ) + --EMA:Print("test", moduleAddress, commandName) -- Get the name of the module. local moduleName = EMA.registeredModulesByAddress[moduleAddress] -- Send the command identified by the module name. @@ -570,23 +584,13 @@ function EMA:OnInitialize() -- Create the settings frame. EMA:CoreSettingsCreate() EMA.settingsFrame = EMA.settingsControl.widgetSettings.frame - -- TODO DO WE NEED THIS ?????? - --[[ - -- Blizzard options frame. - local frame = CreateFrame( "Frame" ) - frame.name = L["EMA"] - local button = CreateFrame( "Button", nil, frame, "OptionsButtonTemplate" ) - button:SetPoint( "CENTER" ) - button:SetText( "/EMA" ) - button:SetScript( "OnClick", EMA.LoadEMASettings ) - InterfaceOptions_AddCategory( frame ) - ]] -- Create the settings profile support. LibStub( "AceConfig-3.0" ):RegisterOptionsTable( EMA.moduleName..L["OPTIONS"], LibStub( "AceDBOptions-3.0" ):GetOptionsTable( EMA.completeDatabase ) ) local profileContainerWidget = AceGUI:Create( "ScrollFrame" ) + --local profileContainerWidget = AceGUI:Create( "Frame" ) profileContainerWidget:SetLayout( "Fill" ) -- We need this to make it a working Module local order = 10 @@ -595,9 +599,11 @@ function EMA:OnInitialize() -- Register the core as a module. RegisterModule( EMA, EMA.moduleName ) -- Register the chat command. - EMA:RegisterChatCommand( EMA.chatCommand, "EMAChatCommand" ) + EMA:RegisterChatCommand( EMA.chatCommand, "EMAChatCommand" ) + -- Populate the settings. + EMA:SettingsRefresh() end - +--[[ function EMA:LoadEMAModule( moduleName ) local loaded, reason = LoadAddOn( moduleName ) if not loaded then @@ -606,10 +612,10 @@ function EMA:LoadEMAModule( moduleName ) end end end - +]] function EMA:CoreSettingsCreateInfo( top ) -- Get positions and dimensions. - local buttonPushAllSettingsWidth = 200 + local buttonWidth = 200 local buttonHeight = EMAHelperSettings:GetButtonHeight() local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight() local radioBoxHeight = EMAHelperSettings:GetRadioBoxHeight() @@ -632,186 +638,61 @@ function EMA:CoreSettingsCreateInfo( top ) local movingTop = top -- A blank to get layout to show right? EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false ) - movingTop = movingTop - headingHeight + --Main Heading + movingTop = movingTop - checkBoxHeight EMAHelperSettings:CreateHeading( EMA.settingsControl, L["STATUSTEXT"], movingTop, false ) movingTop = movingTop - headingHeight - EMA.settingsControl.labelInformation1 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - column2Left, - movingTop, - L["ME"] - ) - movingTop = movingTop + movingTop * 2 - EMAHelperSettings:CreateHeading( EMA.settingsControl, L["RELEASE_NOTES"]..GetAddOnMetadata("EMA", "version") , movingTop, false ) - movingTop = movingTop - headingHeight - EMA.settingsControl.labelInformation10 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - column2Left, - movingTop, - L["TEXT1"] - ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation11 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - column2Left, - movingTop, - L["TEXT2"] - ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation12 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - column2Left, - movingTop, - L["TEXT3"] - ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation13 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - column2Left, - movingTop, - L["TEXT4"] - ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation14 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - column2Left, - movingTop, - L["TEXT5"] - ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation15 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - column2Left, - movingTop, - L["TEXT6"] - ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation16 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - column2Left, - movingTop, - L["TEXT7"] - ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation17 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - column2Left, - movingTop, - L["TEXT8"] - ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation18 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - column2Left, - movingTop, - L["TEXT9"] - ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation19 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - column2Left, - movingTop, - L["TEXT10"] - ) - --movingTop = movingTop - labelContinueHeight - -- Useful websites Heading - movingTop = movingTop - labelContinueHeight * 2 - EMAHelperSettings:CreateHeading( EMA.settingsControl, L["WEBSITES"], movingTop, false ) - movingTop = movingTop - headingHeight - EMA.settingsControl.labelInformation30 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - column2Left, - movingTop, - L["TEMP_WEBSITE1"] - ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation21 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - column2Left, - movingTop, - L["ME_TWITTER"] - - ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation22 = EMAHelperSettings:CreateContinueLabel( + EMA.settingsControl.labelInformation2 = EMAHelperSettings:CreateContinueLabel( EMA.settingsControl, headingWidth, - column2Left, + left, movingTop, - L["D-B"] + L["VERSION"]..L[": "]..version ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation23 = EMAHelperSettings:CreateContinueLabel( + movingTop = movingTop - labelHeight + EMA.settingsControl.labelInformation1 = EMAHelperSettings:CreateContinueLabel( EMA.settingsControl, headingWidth, - column2Left, + left, movingTop, - L["ISB"] + L["ME"] ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation24 = EMAHelperSettings:CreateContinueLabel( + movingTop = movingTop - labelHeight + EMA.settingsControl.labelInformation2 = EMAHelperSettings:CreateContinueLabel( EMA.settingsControl, headingWidth, - column2Left, + left, movingTop, - L["TEMP_WEBSITE2"] + L["ME_TWITTER"] ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation25 = EMAHelperSettings:CreateContinueLabel( + + movingTop = movingTop - labelHeight * 14 + EMA.settingsControl.buttonKeyBindings = EMAHelperSettings:CreateButton( EMA.settingsControl, - headingWidth, - column2Left, + buttonWidth, + left, movingTop, - L["TEMP_WEBSITE3"] + L["KEY_BINDINGS"], + EMA.SettingsKeyBindingsCommandClick ) -- Special thanks Heading - movingTop = movingTop - buttonHeight + movingTop = movingTop - buttonHeight * 1 EMAHelperSettings:CreateHeading( EMA.settingsControl, L["SPECIAL_THANKS"], movingTop, false ) movingTop = movingTop - headingHeight EMA.settingsControl.labelInformation20 = EMAHelperSettings:CreateContinueLabel( EMA.settingsControl, headingWidth, - column2Left, + left, movingTop, L["THANKS1"] ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation21 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - column2Left, - movingTop, - L["THANKS2"] - - ) - movingTop = movingTop - labelContinueHeight - EMA.settingsControl.labelInformation22 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - column2Left, - movingTop, - L["THANKS3"] - ) --CopyRight heading - movingTop = movingTop - labelContinueHeight * 4 + movingTop = movingTop - labelContinueHeight * 3 EMA.settingsControl.labelInformation40 = EMAHelperSettings:CreateContinueLabel( EMA.settingsControl, headingWidth, - column2Left, + left, movingTop, L["COPYRIGHT"] ) @@ -819,7 +700,7 @@ function EMA:CoreSettingsCreateInfo( top ) EMA.settingsControl.labelInformation41 = EMAHelperSettings:CreateContinueLabel( EMA.settingsControl, headingWidth, - column2Left, + left, movingTop, L["COPYRIGHTTWO"] ) @@ -852,6 +733,7 @@ function EMA:OnEMAProfileChanged() end function EMA:SettingsRefresh() + --EMA.settingsControl.checkBoxGlobalSettings:SetValue( EMA.db.useGlobalSettings ) end -- Core settings received. @@ -859,9 +741,6 @@ function EMA:EMAOnSettingsReceived( characterName, settings ) --Checks character is not the the character that send the settings. Now checks the character has a realm on there name to match EMA team list. --characterName = EMAUtilities:AddRealmToNameIfMissing( characterName ) if characterName ~= EMA.characterName then - -- Update the settings. - -- TODO: What is this minimap icon? - EMA.db.showMinimapIcon = settings.showMinimapIcon -- Refresh the settings. EMA:SettingsRefresh() -- Tell the player. @@ -869,13 +748,10 @@ function EMA:EMAOnSettingsReceived( characterName, settings ) end end ---[[ -function EMA:LoadEMASettings() - InterfaceOptionsFrameCancel_OnClick() - HideUIPanel( GameMenuFrame ) - EMA:EMAChatCommand( "" ) +function EMA:SettingsKeyBindingsCommandClick( event ) + KeyBindingFrame_LoadUI() + ShowUIPanel(KeyBindingFrame) end -]] -- Does the Chat Command Exist local function DoesTheChatCommandExist( configuration, command ) @@ -927,13 +803,19 @@ end function EMA:ResetSettingsFrame() EMA:Print( L["FRAME_RESET"] ) - EMAPrivate.SettingsFrame.Widget:SetPoint("TOPLEFT", 0, 0) - EMAPrivate.SettingsFrame.Widget:SetWidth(900) - EMAPrivate.SettingsFrame.Widget:SetHeight(800) + EMAPrivate.SettingsFrame.Widget:SetPoint("CENTER", 0, 0) + EMAPrivate.SettingsFrame.Widget:SetWidth(800) + EMAPrivate.SettingsFrame.Widget:SetHeight(700) EMAPrivate.SettingsFrame.Widget:Show() end -function EMA:SettingsTestBox( event, checked) +function EMA:SettingsToggleGlobalSettings( event, checked ) + EMA.db.useGlobalSettings = checked + StaticPopup_Show( "MUST_RELOAD_UI" ) + EMA:SettingsRefresh() +end + +function EMA:SettingsTestBox( event, checked ) print("test", checked , EMA.db.testBox) EMA.db.testBox = checked EMA:SettingsRefresh() @@ -941,6 +823,7 @@ function EMA:SettingsTestBox( event, checked) end -- Functions available from EMA Core for other EMA internal objects. +EMAPrivate.Core.globalSetting = globalSetting EMAPrivate.Core.RegisterModule = RegisterModule EMAPrivate.Core.UnRegisterModule = UnRegisterModule EMAPrivate.Core.SendSettings = SendSettings @@ -949,6 +832,9 @@ EMAPrivate.Core.SendCommandToTeam = SendCommandToTeam EMAPrivate.Core.SendCommandToMaster = SendCommandToMaster EMAPrivate.Core.SendCommandToToon = SendCommandToToon EMAPrivate.Core.OnCommandReceived = OnCommandReceived -EMAPrivate.Core.isBetaBuild = isBetaBuild +EMAPrivate.Core.isEmaClassicBuild = isEmaClassicBuild +EMAPrivate.Core.isEmaClassicBccBuild = isEmaClassicBccBuild + EMAPrivate.Core.isEmaAlphaBuild = isEmaAlphaBuild -EMAPrivate.Core.SendSettingsAllModules = EMA.SendSettingsAllModules \ No newline at end of file +EMAPrivate.Core.SendSettingsAllModules = EMA.SendSettingsAllModules +EMAPrivate.Core.RefreshSettingsAllModules = EMA.RefreshSettingsAllModules \ No newline at end of file diff --git a/Core/Message.lua b/Core/Message.lua index 6a184eb..6b2e7b7 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- diff --git a/Core/Module.lua b/Core/Module.lua index 3edcac6..fdcba4a 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- diff --git a/Core/Tag.lua b/Core/Tag.lua index 4739eb4..e9356bd 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- diff --git a/Core/Team.lua b/Core/Team.lua index e4f4527..2e231ca 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -38,10 +38,29 @@ EMA.moduleOrder = 20 -- EMA key bindings. -BINDING_HEADER_TEAM = L["TEAM"] BINDING_NAME_TEAMINVITE = L["INVITE_GROUP"] BINDING_NAME_TEAMDISBAND = L["DISBAND_GROUP"] BINDING_NAME_TEAMMASTER = L["SET_MASTER"] +BINDING_NAME_CLICKTOMOVE = L["BINDING_CLICK_TO_MOVE"] +BINDING_NAME_MASTERFOCUS = L["SET_FOCUS_MASTER"] +BINDING_NAME_MASTERTARGET = L["SET_MASTER_TARGET"] +BINDING_NAME_MASTERASSIST = L["SET_MASTER_ASSIST"] +-- EMA Focus key bindings +BINDING_NAME_FOCUS1 = L["SET_FOCUS_ONE"] +BINDING_NAME_FOCUS2 = L["SET_FOCUS_TWO"] +BINDING_NAME_FOCUS3 = L["SET_FOCUS_THREE"] +BINDING_NAME_FOCUS4 = L["SET_FOCUS_FOUR"] +BINDING_NAME_FOCUS5 = L["SET_FOCUS_FIVE"] +BINDING_NAME_FOCUS6 = L["SET_FOCUS_SIX"] +BINDING_NAME_FOCUS7 = L["SET_FOCUS_SEVEN"] +BINDING_NAME_FOCUS8 = L["SET_FOCUS_EIGHT"] +BINDING_NAME_FOCUS9 = L["SET_FOCUS_NINE"] +BINDING_NAME_FOCUS10 = L["SET_FOCUS_TEN"] + + +--Headers +BINDING_HEADER_TEAM = L["TEAM"] +BINDING_HEADER_ASTERISK = L["FAKE_KEY_BINDING"] -- Settings - the values to store and their defaults for the settings database. EMA.settings = { @@ -157,6 +176,14 @@ function EMA:GetConfiguration() get = false, set = "SetAllMembersOnline", }, + ctm = { + type = "input", + name = L["COMMANDLINE_CLICK_TO_MOVE"], + desc = L["COMMANDLINE_CLICK_TO_MOVE_HELP"], + usage = "/ema-team ctm ", + get = false, + set = "CommandClickToMove", + }, push = { type = "input", name = L["PUSH_SETTINGS"], @@ -186,6 +213,7 @@ EMA.COMMAND_SET_MASTER = "EMATeamSetMaster" -- Set Minion OffLine EMA.COMMAND_SET_OFFLINE = "EMATeamSetOffline" EMA.COMMAND_SET_ONLINE = "EMATeamSetOnline" +EMA.COMMAND_CLICK_TO_MOVE = "EMAClickToMove" ------------------------------------------------------------------------------------------------------------- @@ -218,9 +246,9 @@ EMA.simpleAreaList = {} local function SettingsCreateTeamList() -- Position and size constants. - local teamListButtonControlWidth = 250 + local teamListButtonControlWidth = 200 local iconSize = 24 - local groupListWidth = 200 + local groupListWidth = 150 local extaSpacing = 40 local rowHeight = 30 local rowsToDisplay = 8 @@ -259,8 +287,8 @@ local function SettingsCreateTeamList() EMA.settingsControl.labelTwo = EMAHelperSettings:CreateContinueLabel( EMA.settingsControl, teamListButtonControlWidth, - - teamListButtonControlWidth + iconSize + groupListWidth, + teamListWidth / 2, + teamListButtonControlWidth + iconSize + groupListWidth + 100, leftOfList, L["GROUPS_HEADER"] ) @@ -273,17 +301,21 @@ local function SettingsCreateTeamList() list.listWidth = teamListWidth list.rowHeight = rowHeight list.rowsToDisplay = rowsToDisplay - list.columnsToDisplay = 3 + list.columnsToDisplay = 4 list.columnInformation = {} list.columnInformation[1] = {} - list.columnInformation[1].width = 30 + list.columnInformation[1].width = 35 list.columnInformation[1].alignment = "LEFT" list.columnInformation[2] = {} - list.columnInformation[2].width = 55 - list.columnInformation[2].alignment = "CENTER" + list.columnInformation[2].width = 30 + list.columnInformation[2].alignment = "LEFT" list.columnInformation[3] = {} list.columnInformation[3].width = 15 - list.columnInformation[3].alignment = "RIGHT" + list.columnInformation[3].alignment = "LEFT" + list.columnInformation[4] = {} + list.columnInformation[4].width = 15 + list.columnInformation[4].alignment = "LEFT" + list.scrollRefreshCallback = EMA.SettingsTeamListScrollRefresh list.rowClickCallback = EMA.SettingsTeamListRowClick EMA.settingsControl.teamList = list @@ -520,6 +552,34 @@ local function SettingsCreatePartyInvitationsControl( top ) EMA.SettingsDeclineInviteStrangersToggle, L["CHECKBOX_DECLINE_STRANGERS_HELP"] ) + EMA.settingsControl.CickInformationlabel = EMAHelperSettings:CreateLabel( + EMA.settingsControl, + headingWidth, + left, + top - headingHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight, + "You Can Use the current [\Click] in macros" + ) + EMA.settingsControl.CickInformationlabel = EMAHelperSettings:CreateLabel( + EMA.settingsControl, + headingWidth, + left, + top - headingHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight, + "[/click EMAAssistMaster]" + ) + EMA.settingsControl.CickInformationlabel = EMAHelperSettings:CreateLabel( + EMA.settingsControl, + headingWidth, + left, + top - headingHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight, + "[/click EMATargetMaster]" + ) + EMA.settingsControl.CickInformationlabel = EMAHelperSettings:CreateLabel( + EMA.settingsControl, + headingWidth, + left, + top - headingHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight, + "[/click EMAFocusMaster]" + ) return bottomOfSection end @@ -711,10 +771,9 @@ local function IsCharacterInTeam( name ) end - -- Get the master for this character. local function GetMasterName() - return EMA.db.master + return EMA.db.master end -- Return true if the character specified is in the master. @@ -1160,7 +1219,11 @@ end -- Invite team to party. function EMA.DoTeamPartyInvite() - C_PartyInfo.InviteUnit( EMA.inviteList[EMA.currentInviteCount] ) + if EMAPrivate.Core.isEmaClassicBuild() == true or EMAPrivate.Core.isEmaClassicBccBuild() == true then + InviteUnit( EMA.inviteList[EMA.currentInviteCount] ) + else + C_PartyInfo.InviteUnit( EMA.inviteList[EMA.currentInviteCount] ) + end EMA.currentInviteCount = EMA.currentInviteCount + 1 if EMA.currentInviteCount < EMA.inviteCount then --if GetTeamListMaximumOrderOnline() > 5 and EMA.db.inviteConvertToRaid == true then @@ -1322,12 +1385,53 @@ end local function LeaveTheParty() if IsInGroup( "player" ) then - C_PartyInfo.LeaveParty() + if EMAPrivate.Core.isEmaClassicBuild() == true then + LeaveParty() + else + C_PartyInfo.LeaveParty() + end end end +function EMA:UpdateMacros() + if InCombatLockdown() then + return + end + local characterName = ( Ambiguate(EMA.db.master, "none" ) ) + local focus = "/focus " .. characterName + local target = "/target " .. characterName + local assist = "/assist " .. characterName + --EMA:Print("test", characterName, "M", focus ) + EMAFocusMaster:SetAttribute( "macrotext", focus ) + EMATargetMaster:SetAttribute( "macrotext", target ) + EMAAssistMaster:SetAttribute( "macrotext", assist ) + + local EMAFocusOneName = ( Ambiguate(EMAApi.GetCharacterNameAtOrderPosition(1), "none" ) ) + EMAFocusOne:SetAttribute( "macrotext", "/focus " .. EMAFocusOneName ) + local EMAFocusTwoName = ( Ambiguate(EMAApi.GetCharacterNameAtOrderPosition(2), "none" ) ) + EMAFocusTwo:SetAttribute( "macrotext", "/focus " .. EMAFocusTwoName ) + local EMAFocusThreeName = ( Ambiguate(EMAApi.GetCharacterNameAtOrderPosition(3), "none" ) ) + EMAFocusThree:SetAttribute( "macrotext", "/focus " .. EMAFocusThreeName ) + local EMAFocusFourName = ( Ambiguate(EMAApi.GetCharacterNameAtOrderPosition(4), "none" ) ) + EMAFocusFour:SetAttribute( "macrotext", "/focus " .. EMAFocusFourName ) + local EMAFocusFiveName = ( Ambiguate(EMAApi.GetCharacterNameAtOrderPosition(5), "none" ) ) + EMAFocusFive:SetAttribute( "macrotext", "/focus " .. EMAFocusFiveName ) + local EMAFocusSixName = ( Ambiguate(EMAApi.GetCharacterNameAtOrderPosition(6), "none" ) ) + EMAFocusSix:SetAttribute( "macrotext", "/focus " .. EMAFocusSixName ) + local EMAFocusSevenName = ( Ambiguate(EMAApi.GetCharacterNameAtOrderPosition(7), "none" ) ) + EMAFocusSeven:SetAttribute( "macrotext", "/focus " .. EMAFocusSevenName ) + local EMAFocusEightName = ( Ambiguate(EMAApi.GetCharacterNameAtOrderPosition(8), "none" ) ) + EMAFocusEight:SetAttribute( "macrotext", "/focus " .. EMAFocusEightName ) + local EMAFocusNineName = ( Ambiguate(EMAApi.GetCharacterNameAtOrderPosition(9), "none" ) ) + EMAFocusNine:SetAttribute( "macrotext", "/focus " .. EMAFocusNineName ) + local EMAFocusTenName = ( Ambiguate(EMAApi.GetCharacterNameAtOrderPosition(10), "none" ) ) + EMAFocusTen:SetAttribute( "macrotext", "/focus " .. EMAFocusTenName ) +end + + function EMA:OnMasterChange( message, characterName ) --EMA:Print("test", message, characterName) + EMA:UpdateMacros() local playerName = EMA.characterName if EMA.db.masterChangePromoteLeader == true then if IsInGroup( "player" ) and UnitIsGroupLeader( "player" ) == true and GetMasterName() ~= playerName then @@ -1343,6 +1447,27 @@ function EMA:OnMasterChange( message, characterName ) end end +function EMA:CommandClickToMove( info, parameters ) + local tag = parameters + if tag ~= nil and tag:trim() ~= "" then + EMA:EMASendCommandToTeam( EMA.COMMAND_CLICK_TO_MOVE, tag ) + end +end + +function EMA:ReceiveClickToMove( characterName, tag ) + local clickToMove = GetCVar("Autointeract") + --EMA:Print("test", characterName, tag, clickToMove ) + if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) then + if clickToMove == "1" then + ConsoleExec("Autointeract 0") + else + if characterName ~= EMA.characterName then + ConsoleExec("Autointeract 1") + end + end + end +end + --[[ function EMA:AddIsboxerMembers() if IsAddOnLoaded("Isboxer" ) then @@ -1379,21 +1504,81 @@ function EMA:OnInitialize() -- Adds DefaultGroups to GUI EMA.characterGroupList = {} -- Key bindings. - EMATeamSecureButtonInvite = CreateFrame( "CheckButton", "EMATeamSecureButtonInvite", nil, "SecureActionButtonTemplate" ) - EMATeamSecureButtonInvite:SetAttribute( "type", "macro" ) - EMATeamSecureButtonInvite:SetAttribute( "macrotext", "/ema-team invite" ) - EMATeamSecureButtonInvite:Hide() - EMATeamSecureButtonDisband = CreateFrame( "CheckButton", "EMATeamSecureButtonDisband", nil, "SecureActionButtonTemplate" ) - EMATeamSecureButtonDisband:SetAttribute( "type", "macro" ) - EMATeamSecureButtonDisband:SetAttribute( "macrotext", "/ema-team disband" ) - EMATeamSecureButtonDisband:Hide() - EMATeamSecureButtonMaster = CreateFrame( "CheckButton", "EMATeamSecureButtonMaster", nil, "SecureActionButtonTemplate" ) - EMATeamSecureButtonMaster:SetAttribute( "type", "macro" ) - EMATeamSecureButtonMaster:SetAttribute( "macrotext", "/ema-team iammaster" ) - EMATeamSecureButtonMaster:Hide() - --Sets The class of the char. - -- setClass() - + if InCombatLockdown() == false then + EMAInvite = CreateFrame( "CheckButton", "EMAInvite", nil, "SecureActionButtonTemplate" ) + EMAInvite:SetAttribute( "type", "macro" ) + EMAInvite:SetAttribute( "macrotext", "/ema-team invite" ) + EMAInvite:Hide() + + EMADisband = CreateFrame( "CheckButton", "EMADisband", nil, "SecureActionButtonTemplate" ) + EMADisband:SetAttribute( "type", "macro" ) + EMADisband:SetAttribute( "macrotext", "/ema-team disband" ) + EMADisband:Hide() + + EMAMaster = CreateFrame( "CheckButton", "EMAMaster", nil, "SecureActionButtonTemplate" ) + EMAMaster:SetAttribute( "type", "macro" ) + EMAMaster:SetAttribute( "macrotext", "/ema-team iammaster" ) + EMAMaster:Hide() + + EMAClickToMove = CreateFrame( "CheckButton", "EMAClickToMove", nil, "SecureActionButtonTemplate" ) + EMAClickToMove:SetAttribute( "type", "macro" ) + EMAClickToMove:SetAttribute( "macrotext", "/ema-team ctm all" ) + EMAClickToMove:Hide() + + EMAFocusMaster = CreateFrame( "CheckButton", "EMAFocusMaster", nil, "SecureActionButtonTemplate" ) + EMAFocusMaster:SetAttribute( "type", "macro" ) + EMAFocusMaster:Hide() + + EMATargetMaster = CreateFrame( "CheckButton", "EMATargetMaster", nil, "SecureActionButtonTemplate" ) + EMATargetMaster:SetAttribute( "type", "macro" ) + EMATargetMaster:Hide() + + EMAAssistMaster = CreateFrame( "CheckButton", "EMAAssistMaster", nil, "SecureActionButtonTemplate" ) + EMAAssistMaster:SetAttribute( "type", "macro" ) + EMAAssistMaster:Hide() + + EMAFocusOne = CreateFrame( "CheckButton", "EMAFocusOne", nil, "SecureActionButtonTemplate" ) + EMAFocusOne:SetAttribute( "type", "macro" ) + EMAFocusOne:Hide() + + EMAFocusTwo = CreateFrame( "CheckButton", "EMAFocusTwo", nil, "SecureActionButtonTemplate" ) + EMAFocusTwo:SetAttribute( "type", "macro" ) + EMAFocusTwo:Hide() + + EMAFocusThree = CreateFrame( "CheckButton", "EMAFocusThree", nil, "SecureActionButtonTemplate" ) + EMAFocusThree:SetAttribute( "type", "macro" ) + EMAFocusThree:Hide() + + EMAFocusFour = CreateFrame( "CheckButton", "EMAFocusFour", nil, "SecureActionButtonTemplate" ) + EMAFocusFour:SetAttribute( "type", "macro" ) + EMAFocusFour:Hide() + + EMAFocusFive = CreateFrame( "CheckButton", "EMAFocusFive", nil, "SecureActionButtonTemplate" ) + EMAFocusFive:SetAttribute( "type", "macro" ) + EMAFocusFive:Hide() + + EMAFocusSix = CreateFrame( "CheckButton", "EMAFocusSix", nil, "SecureActionButtonTemplate" ) + EMAFocusSix:SetAttribute( "type", "macro" ) + EMAFocusSix:Hide() + + EMAFocusSeven = CreateFrame( "CheckButton", "EMAFocusSeven", nil, "SecureActionButtonTemplate" ) + EMAFocusSeven:SetAttribute( "type", "macro" ) + EMAFocusSeven:Hide() + + EMAFocusEight = CreateFrame( "CheckButton", "EMAFocusEight", nil, "SecureActionButtonTemplate" ) + EMAFocusEight:SetAttribute( "type", "macro" ) + EMAFocusEight:Hide() + + EMAFocusNine = CreateFrame( "CheckButton", "EMAFocusNine", nil, "SecureActionButtonTemplate" ) + EMAFocusNine:SetAttribute( "type", "macro" ) + EMAFocusNine:Hide() + + EMAFocusTen = CreateFrame( "CheckButton", "EMAFocusTen", nil, "SecureActionButtonTemplate" ) + EMAFocusTen:SetAttribute( "type", "macro" ) + EMAFocusTen:Hide() + + EMA:UpdateMacros() + end end -- Called when the addon is enabled. @@ -1506,9 +1691,11 @@ function EMA:SettingsTeamListScrollRefresh() EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetText( "" ) EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetText( "" ) EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[3].textString:SetText( "" ) + EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[4].textString:SetText( "" ) EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) + EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[4].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) EMA.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + EMA.settingsControl.teamListOffset @@ -1558,6 +1745,10 @@ function EMA:SettingsTeamListScrollRefresh() EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetText( displayCharacterName ) EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetText( displayCharacterRleam ) EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[3].textString:SetText( displayOnline ) + local key1 = "" + key1 = GetBindingKey( "FOCUS"..iterateDisplayRows ) + --EMA:Print("test", key1, "FOCUS"..iterateDisplayRows ) + EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[4].textString:SetText( key1 ) -- Highlight the selected row. if dataRowNumber == EMA.settingsControl.teamListHighlightRow then EMA.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) @@ -1812,25 +2003,122 @@ function EMA:UPDATE_BINDINGS() ClearOverrideBindings( EMA.keyBindingFrame ) local key1, key2 = GetBindingKey( "TEAMINVITE" ) if key1 then - SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMATeamSecureButtonInvite" ) + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAInvite" ) end if key2 then - SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMATeamSecureButtonInvite" ) + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAInvite" ) end local key1, key2 = GetBindingKey( "TEAMDISBAND" ) if key1 then - SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMATeamSecureButtonDisband" ) + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMADisband" ) end if key2 then - SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMATeamSecureButtonDisband" ) + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMADisband" ) end local key1, key2 = GetBindingKey( "TEAMMASTER" ) if key1 then - SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMATeamSecureButtonMaster" ) + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAMaster" ) end if key2 then - SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMATeamSecureButtonMaster" ) + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAMaster" ) + end + local key1, key2 = GetBindingKey( "MASTERFOCUS" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFocusMaster" ) end + if key2 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFocusMaster" ) + end + local key1, key2 = GetBindingKey( "MASTERTARGET" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMATargetMaster" ) + end + if key2 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMATargetMaster" ) + end + local key1, key2 = GetBindingKey( "MASTERASSIST" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAAssistMaster" ) + end + if key2 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAAssistMaster" ) + end + local key1, key2 = GetBindingKey( "CLICKTOMOVE" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAClickToMove" ) + end + if key2 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAClickToMove" ) + end + local key1, key2 = GetBindingKey( "FOCUS1" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFocusOne" ) + end + if key2 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFocusOne" ) + end + local key1, key2 = GetBindingKey( "FOCUS2" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFocusTwo" ) + end + if key2 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFocusTwo" ) + end + local key1, key2 = GetBindingKey( "FOCUS3" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFocusThree" ) + end + if key2 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFocusThree" ) + end + local key1, key2 = GetBindingKey( "FOCUS4" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFocusFour" ) + end + if key2 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFocusFour" ) + end + local key1, key2 = GetBindingKey( "FOCUS5" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFocusFive" ) + end + if key2 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFocusFive" ) + end + local key1, key2 = GetBindingKey( "FOCUS6" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFocusSix" ) + end + local key1, key2 = GetBindingKey( "FOCUS7" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFocusSix" ) + end + if key2 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFocusSeven" ) + end + local key1, key2 = GetBindingKey( "FOCUS8" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFocusEight" ) + end + if key2 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFocusEight" ) + end + local key1, key2 = GetBindingKey( "FOCUS9" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFocusNine" ) + end + if key2 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFocusNine" ) + end + local key1, key2 = GetBindingKey( "FOCUS10" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFocusTen" ) + end + if key2 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFocusTen" ) + end + + end ------------------------------------------------------------------------------------------------------------- @@ -1838,31 +2126,26 @@ end ------------------------------------------------------------------------------------------------------------- function EMA:EMAOnCommandReceived( sender, commandName, ... ) + if IsCharacterInTeam( sender ) == false then + return + end if commandName == EMA.COMMAND_LEAVE_PARTY then - if IsCharacterInTeam( sender ) == true then - LeaveTheParty() - end + LeaveTheParty() end if commandName == EMA.COMMAND_SET_MASTER then - if IsCharacterInTeam( sender ) == true then - EMA:ReceiveCommandSetMaster( ... ) - end + EMA:ReceiveCommandSetMaster( ... ) end - --Ebony if commandName == EMA.COMMAND_SET_OFFLINE then - if IsCharacterInTeam( sender ) == true then - EMA.ReceivesetOffline( ... ) - end + EMA:ReceivesetOffline( ... ) end if commandName == EMA.COMMAND_SET_ONLINE then - if IsCharacterInTeam( sender ) == true then - EMA.ReceivesetOnline( ... ) - end + EMA:ReceivesetOnline( ... ) end if commandName == EMA.COMMAND_TAG_PARTY then - if IsCharacterInTeam( sender ) == true then - EMA.doTagParty( characterName, tag, ... ) - end + EMA:doTagParty( characterName, tag, ... ) + end + if commandName == EMA.COMMAND_CLICK_TO_MOVE then + EMA:ReceiveClickToMove( sender, ... ) end end @@ -1872,6 +2155,7 @@ EMAPrivate.Team.MESSAGE_TEAM_ORDER_CHANGED = EMA.MESSAGE_TEAM_ORDER_CHANGED EMAPrivate.Team.MESSAGE_TEAM_CHARACTER_ADDED = EMA.MESSAGE_TEAM_CHARACTER_ADDED EMAPrivate.Team.MESSAGE_TEAM_CHARACTER_REMOVED = EMA.MESSAGE_TEAM_CHARACTER_REMOVED EMAPrivate.Team.TeamList = TeamList +EMAPrivate.Team.TeamListOrdered = TeamListOrdered EMAPrivate.Team.IsCharacterInTeam = IsCharacterInTeam EMAPrivate.Team.IsCharacterTheMaster = IsCharacterTheMaster EMAPrivate.Team.GetMasterName = GetMasterName @@ -1885,6 +2169,7 @@ EMAPrivate.Team.setOffline = setOffline EMAPrivate.Team.setOnline = setOline EMAPrivate.Team.RefreshGroupList = RefreshGroupList + -- Functions available for other addons. EMAApi.MESSAGE_TEAM_MASTER_CHANGED = EMA.MESSAGE_TEAM_MASTER_CHANGED EMAApi.MESSAGE_TEAM_ORDER_CHANGED = EMA.MESSAGE_TEAM_ORDER_CHANGED @@ -1916,3 +2201,4 @@ EMAApi.CommandIAmMaster = EMA.CommandIAmMaster --EMAApi.SetClass = setClass EMAApi.GroupAreaList = EMA.GroupAreaList EMAApi.refreshDropDownList = refreshDropDownList +EMAApi.UpdateMacros = EMA.UpdateMacros \ No newline at end of file diff --git a/EMA.toc b/EMA.toc index 00ba644..19b12ca 100644 --- a/EMA.toc +++ b/EMA.toc @@ -1,13 +1,13 @@ -## Interface: 90001 +## Interface: 90200 ## Title: EMA ## Notes: Ebony's MultiBoxing Assistant ## Author: Jennifer Calladine 'Ebony' -## Version: v9.0.1-Release-v3.1(0170) -## SavedVariables: CoreProfileDB, CommunicationsProfileDB, TeamProfileDB, TagProfileDB, MessageProfileDB, InformationProfileDB, DisplayTeamProfileDB, FollowProfileDB, GuildProfileDB, InteractionProfileDB, ItemUseProfileDB, PurchaseProfileDB, QuestProfileDB, QuestWatcherProfileDB, SellProfileDB, TalkProfileDB, ToonProfileDB, TradeProfileDB, MailProfileDB, BankProfileDB, ISBoxerProfileDB +## Version: Release-v4.1(0208) +## SavedVariables: CoreProfileDB, CommunicationsProfileDB, TeamProfileDB, TagProfileDB, MessageProfileDB, InformationProfileDB, InformationClassicProfileDB, DisplayTeamProfileDB, FollowProfileDB, GuildProfileDB, InteractionProfileDB, ItemUseProfileDB, PurchaseProfileDB, QuestProfileDB, QuestWatcherProfileDB, SellProfileDB, TalkProfileDB, ToonProfileDB, TradeProfileDB, MailProfileDB, BankProfileDB, ISBoxerProfileDB #Libs Embeds.xml -EbonyUtilities.lua +Libs\EbonyUtilities.lua #Locales Locales\Locales.xml diff --git a/EMA_Mainline.toc b/EMA_Mainline.toc new file mode 100644 index 0000000..19b12ca --- /dev/null +++ b/EMA_Mainline.toc @@ -0,0 +1,28 @@ +## Interface: 90200 +## Title: EMA +## Notes: Ebony's MultiBoxing Assistant +## Author: Jennifer Calladine 'Ebony' +## Version: Release-v4.1(0208) +## SavedVariables: CoreProfileDB, CommunicationsProfileDB, TeamProfileDB, TagProfileDB, MessageProfileDB, InformationProfileDB, InformationClassicProfileDB, DisplayTeamProfileDB, FollowProfileDB, GuildProfileDB, InteractionProfileDB, ItemUseProfileDB, PurchaseProfileDB, QuestProfileDB, QuestWatcherProfileDB, SellProfileDB, TalkProfileDB, ToonProfileDB, TradeProfileDB, MailProfileDB, BankProfileDB, ISBoxerProfileDB + +#Libs +Embeds.xml +Libs\EbonyUtilities.lua + +#Locales +Locales\Locales.xml + +#GUI +GUI\EMAHelperSettings.lua + +#Core +Core\Core.lua +Core\Module.lua +Core\Communications.lua + +Core\Team.lua +Core\Tag.lua +Core\Message.lua + +#Modules +Modules\Modules.xml \ No newline at end of file diff --git a/EMA_TBC.toc b/EMA_TBC.toc new file mode 100644 index 0000000..ab672e0 --- /dev/null +++ b/EMA_TBC.toc @@ -0,0 +1,28 @@ +## Interface: 20502 +## Title: EMA +## Notes: Ebony's MultiBoxing Assistant +## Author: Jennifer Calladine 'Ebony' +## Version: Release-v4.1(0208) +## SavedVariables: CoreProfileDB, CommunicationsProfileDB, TeamProfileDB, TagProfileDB, MessageProfileDB, InformationProfileDB, InformationClassicProfileDB, DisplayTeamProfileDB, FollowProfileDB, GuildProfileDB, InteractionProfileDB, ItemUseProfileDB, PurchaseProfileDB, QuestProfileDB, QuestWatcherProfileDB, SellProfileDB, TalkProfileDB, ToonProfileDB, TradeProfileDB, MailProfileDB, BankProfileDB, ISBoxerProfileDB + +#Libs +Embeds.xml +Libs\EbonyUtilities.lua + +#Locales +Locales\Locales.xml + +#GUI +GUI\EMAHelperSettings.lua + +#Core +Core\Core.lua +Core\Module.lua +Core\Communications.lua + +Core\Team.lua +Core\Tag.lua +Core\Message.lua + +#Modules +Modules\Modules.xml \ No newline at end of file diff --git a/EMA_Vanilla.toc b/EMA_Vanilla.toc new file mode 100644 index 0000000..d9f30a4 --- /dev/null +++ b/EMA_Vanilla.toc @@ -0,0 +1,28 @@ +## Interface: 11402 +## Title: EMA +## Notes: Ebony's MultiBoxing Assistant +## Author: Jennifer Calladine 'Ebony' +## Version: Release-v4.1(0208) +## SavedVariables: CoreProfileDB, CommunicationsProfileDB, TeamProfileDB, TagProfileDB, MessageProfileDB, InformationProfileDB, InformationClassicProfileDB, DisplayTeamProfileDB, FollowProfileDB, GuildProfileDB, InteractionProfileDB, ItemUseProfileDB, PurchaseProfileDB, QuestProfileDB, QuestWatcherProfileDB, SellProfileDB, TalkProfileDB, ToonProfileDB, TradeProfileDB, MailProfileDB, BankProfileDB, ISBoxerProfileDB + +#Libs +Embeds.xml +Libs\EbonyUtilities.lua + +#Locales +Locales\Locales.xml + +#GUI +GUI\EMAHelperSettings.lua + +#Core +Core\Core.lua +Core\Module.lua +Core\Communications.lua + +Core\Team.lua +Core\Tag.lua +Core\Message.lua + +#Modules +Modules\Modules.xml \ No newline at end of file diff --git a/GUI/AceGUIContainer-EMATreeGroup.lua b/GUI/AceGUIContainer-EMATreeGroup.lua index de9a4ee..4359f80 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -61,7 +61,7 @@ do end end -local DEFAULT_TREE_WIDTH = 200 +local DEFAULT_TREE_WIDTH = 170 local DEFAULT_TREE_SIZABLE = true --[[----------------------------------------------------------------------------- diff --git a/GUI/AceGUIContainer-EMAWindow.lua b/GUI/AceGUIContainer-EMAWindow.lua index 54e1725..0992c43 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -156,14 +156,14 @@ local methods = { ["Show"] = function(self) self.frame:Show() end, - + ["EnableResize"] = function(self, state) local func = state and "Show" or "Hide" self.sizer_se[func](self.sizer_se) self.sizer_s[func](self.sizer_s) self.sizer_e[func](self.sizer_e) end, - + -- called to set an external table to store status in ["SetStatusTable"] = function(self, status) assert(type(status) == "table") @@ -206,7 +206,7 @@ local PaneBackdrop = { local function Constructor() - local frame = CreateFrame("Frame", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil) + local frame = CreateFrame("Frame", "EmaConfigFrame", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil) frame:Hide() frame:EnableMouse(true) @@ -221,6 +221,8 @@ local function Constructor() frame:SetToplevel(true) frame:SetScript("OnHide", Frame_OnClose) frame:SetScript("OnMouseDown", Frame_OnMouseDown) + -- add this frame to a list of frames that get closed with escape key + table.insert(UISpecialFrames, frame:GetName() ) local closebutton = CreateFrame("Button", nil, frame, "UIPanelButtonTemplate") closebutton:SetScript("OnClick", Button_OnClick) diff --git a/GUI/AceGUIWidget-EMAContinueLabel.lua b/GUI/AceGUIWidget-EMAContinueLabel.lua index c8edb63..6f27901 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- 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 c88d1dd..5a766f0 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- diff --git a/GUI/EMAHelperSettings.lua b/GUI/EMAHelperSettings.lua index 0876f0e..e82e6d6 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -27,7 +27,7 @@ local AceGUI = LibStub( "AceGUI-3.0" ) AceGUI:RegisterLayout( "EMAManual", function(content, children) end ) -AceGUI:RegisterLayout("EMAFill", +AceGUI:RegisterLayout("EMAuiFill", function(content, children) if children[1] then local offset = 12 @@ -85,29 +85,31 @@ function EMAHelperSettings:CreateSettings( settingsControl, displayName, parentD order = 1000 end + local containerWidgetSettings = AceGUI:Create( "SimpleGroup" ) containerWidgetSettings:SetLayout( "Fill" ) local widgetSettings = AceGUI:Create( "ScrollFrame" ) - widgetSettings:SetLayout( "EMAFill" ) + widgetSettings:SetLayout( "EMAuiFill" ) containerWidgetSettings:AddChild( widgetSettings ) + local button = AceGUI:Create( "Button" ) if displayName == "News" then button:SetText( L["PUSH_ALL_SETTINGS"] ) else button:SetText( L["PUSH_SETTINGS"] ) end - containerWidgetSettings:AddChild( button ) button:SetWidth( 200 ) button:SetPoint( "TOPLEFT", containerWidgetSettings.frame, "TOPRIGHT", -200, 40 ) button:SetCallback( "OnClick", pushSettingsCallback ) settingsControl.widgetPushSettingsButton = button - + settingsControl.widgetSettingsHelp = widgetSettingsHelp settingsControl.containerWidgetSettings = containerWidgetSettings + settingsControl.widgetSettings = widgetSettings EMAPrivate.SettingsFrame.Tree.Add( displayName, parentDisplayName, moduleIcon, order, settingsControl.containerWidgetSettings ) end @@ -132,11 +134,12 @@ end ------------------------------------------------------------------------------------------------------------- function EMAHelperSettings:HeadingWidth( hasScrollBar ) - local width = 600 + + local width = 800 - 230 if hasScrollBar == true then - return width + return width - 20 else - return width + 20 + return width end end diff --git a/LICENSE b/LICENSE index a132d50..48c8206 100644 --- a/LICENSE +++ b/LICENSE @@ -15,29 +15,3 @@ 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. - ---------------- -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/AceComm-3.0/ChatThrottleLib.lua b/Libs/AceComm-3.0/ChatThrottleLib.lua index ad21af4..d1dd8a0 100644 --- a/Libs/AceComm-3.0/ChatThrottleLib.lua +++ b/Libs/AceComm-3.0/ChatThrottleLib.lua @@ -75,7 +75,7 @@ local next = next local strlen = string.len local GetFramerate = GetFramerate local strlower = string.lower -local unpack,type,pairs,wipe = unpack,type,pairs,wipe +local unpack,type,pairs,wipe = unpack,type,pairs,table.wipe local UnitInRaid,UnitInParty = UnitInRaid,UnitInParty 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 a14e07d..f66086f 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 1232 2020-04-14 22:21:22Z nevcairiel $ +-- @release $Id: AceConfigDialog-3.0.lua 1248 2021-02-05 14:27:49Z funkehdude $ local LibStub = LibStub local gui = LibStub("AceGUI-3.0") local reg = LibStub("AceConfigRegistry-3.0") -local MAJOR, MINOR = "AceConfigDialog-3.0", 79 +local MAJOR, MINOR = "AceConfigDialog-3.0", 81 local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not AceConfigDialog then return end @@ -22,10 +22,10 @@ AceConfigDialog.frame.closing = AceConfigDialog.frame.closing or {} AceConfigDialog.frame.closeAllOverride = AceConfigDialog.frame.closeAllOverride or {} -- Lua APIs -local tinsert, tsort, tremove = table.insert, table.sort, table.remove +local tinsert, tsort, tremove, wipe = table.insert, table.sort, table.remove, table.wipe local strmatch, format = string.match, string.format local error = error -local pairs, next, select, type, unpack, wipe, ipairs = pairs, next, select, type, unpack, wipe, ipairs +local pairs, next, select, type, unpack, ipairs = pairs, next, select, type, unpack, ipairs local tostring, tonumber = tostring, tonumber local math_min, math_max, math_floor = math.min, math.max, math.floor @@ -544,13 +544,15 @@ local function GetFuncName(option) end do local frame = AceConfigDialog.popup - if not frame then + if not frame or oldminor < 81 then frame = CreateFrame("Frame", nil, UIParent) AceConfigDialog.popup = frame frame:Hide() frame:SetPoint("CENTER", UIParent, "CENTER") frame:SetSize(320, 72) + frame:EnableMouse(true) -- Do not allow click-through on the frame frame:SetFrameStrata("TOOLTIP") + frame:SetFrameLevel(100) -- Lots of room to draw under it frame:SetScript("OnKeyDown", function(self, key) if key == "ESCAPE" then self:SetPropagateKeyboardInput(false) @@ -564,7 +566,7 @@ do end end) - if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + if not frame.SetFixedFrameStrata then -- API capability check (classic check) frame:SetBackdrop({ bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], @@ -574,8 +576,10 @@ do insets = { left = 11, right = 11, top = 11, bottom = 11 }, }) else - local border = CreateFrame("Frame", nil, frame, "DialogBorderDarkTemplate") + local border = CreateFrame("Frame", nil, frame, "DialogBorderOpaqueTemplate") border:SetAllPoints(frame) + frame:SetFixedFrameStrata(true) + frame:SetFixedFrameLevel(true) end local text = frame:CreateFontString(nil, "ARTWORK", "GameFontHighlight") diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc index 8592b88..f552554 100644 --- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc +++ b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc @@ -1,4 +1,4 @@ -## Interface: 80200 +## Interface: 90001 ## Title: Lib: AceGUI-3.0-SharedMediaWidgets ## Notes: Enables AceGUI-3.0 widgets for the 5 basic SharedMedia-3.0 types @@ -6,11 +6,5 @@ ## OptionalDeps: Ace3, LibSharedMedia-3.0 ## X-Category: Library -#@no-lib-strip@ -Libs\Libstub\Libstub.lua -Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml -Libs\AceGUI-3.0\AceGUI-3.0.xml -Libs\LibSharedMedia-3.0\lib.xml -#@end-no-lib-strip@ widget.xml diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua index 3bb45ed..19ad608 100644 --- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua +++ b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua @@ -8,7 +8,7 @@ local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0") do local widgetType = "LSM30_Background" - local widgetVersion = 12 + local widgetVersion = 13 local contentFrameCache = {} local function ReturnSelf(self) @@ -38,7 +38,7 @@ do if next(contentFrameCache) then frame = table.remove(contentFrameCache) else - frame = CreateFrame("Button", nil, UIParent) + frame = CreateFrame("Button", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate") --frame:SetWidth(200) frame:SetHeight(18) frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD") diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua index 2211a4c..0f2cbea 100644 --- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua +++ b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua @@ -8,7 +8,7 @@ local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0") do local widgetType = "LSM30_Border" - local widgetVersion = 12 + local widgetVersion = 13 local contentFrameCache = {} local function ReturnSelf(self) diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua index 723b028..e9f98b9 100644 --- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua +++ b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua @@ -8,7 +8,7 @@ local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0") do local widgetType = "LSM30_Font" - local widgetVersion = 12 + local widgetVersion = 13 local contentFrameCache = {} local function ReturnSelf(self) diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SharedFunctions.lua b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SharedFunctions.lua deleted file mode 100644 index 7725598..0000000 --- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SharedFunctions.lua +++ /dev/null @@ -1,55 +0,0 @@ --- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0 --- Widget created by Yssaril -LoadAddOn("LibSharedMedia-3.0") -local AceGUI = LibStub("AceGUI-3.0") -local Media = LibStub("LibSharedMedia-3.0") - -AceGUISharedMediaWidgets = {} -do - AceGUIWidgetLSMlists = { - ['font'] = Media:HashTable("font"), - ['sound'] = Media:HashTable("sound"), - ['statusbar'] = Media:HashTable("statusbar"), - ['border'] = Media:HashTable("border"), - ['background'] = Media:HashTable("background"), - } - - local min, max, floor = math.min, math.max, math.floor - - local function fixlevels(parent,...) - local i = 1 - local child = select(i, ...) - while child do - child:SetFrameLevel(parent:GetFrameLevel()+1) - fixlevels(child, child:GetChildren()) - i = i + 1 - child = select(i, ...) - end - end - - local function OnItemValueChanged(this, event, checked) - local self = this.userdata.obj - if self.multiselect then - self:Fire("OnValueChanged", this.userdata.value, checked) - else - if checked then - self:SetValue(this.userdata.value) - self:Fire("OnValueChanged", this.userdata.value) - else - this:SetValue(true) - end - self.pullout:Close() - end - end - - local function SetValue(self, value) - if value then - self:SetText(value or "") - end - self.value = value - end - - AceGUISharedMediaWidgets.fixlevels = fixlevels - AceGUISharedMediaWidgets.OnItemValueChanged = OnItemValueChanged - AceGUISharedMediaWidgets.SetValue = SetValue -end diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua index 10c8aa4..77557a5 100644 --- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua +++ b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua @@ -8,7 +8,7 @@ local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0") do local widgetType = "LSM30_Sound" - local widgetVersion = 12 + local widgetVersion = 13 local contentFrameCache = {} local function ReturnSelf(self) diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua index 824ce07..05467aa 100644 --- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua +++ b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua @@ -8,7 +8,7 @@ local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0") do local widgetType = "LSM30_Statusbar" - local widgetVersion = 12 + local widgetVersion = 13 local contentFrameCache = {} local function ReturnSelf(self) diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua index 121e3b4..95b511d 100644 --- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua +++ b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua @@ -1,5 +1,5 @@ -- Widget created by Yssaril -local DataVersion = 9003 +local DataVersion = 9004 local AGSMW = LibStub:NewLibrary("AceGUISharedMediaWidgets-1.0", DataVersion) if not AGSMW then @@ -112,7 +112,7 @@ do function AGSMW:GetBaseFrameWithWindow() local frame = self:GetBaseFrame() - local displayButton = CreateFrame("Button", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil) + local displayButton = CreateFrame("Button", nil, frame, BackdropTemplateMixin and "BackdropTemplate") displayButton:SetHeight(42) displayButton:SetWidth(42) displayButton:SetPoint("TOPLEFT", frame, "TOPLEFT", 1, -2) @@ -205,7 +205,7 @@ do if next(DropDownCache) then frame = table.remove(DropDownCache) else - frame = CreateFrame("Frame", nil, UIParent) + frame = CreateFrame("Frame", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate") frame:SetClampedToScreen(true) frame:SetWidth(188) frame:SetBackdrop(frameBackdrop) @@ -235,7 +235,7 @@ do frame.ClearFrames = ClearFrames frame.contentRepo = {} -- store all our frames in here so we can get rid of them later - local slider = CreateFrame("Slider", nil, scrollframe) + local slider = CreateFrame("Slider", nil, scrollframe, BackdropTemplateMixin and "BackdropTemplate") slider:SetOrientation("VERTICAL") slider:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -14, -10) slider:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -14, 10) diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/CHANGES r-65.txt b/Libs/AceGUI-3.0-SharedMediaWidgets/CHANGES r-65.txt new file mode 100644 index 0000000..410408e --- /dev/null +++ b/Libs/AceGUI-3.0-SharedMediaWidgets/CHANGES r-65.txt @@ -0,0 +1,12 @@ +------------------------------------------------------------------------ +r64 | nevcairiel | 2020-10-19 22:06:38 +0000 (Mon, 19 Oct 2020) | 1 line +Changed paths: + M /trunk/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua + M /trunk/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua + M /trunk/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua + M /trunk/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua + M /trunk/AceGUI-3.0-SharedMediaWidgets.toc + +Bump all widget versions to ensure the new prototype is used everywhere +------------------------------------------------------------------------ + diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/CHANGES.txt b/Libs/AceGUI-3.0-SharedMediaWidgets/CHANGES.txt deleted file mode 100644 index d4c7d8b..0000000 --- a/Libs/AceGUI-3.0-SharedMediaWidgets/CHANGES.txt +++ /dev/null @@ -1,25 +0,0 @@ ------------------------------------------------------------------------- -r60 | nevcairiel | 2019-06-14 23:53:41 +0000 (Fri, 14 Jun 2019) | 1 line -Changed paths: - M /trunk/AceGUI-3.0-SharedMediaWidgets.toc - -Update TOC ------------------------------------------------------------------------- -r59 | nevcairiel | 2019-06-14 23:53:15 +0000 (Fri, 14 Jun 2019) | 1 line -Changed paths: - M /trunk/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua - M /trunk/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua - M /trunk/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua - M /trunk/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua - M /trunk/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua - M /trunk/AceGUI-3.0-SharedMediaWidgets/prototypes.lua - -Remove unnecessary UpdateScrollChildRect() calls. The Scroll Child is recomputed when needed automatically, and this improves performance significantly ------------------------------------------------------------------------- -r58 | nevcairiel | 2018-06-21 23:05:54 +0000 (Thu, 21 Jun 2018) | 1 line -Changed paths: - M /trunk/AceGUI-3.0-SharedMediaWidgets/prototypes.lua - -Hard code a version to avoid issues with the version being populated from the hosting repository ------------------------------------------------------------------------- - diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r48-release.txt b/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r48-release.txt deleted file mode 100644 index 2163c0d..0000000 --- a/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r48-release.txt +++ /dev/null @@ -1,19 +0,0 @@ ------------------------------------------------------------------------- -r48 | funkydude | 2013-05-26 11:10:27 +0000 (Sun, 26 May 2013) | 1 line -Changed paths: - A /tags/r48-release (from /trunk:47) - -Tagging as r48-release ------------------------------------------------------------------------- -r47 | funkydude | 2013-05-26 11:09:17 +0000 (Sun, 26 May 2013) | 1 line -Changed paths: - M /trunk/AceGUI-3.0-SharedMediaWidgets.toc - -bump toc ------------------------------------------------------------------------- -r46 | Phanx | 2013-01-02 06:47:48 +0000 (Wed, 02 Jan 2013) | 1 line -Changed paths: - M /trunk/AceGUI-3.0-SharedMediaWidgets/prototypes.lua - -Fixed an anchoring issue that could prevent interaction with menu buttons. ------------------------------------------------------------------------- diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt b/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt deleted file mode 100644 index 91e3976..0000000 --- a/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt +++ /dev/null @@ -1,7 +0,0 @@ ------------------------------------------------------------------------- -r53 | nevcairiel | 2016-06-03 06:51:46 +0000 (Fri, 03 Jun 2016) | 1 line -Changed paths: - M /trunk/AceGUI-3.0-SharedMediaWidgets/prototypes.lua - -Remove SetPoint to UIParent, AceGUI-3.0 will properly position the element when its used ------------------------------------------------------------------------- diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-v3.3.2.txt b/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-v3.3.2.txt deleted file mode 100644 index eeb78d0..0000000 --- a/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-v3.3.2.txt +++ /dev/null @@ -1,17 +0,0 @@ ------------------------------------------------------------------------- -r19 | yssaril | 2009-12-05 07:44:46 +0000 (Sat, 05 Dec 2009) | 1 line -Changed paths: - A /tags/v3.3.2 (from /trunk:18) - -Tagging as v3.3.2 ------------------------------------------------------------------------- -r18 | yssaril | 2009-12-05 07:43:22 +0000 (Sat, 05 Dec 2009) | 1 line -Changed paths: - M /trunk/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua - M /trunk/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua - M /trunk/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua - M /trunk/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua - M /trunk/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua - -fix dropdowns not clearing properly ------------------------------------------------------------------------- diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/R61 updated.txt b/Libs/AceGUI-3.0-SharedMediaWidgets/R61 updated.txt deleted file mode 100644 index e69de29..0000000 diff --git a/Libs/AceGUI-3.0/AceGUI-3.0.lua b/Libs/AceGUI-3.0/AceGUI-3.0.lua index cde61f6..438650f 100644 --- a/Libs/AceGUI-3.0/AceGUI-3.0.lua +++ b/Libs/AceGUI-3.0/AceGUI-3.0.lua @@ -24,14 +24,14 @@ -- f:AddChild(btn) -- @class file -- @name AceGUI-3.0 --- @release $Id: AceGUI-3.0.lua 1231 2020-04-14 22:20:36Z nevcairiel $ +-- @release $Id: AceGUI-3.0.lua 1247 2021-01-23 23:16:39Z funkehdude $ local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 41 local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR) if not AceGUI then return end -- No upgrade needed -- Lua APIs -local tinsert = table.insert +local tinsert, wipe = table.insert, table.wipe local select, pairs, next, type = select, pairs, next, type local error, assert = error, assert local setmetatable, rawget = setmetatable, rawget diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua index 9a48f8b..2f8ba04 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua @@ -2,7 +2,7 @@ BlizOptionsGroup Container Simple container widget for the integration of AceGUI into the Blizzard Interface Options -------------------------------------------------------------------------------]] -local Type, Version = "BlizOptionsGroup", 21 +local Type, Version = "BlizOptionsGroup", 22 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -99,7 +99,7 @@ local methods = { Constructor -------------------------------------------------------------------------------]] local function Constructor() - local frame = CreateFrame("Frame") + local frame = CreateFrame("Frame", nil, InterfaceOptionsFramePanelContainer) frame:Hide() -- support functions for the Blizzard Interface Options diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua index fbd6005..de7b358 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua @@ -1,7 +1,7 @@ --[[----------------------------------------------------------------------------- Frame Container -------------------------------------------------------------------------------]] -local Type, Version = "Frame", 27 +local Type, Version = "Frame", 28 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -83,6 +83,7 @@ local methods = { ["OnAcquire"] = function(self) self.frame:SetParent(UIParent) self.frame:SetFrameStrata("FULLSCREEN_DIALOG") + self.frame:SetFrameLevel(100) -- Lots of room to draw under it self:SetTitle() self:SetStatusText() self:ApplyStatus() @@ -186,6 +187,7 @@ local function Constructor() frame:SetMovable(true) frame:SetResizable(true) frame:SetFrameStrata("FULLSCREEN_DIALOG") + frame:SetFrameLevel(100) -- Lots of room to draw under it frame:SetBackdrop(FrameBackdrop) frame:SetBackdropColor(0, 0, 0, 1) frame:SetMinResize(400, 200) diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua index 195ab0b..3e45541 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua @@ -7,7 +7,7 @@ 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, ipairs, assert, type, wipe = pairs, ipairs, assert, type, wipe +local pairs, ipairs, assert, type, wipe = pairs, ipairs, assert, type, table.wipe -- WoW APIs local PlaySound = PlaySound diff --git a/Libs/AceHook-3.0/AceHook-3.0.lua b/Libs/AceHook-3.0/AceHook-3.0.lua index d91c36f..af6a265 100644 --- a/Libs/AceHook-3.0/AceHook-3.0.lua +++ b/Libs/AceHook-3.0/AceHook-3.0.lua @@ -9,8 +9,8 @@ -- make into AceHook. -- @class file -- @name AceHook-3.0 --- @release $Id: AceHook-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $ -local ACEHOOK_MAJOR, ACEHOOK_MINOR = "AceHook-3.0", 8 +-- @release $Id: AceHook-3.0.lua 1243 2020-10-18 00:00:19Z nevcairiel $ +local ACEHOOK_MAJOR, ACEHOOK_MINOR = "AceHook-3.0", 9 local AceHook, oldminor = LibStub:NewLibrary(ACEHOOK_MAJOR, ACEHOOK_MINOR) if not AceHook then return end -- No upgrade needed @@ -478,10 +478,10 @@ function AceHook:UnhookAll() for key, value in pairs(registry[self]) do if type(key) == "table" then for method in pairs(value) do - self:Unhook(key, method) + AceHook.Unhook(self, key, method) end else - self:Unhook(key) + AceHook.Unhook(self, key) end end end diff --git a/Libs/EMALibActionButton-1.0.lua b/Libs/EMALibActionButton-1.0.lua index 1ba1c07..80d36c8 100644 --- a/Libs/EMALibActionButton-1.0.lua +++ b/Libs/EMALibActionButton-1.0.lua @@ -30,6 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. the file was edit for Ema by Jennifer cally 2016-2020 9.0 ]] + local MAJOR_VERSION = "EMALibActionButton-1.0" local MINOR_VERSION = 75 @@ -56,6 +57,15 @@ local str_match, format, tinsert, tremove = string.match, format, tinsert, tremo -- GLOBALS: RANGE_INDICATOR, SetBinding, SetBindingClick, SetClampedTextureRotation, SpellFlyout, TOOLTIP_UPDATE_TIME, UIParent, ZoneAbilityFrame +local function isClassicBuild() + local isClassicBuild = false + local _, _, _, tocversion = GetBuildInfo() + if tocversion >= 10000 and tocversion <= 30000 then + isClassicBuild = true + end + return isClassicBuild +end + local KeyBound = LibStub("LibKeyBound-1.0", true) local CBH = LibStub("CallbackHandler-1.0") local LBG = LibStub("LibButtonGlow-1.0", true) @@ -710,7 +720,9 @@ function InitializeEventHandler() lib.eventFrame:RegisterEvent("ACTIONBAR_SLOT_CHANGED") lib.eventFrame:RegisterEvent("UPDATE_BINDINGS") lib.eventFrame:RegisterEvent("UPDATE_SHAPESHIFT_FORM") - lib.eventFrame:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR") + if isClassicBuild() == false then + lib.eventFrame:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR") + end lib.eventFrame:RegisterEvent("PLAYER_MOUNT_DISPLAY_CHANGED") lib.eventFrame:RegisterEvent("ACTIONBAR_UPDATE_STATE") @@ -719,14 +731,18 @@ function InitializeEventHandler() lib.eventFrame:RegisterEvent("PLAYER_TARGET_CHANGED") lib.eventFrame:RegisterEvent("TRADE_SKILL_SHOW") lib.eventFrame:RegisterEvent("TRADE_SKILL_CLOSE") - lib.eventFrame:RegisterEvent("ARCHAEOLOGY_CLOSED") + if isClassicBuild() == false then + lib.eventFrame:RegisterEvent("ARCHAEOLOGY_CLOSED") + end lib.eventFrame:RegisterEvent("PLAYER_ENTER_COMBAT") lib.eventFrame:RegisterEvent("PLAYER_LEAVE_COMBAT") lib.eventFrame:RegisterEvent("START_AUTOREPEAT_SPELL") lib.eventFrame:RegisterEvent("STOP_AUTOREPEAT_SPELL") lib.eventFrame:RegisterEvent("UNIT_ENTERED_VEHICLE") lib.eventFrame:RegisterEvent("UNIT_EXITED_VEHICLE") - lib.eventFrame:RegisterEvent("COMPANION_UPDATE") + if isClassicBuild() == false then + lib.eventFrame:RegisterEvent("COMPANION_UPDATE") + end lib.eventFrame:RegisterEvent("UNIT_INVENTORY_CHANGED") lib.eventFrame:RegisterEvent("LEARNED_SPELL_IN_TAB") lib.eventFrame:RegisterEvent("PET_STABLE_UPDATE") @@ -734,7 +750,9 @@ function InitializeEventHandler() lib.eventFrame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_SHOW") lib.eventFrame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_HIDE") lib.eventFrame:RegisterEvent("SPELL_UPDATE_CHARGES") - lib.eventFrame:RegisterEvent("UPDATE_SUMMONPETS_ACTION") + if isClassicBuild() == false then + lib.eventFrame:RegisterEvent("UPDATE_SUMMONPETS_ACTION") + end lib.eventFrame:RegisterEvent("SPELL_UPDATE_ICON") -- With those two, do we still need the ACTIONBAR equivalents of them? @@ -1657,13 +1675,13 @@ Spell.GetTexture = function(self) return GetSpellTexture(self._stat Spell.GetCharges = function(self) return GetSpellCharges(self._state_action) end Spell.GetCount = function(self) return GetSpellCount(self._state_action) end Spell.GetCooldown = function(self) return GetSpellCooldown(self._state_action) end -Spell.IsAttack = function(self) return IsAttackSpell(FindSpellBookSlotBySpellID(self._state_action), "spell") end -- needs spell book id as of 4.0.1.13066 +Spell.IsAttack = function(self) if FindSpellBookSlotBySpellID(self._state_action)==nil then return false end return IsAttackSpell(FindSpellBookSlotBySpellID(self._state_action), "spell") end Spell.IsEquipped = function(self) return nil end Spell.IsCurrentlyActive = function(self) return IsCurrentSpell(self._state_action) end Spell.IsAutoRepeat = function(self) return IsAutoRepeatSpell(FindSpellBookSlotBySpellID(self._state_action), "spell") end -- needs spell book id as of 4.0.1.13066 Spell.IsUsable = function(self) return IsUsableSpell(self._state_action) end Spell.IsConsumableOrStackable = function(self) return IsConsumableSpell(self._state_action) end -Spell.IsUnitInRange = function(self, unit) return IsSpellInRange(FindSpellBookSlotBySpellID(self._state_action), "spell", unit) end -- needs spell book id as of 4.0.1.13066 +Spell.IsUnitInRange = function(self, unit) if FindSpellBookSlotBySpellID(self._state_action)==nil then return false end return IsSpellInRange(FindSpellBookSlotBySpellID(self._state_action), "spell", unit) end Spell.SetTooltip = function(self) return GameTooltip:SetSpellByID(self._state_action) end Spell.GetSpellId = function(self) return self._state_action end diff --git a/Libs/EbonyUtilities.lua b/Libs/EbonyUtilities.lua new file mode 100644 index 0000000..c82724d --- /dev/null +++ b/Libs/EbonyUtilities.lua @@ -0,0 +1,344 @@ +-- ================================================================================ -- +-- EMA - ( Ebony's MultiBoxing Assistant ) -- +-- Current Author: Jennifer Cally (Ebony) -- +-- -- +-- License: MIT License 2018-2020 Jennifer Cally -- +-- -- +-- Some Code Used from "Jamba" that is -- +-- Released under the MIT License -- +-- "Jamba" Copyright 2008-2015 Michael "Jafula" Miller -- +-- -- +-- ================================================================================ -- + +-- Localization debugging. +--GAME_LOCALE = "frFR" + +local MAJOR, MINOR = "EbonyUtilities-1.0", 1 +local EbonyUtilities, oldMinor = LibStub:NewLibrary( MAJOR, MINOR ) + +if not EbonyUtilities then + return +end + +-- Code modified from http://lua-users.org/wiki/CopyTable +function EbonyUtilities:CopyTable(object) + local lookup_table = {} + local function _copy(object) + if type(object) ~= "table" then + return object + elseif lookup_table[object] then + return lookup_table[object] + end + local new_table = {} + lookup_table[object] = new_table + for index, value in pairs(object) do + new_table[_copy(index)] = _copy(value) + end + return setmetatable(new_table, getmetatable(object)) + end + return _copy(object) +end + +function EbonyUtilities:ClearTable( object ) + for key in next, object do + if type( object[key] ) == "table" then + EbonyUtilities:ClearTable( object[key] ) + end + object[key] = nil + end +end + +function EbonyUtilities:GetStatusPercent(val, max) + if (max > 0) then + return (val / max) + end + return 1.0 +end + +function EbonyUtilities:Lowercase( name ) + if name ~= nil then + return string.utf8lower( name ) + end +end + +function EbonyUtilities:AddRealmToNameIfMissing( name ) + if name == nil then + return + end + Name = name:gsub("^%l", string.upper ) + fullName = Name:gsub( "%s+", "") + local matchDash = fullName:find( "-" ) + if not matchDash then + local k = GetRealmName() + local realm = k:gsub( "%s+", "") + fullName = fullName.."-"..realm + end + return fullName +end + +-- Capitalise the name. +function EbonyUtilities:Capitalise( name ) + if name ~= nil then + return string.utf8upper( string.utf8sub( name, 1, 1 ) )..string.utf8lower( string.utf8sub( name, 2 ) ) + end +end + +function EbonyUtilities:AddRealmToNameIfNotNil( name, realm ) + local fullName = name + if realm ~= nil and realm:trim() ~= "" then + fullName = name.."-"..realm + end + return fullName +end + +-- Money constants. +EbonyUtilities.COLOUR_COPPER = "eda55f" +EbonyUtilities.COLOUR_SILVER = "c7c7cf" +EbonyUtilities.COLOUR_GOLD = "ffd700" +EbonyUtilities.COPPER_PER_SILVER = 100; +EbonyUtilities.SILVER_PER_GOLD = 100; +EbonyUtilities.COPPER_PER_GOLD = EbonyUtilities.COPPER_PER_SILVER * EbonyUtilities.SILVER_PER_GOLD; + +-- value - the amount of money to display formatted. +-- Creates a money string from the value passed; don't pass negative values! +function EbonyUtilities:FormatMoneyString( value ) + local gold = floor( value / ( EbonyUtilities.COPPER_PER_SILVER * EbonyUtilities.SILVER_PER_GOLD ) ); + local silver = floor( ( value - ( gold * EbonyUtilities.COPPER_PER_SILVER * EbonyUtilities.SILVER_PER_GOLD ) ) / EbonyUtilities.COPPER_PER_SILVER ); + local copper = mod( value, EbonyUtilities.COPPER_PER_SILVER ); + local goldFormat = format( "|cff%s%d|r", EbonyUtilities.COLOUR_GOLD, gold ) + local silverFormat = format( "|cff%s%02d|r", EbonyUtilities.COLOUR_SILVER, silver ) + local copperFormat = format( "|cff%s%02d|r", EbonyUtilities.COLOUR_COPPER, copper ) + if gold <=0 then + goldFormat = "" + if silver <= 0 then + silverFormat = "" + end + end + return strtrim(goldFormat.." "..silverFormat.." "..copperFormat) +end + +-- A little toy to retun Gold, silver and copper for mail use +function EbonyUtilities:MoneyString( value ) + local gold = floor( value / ( EbonyUtilities.COPPER_PER_SILVER * EbonyUtilities.SILVER_PER_GOLD ) ); + local silver = floor( ( value - ( gold * EbonyUtilities.COPPER_PER_SILVER * EbonyUtilities.SILVER_PER_GOLD ) ) / EbonyUtilities.COPPER_PER_SILVER ); + local copper = mod( value, EbonyUtilities.COPPER_PER_SILVER ); + if gold <=0 then + goldFormat = "" + if silver <= 0 then + silverFormat = "" + end + end + return gold, silver, copper +end + + +-- A little toy to retun Gold, silver and copper for formatted use. +function EbonyUtilities:MoneyStringFormatted( value ) + local gold = floor( value / ( EbonyUtilities.COPPER_PER_SILVER * EbonyUtilities.SILVER_PER_GOLD ) ); + local silver = floor( ( value - ( gold * EbonyUtilities.COPPER_PER_SILVER * EbonyUtilities.SILVER_PER_GOLD ) ) / EbonyUtilities.COPPER_PER_SILVER ); + local copper = mod( value, EbonyUtilities.COPPER_PER_SILVER ); + if gold <=0 then + goldFormat = "" + if silver <= 0 then + silverFormat = "" + end + end + return BreakUpLargeNumbers(gold), silver, copper +end + + +-- itemLink - the item link to extract an item id from. +-- Gets an item id from an item link. Returns nil, if an item id could not be found. +function EbonyUtilities:GetItemIdFromItemLink( itemLink ) + if itemLink == nil then + return + end + local itemIdFound = nil + local itemStringStart, itemStringEnd, itemString = itemLink:find( "^|c%x+|H(.+)|h%[.*%]" ) + if itemStringStart then + local matchStart, matchEnd, itemId = itemString:find( "(item:%d+)" ) + if matchStart then + itemIdFound = itemId + end + end + return itemIdFound +end + +-- itemLink1 - the first item link to compare. +-- itemLink2 - the second item link to compare. +-- Compares two itemlinks to see if they both refer to the same item. Return true if they do, false if they don't. +function EbonyUtilities:DoItemLinksContainTheSameItem( itemLink1, itemLink2 ) + local theSame = false + local itemId1 = EbonyUtilities:GetItemIdFromItemLink( itemLink1 ) + local itemId2 = EbonyUtilities:GetItemIdFromItemLink( itemLink2 ) + if itemId1 ~= nil and itemId2 ~= nil then + if itemId1 == itemId2 then + theSame = true + end + end + return theSame +end + +-- state - string value containing "on" or "off". +-- onCommand - string that is equivalent to true, like "on". +-- offCommand - string that is equivalent to false, like "off". +-- Returns true for "on"; false for "off"; nil for invalid. +function EbonyUtilities:GetOnOrOffFromCommand( state, onCommand, offCommand ) + local setToOn = nil + state = state:lower():trim() + if state == onCommand then + setToOn = true + end + if state == offCommand then + setToOn = false + end + return setToOn +end + +-- Check for a buff. +function EbonyUtilities:DoesThisCharacterHaveBuff( buffName ) + local hasBuff = false + local iterateBuffs = 1 + local buff = UnitBuff( "player", iterateBuffs ) + while buff ~= nil do + if buff == buffName then + hasBuff = true + break + end + iterateBuffs = iterateBuffs + 1 + buff = UnitBuff( "player", iterateBuffs ) + end + return hasBuff +end + +function EbonyUtilities:FixValueToRange( value, minValue, maxValue ) + if value < minValue then + value = minValue + end + if value > maxValue then + value = maxValue + end + 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) + local sameRealm = false + if name ~= nil then + local player, realm = strsplit( "-", name, 2 ) + local myRealm = string.gsub(GetRealmName(), "%s+", "") + if realm == myRealm then + --print("Real SameRealm") + sameRealm = true + else + local connectedServers = GetAutoCompleteRealms() + if connectedServers then --Check if realm matches any realm in our connection + for i = 1, #connectedServers do + if realm == connectedServers[i] then + --print("connectedRealm") + sameRealm = true + end + end + else + --print("NotFromARealm") + sameRealm = false + end + end + end + return sameRealm +end + +function EbonyUtilities:InTagList( tag ) + local isInTagList = false + if JambaApi.DoesGroupExist( tag ) then + isInTagList = true + end + return isInTagList +end + +function EbonyUtilities:TooltipScaner(item) + local text = nil + local text2 = nil + if item ~= nil then + local tooltipName = "EMAScanner" + local tooltipScanner = CreateFrame("GameTooltip", tooltipName, nil, "GameTooltipTemplate") + tooltipScanner:SetOwner( WorldFrame, "ANCHOR_NONE") + tooltipScanner:SetHyperlink(item) + local tooltipText = _G[tooltipName.."TextLeft2"]:GetText() + local tooltipTextTwo = _G[tooltipName.."TextLeft3"]:GetText() + --print("test", tooltipTextTwo) + text = tooltipText + text2 = tooltipTextTwo + --print("test9", text, text2) + --tooltipScanner:Hide() + tooltipScanner:Hide() + tooltipScanner:ClearLines() + end + + return text, text2 +end + +-- We should Not need this anymore but its always here incase! using ItemMixIn +function EbonyUtilities:ToolTipBagScaner(item, bag, slot) + --print("test", item, bag, slot ) + if item ~= nil or bag ~= nil or slot ~= nil then + local boe = nil + local ilvl = nil + local tooltipName = "EMABagScanner" + local tooltipbagScanner = CreateFrame("GameTooltip", tooltipName , nil, "GameTooltipTemplate") + tooltipbagScanner:SetOwner(UIParent, "ANCHOR_NONE") + tooltipbagScanner:SetBagItem(bag, slot) + tooltipbagScanner:Show() + for i = 1,6 do + local t = _G[tooltipName.."TextLeft"..i]:GetText() + --print("test", t) + if (t == ITEM_SOULBOUND) then + boe = ITEM_SOULBOUND + end + end + tooltipbagScanner:Hide() + return boe + end +end + +-- GetPetOwner +function EbonyUtilities:getPetOwner( petName ) + --print(petName) + if petName ~= nil then + local tooltipName = "EMAPetScanner" + local tooltipPetScanner = CreateFrame("GameTooltip", tooltipName, nil, "GameTooltipTemplate") + tooltipPetScanner:ClearLines() + tooltipPetScanner:SetOwner(WorldFrame, "ANCHOR_NONE") + tooltipPetScanner:SetUnit( petName ) + local ownerName = _G[tooltipName.."TextLeft2"]:GetText() -- This is the line with <[Player]'s Pet> + if not ownerName then + return nil + end + local owner, _ = string.split("'",ownerName) + tooltipPetScanner:Hide() + return owner -- This is the pet's owner + -- print(owner) + end +end + +function EbonyUtilities:endsWith(str, ending) + if str ~= nil then + return str:match(ending .. '$') + else + return false + end +end diff --git a/Libs/LibBagUtils-1.0/LibBagUtils-1.0.lua b/Libs/LibBagUtils-1.0/LibBagUtils-1.0.lua index 55aa35f..c14eee7 100644 --- a/Libs/LibBagUtils-1.0/LibBagUtils-1.0.lua +++ b/Libs/LibBagUtils-1.0/LibBagUtils-1.0.lua @@ -32,10 +32,20 @@ local GetTime=GetTime local GetContainerNumSlots, GetContainerNumFreeSlots = GetContainerNumSlots, GetContainerNumFreeSlots local GetContainerItemLink,GetContainerItemInfo = GetContainerItemLink,GetContainerItemInfo local GetItemInfo, GetItemFamily = GetItemInfo, GetItemFamily + -- GLOBALS: error, geterrorhandler, PickupContainerItem -- GLOBALS: CursorHasItem, ClearCursor, GetCursorInfo -- GLOBALS: DEFAULT_CHAT_FRAME, SELECTED_CHAT_FRAME +local function isClassicBuild() + local isClassicBuild = false + local _, _, _, tocversion = GetBuildInfo() + if tocversion >= 10000 and tocversion <= 30000 then + isClassicBuild = true + end + return isClassicBuild +end + local BANK_CONTAINER = BANK_CONTAINER -- local KEYRING_CONTAINER = KEYRING_CONTAINER local NUM_BANKBAGSLOTS = NUM_BANKBAGSLOTS @@ -259,7 +269,9 @@ for k,v in pairs(bags.BANK) do end -- Reagent Bank -bags.REAGENTBANK[REAGENTBANK_CONTAINER] = REAGENTBANK_CONTAINER +if isClassicBuild() == false then + bags.REAGENTBANK[REAGENTBANK_CONTAINER] = REAGENTBANK_CONTAINER +end local function iterbags(tab, cur) cur = next(tab, cur) diff --git a/Libs/changelog-Ace3-r1252.txt b/Libs/changelog-Ace3-r1252.txt new file mode 100644 index 0000000..54fa71b --- /dev/null +++ b/Libs/changelog-Ace3-r1252.txt @@ -0,0 +1,441 @@ +Ace3 Release - Revision r1252 (May 17th, 2021) +-------------------------------------------------- +- AceConfigDialog-3.0: Increased the frame level of dialogs to allow other addons to draw below them. +- AceConfigDialog-3.0: The validation/confirmation popup is now opaque and not click-through, to avoid accidentally activating options below it. +- AceHook-3.0: Allow UnhookAll to be used without embedding (Fixes #558) + +Ace3 Release - Revision r1241 (October 13th, 2020) +-------------------------------------------------- +- AceAddon-3.0: Suppress more Blizzard addon load events from activating Ace3 addons "too early", causing loading issues. +- AceGUI-3.0: Updated for Backdrop changes in WoW 9.0 +- AceGUI-3.0: Re-structured widget releasing to avoid recursive release in some circumstances +- AceGUI-3.0: Label: Anchors are being refreshed when the font is changed (Ticket #540) +- AceGUI-3.0: Dropdown: Initialize the widget with an empty list so that AddItem can be used on a fresh dropdown (Ticket #542) + +Ace3 Release - Revision r1227 (August 12th, 2019) +------------------------------------------------- +- AceConfigDialog-3.0: Fixed an issue with a missing template on WoW Classic (Ticket #517) + +Ace3 Release - Revision r1224 (August 1st, 2019) +------------------------------------------------ +- AceConfigDialog-3.0: Replace use of StaticPopup with a custom frame to minimize taint +- AceGUI-3.0: Ensure the OnLeave callback on various widgets still fires when its being released while visible (Ticket #505) +- AceGUI-3.0: Various fixes for anchoring problems in WoW 8.2 (Ticket #512, and other reports) + +Ace3 Release - Revision r1214 (June 26th, 2019) +----------------------------------------------- +- AceConfigDialog-3.0: Exposed "select" type sorting control through a new "sorting" config table member +- AceConfigDialog-3.0: Clear existing anchors on the GameTooltip before re-anchoring it for 8.2 compatibility +- AceConfigDialog-3.0: Improved options table sorting algorithm to produce a stable result in certain edge cases (Ticket #501) +- AceConfigRegistry-3.0: Added missing custom controls entries for all types added in the last release (Ticket #494) +- AceGUI-3.0: ColorPicker: Removed usage of Show/HideUIPanel for WoW 8.2 compatibiliy +- AceGUI-3.0: DropDown: Improved dropdown sorting algorithm to support tables with mixed string and numeric keys + +Ace3 Release - Revision r1200 (January 24th, 2019) +-------------------------------------------------- +- Cleanup for WoW 8.0 improvements +- AceGUI-3.0: Worked around various quirks in the WoW 8.0/8.1 API +- AceGUI-3.0: ColorPicker: Store references to the background/checkers textures (Ticket #473) +- AceConfigDialog-3.0: Allow custom controls for almost all option types (Ticket #475) + +Ace3 Release - Revision r1182 (July 17th, 2018) +----------------------------------------------- +- AceComm-3.0: Support numeric targets for custom channels (Ticket #419) +- AceComm-3.0/ChatThrottleLib: Updated for WoW 8.0 API changes +- AceConfig-3.0: Allow number values for the "width" parameter, which acts as a multiplier of the default width +- AceConfigDialog-3.0: Enable iconCoords for the main level of a tree group (Ticket #417) +- AceGUI-3.0: Implement a Table Layout (#442) +- AceGUI-3.0: EditBox: Only try to handle dragging if a valid object is being dragged into the text box +- AceGUI-3.0: Various fixes and work-arounds for WoW 8.0 changes + +Ace3 Release - Revision r1166 (August 29th, 2017) +------------------------------------------------- +- Updated any use of PlaySound to the new numeric constants (Fix for WoW 7.3) +- AceConfigDialog-3.0: implement fallback validation feedback in a StaticPopup (Ticket #2) + +Ace3 Release - Revision r1158 (March 28th, 2017) +------------------------------------------------ +- AceGUI-3.0: Fire OnShow events from Frame and Windows containers (Ticket #396) +- AceGUI-3.0: Add SetJustifyV/H API to the Label/InteractiveLabel widgets (Ticket #397) + +Ace3 Release - Revision r1151 (July 18th, 2016) +----------------------------------------------- +- AceConfig-3.0: Allow specifying images using the numeric fileID (Ticket #389) +- AceGUI-3.0: Use SetColorTexture in WoW 7.0 +- AceGUI-3.0: Expose the HighlightText API for EditBox and MultiLineEditBox Widgets (Ticket #378) +- AceGUI-3.0: Keybinding: Support MouseWheel Up/Down bindings (Ticket #372) +- AceGUI-3.0: TreeGroup: Refresh the tree in an OnUpdate once after Acquire, not only after creation (Fixes missing tree in WoW 7.0) +- AceSerializer-3.0: Create consistent tokens for infinity, independent of the clients platform + +Ace3 Release - Revision r1134 (June 23rd, 2015) +----------------------------------------------- +- AceGUI-3.0: TreeGroup: Prevent Word Wrap in tree elements + +Ace3 Release - Revision r1128 (February 24th, 2015) +--------------------------------------------------- +- AceGUI-3.0: Fixed an error in GameTooltip handling causing wrong formatting in some cases + +Ace3 Release - Revision r1122 (October 14th, 2014) +-------------------------------------------------- +- AceDB-3.0: Now using the GetCurrentRegion() API to determine region-based profile keys (fix for WoW 6.0) +- AceComm-3.0: Update ChatThrottleLib to v23 +- AceConfigDialog-3.0: Show a more meaningful title on Blizzard Options Groups (Ticket #353) +- AceGUI-3.0: ColorPicker: Frame Level is automatically increased to ensure the color picker frame is above the option panel +- AceGUI-3.0: DropDown: Properly disable all clickable areas when the dropdown is disabled (Ticket #360) +- AceHook-3.0: Always use HookScript when hooking scripts in a secure fashion (Ticket #338) +- AceTimer-3.0: New timer implementation based on C_Timer.After + +Ace3 Release - Revision r1109 (February 19th, 2014) +--------------------------------------------------- +- AceComm-3.0: Ambiguate addon comm messages to restore behavior to be identical to pre-5.4.7 +- AceConfigRegistry-3.0: Added an option to skip options table validation on registering + +Ace3 Release - Revision r1104 (October 31st, 2013) +-------------------------------------------------- +- AceGUI-3.0: Flow Layout: Added a safeguard to prevent an infinite loop in the layout engine +- AceGUI-3.0: DropDown: Adjust its style slightly to closer resemble the Blizzard DropDown Widget +- AceGUI-3.0: DropDown: API enhancements to specify the width of the pullout and be notified when its opened + +Ace3 Release - Revision r1098 (September 13th, 2013) +---------------------------------------------------- +- AceDB-3.0: Switch characters to the default profile if their active profile is deleted (Ticket #324) +- AceConfigDialog-3.0: Try to prevent static popup taint (Ticket #322) +- AceGUI-3.0: Button: Add a new "Auto Width" option (Ticket #310) +- AceGUI-3.0: DropDown: Make the entire DropDown widget clickable (Ticket #339) +- AceGUI-3.0: EditBox: Allow dragging macros to the editbox (which will then contain the macros name) (Ticket #337) +- AceGUI-3.0: Slider: Add a workaround for the broken slider steps in WoW 5.4 (Ticket #346) +- AceGUI-3.0: TreeGroup: Fix an issue introduced by 5.4 broken scrollbars (Ticket #345) +- AceHook-3.0: Allow hooking of AnimationGroup scripts (Ticket #314) + +Ace3 Release - Revision r1086 (May 21st, 2013) +---------------------------------------------- +- AceAddon-3.0: Improved behavior when loading modules during game startup, ensures proper loading order + +Ace3 Release - Revision r1083 (March 4th, 2013) +----------------------------------------------- +- AceTimer-3.0: Fixed an issue that caused the parameter list passed to the callback to be cut off at nil values +- AceGUI-3.0: InlineGroup: The title attribute is properly reset for recycled objects + +Ace3 Release - Revision r1078 (February 10th, 2013) +--------------------------------------------------- +- AceTimer-3.0: Re-write based on AnimationTimers +- AceHook-3.0: Improved checks/error messages when trying to hook a script on a "nil" frame +- AceDBOptions-3.0: Added Italian locale +- AceGUI-3.0: BlizOptionsGroup: Fixed the "default" button callback +- AceGUI-3.0: Colorpicker: The colorpicker is now clamped to the screen + +Ace3 Release - Revision r1061 (August 27th, 2012) +------------------------------------------------- +- AceConfigDialog-3.0: Try to avoid potential taints in static popup dialogs +- AceConfigDialog-3.0: Sort multiselects with "radio" style +- AceGUI-3.0: Support for WoW 5.0 +- AceGUI-3.0: MultiLineEditBox: Support shift-click'ing items/spells/etc. into the editbox +- AceGUI-3.0: Label: Fix text alignment (Ticket #301) +- AceGUI-3.0: Checkbox: Description text on a disable checkbox should look disabled (Ticket #304) +- AceGUI-3.0: Keybinding: Ensure the Keybinding popup is on the top level (Ticket #305) + +Ace3 Release - Revision r1041 (November 29th, 2011) +--------------------------------------------------- +- AceDB-3.0: Added locale and factionrealmregion profile keys +- AceSerializer-3.0: Removed support for NaN, as WoW 4.3 does no longer allow it. +- AceGUI-3.0: Frame: Add :EnableResize (Ticket #214) + +Ace3 Release - Revision r1032 (June 29th, 2011) +----------------------------------------------- +- AceTab-3.0: Improvements to Match handling (Ticket #255 and #256) +- AceGUI-3.0: DropDown layout fix with hidden labels (Ticket #234) + +Ace3 Release - Revision r1025 (April 27th, 2011) +------------------------------------------------ +- AceComm-3.0: Updated for 4.1 changes - now handles RegisterAddonMessagePrefix internally for you. +- AceGUI-3.0: TabGroup: Fixed width of tabs in 4.1(Ticket #243) + +Ace3 Release - Revision r1009 (February 9th, 2011) +-------------------------------------------------- +- AceLocale-3.0: Fix erronous assumption that the default locale is always the first to be registered for the :NewLocale() "silent" flag. The flag must now be set on the FIRST locale to be registered. +- AceLocale-3.0: The :NewLocale() "silent" flag may now be set to the string "raw", meaning nils are returned for unknown translations. +- AceGUI-3.0: Fix the disabled state of Icon widgets +- AceGUI-3.0: The header of the Frame widget now dynamically changes size to fit the text (Ticket #171) +- AceGUI-3.0: Its now possible to define a custom order the elements in a dropdown widget +- AceGUI-3.0: Improved widget focus behaviour across the board (Ticket #192, #193) +- AceGUI-3.0: Fixed a bug that made it impossible to block the tree widget from being user resizable (Ticket #163) +- AceGUI-3.0: Fixed a bug that caused TreeGroups to become unresponsive under certain conditions (Ticket #189, #202) +- AceGUI-3.0: Enhanced the DropDown widget to allow it to be reused more easily. +- AceConfigDialog-3.0: Select Groups now have the proper order in the dropdown (Ticket #184) +- AceConfigDialog-3.0: Implemented "radio" style select boxes (Ticket #149) + +Ace3 Release - Revision r981 (October 27th, 2010) +------------------------------------------------- +- AceAddon-3.0: Fixed a library upgrading issue +- AceAddon-3.0: Modules are now enabled in loading order +- AceGUI-3.0: Keybinding: The widget will no longer steal keybindings even when inactive (Ticket #169) +- AceGUI-3.0: EditBox: Fixed spell drag'n'drop + + +Ace3 Release - Revision r971 (October 12th, 2010) +------------------------------------------------- +- Small fixes and adjustments for the 4.0 Content Patch. +- AceGUI-3.0: ScrollFrame: Allow for a small margin of error when determining if the scroll bar should be shown. +- AceGUI-3.0: Added new widget APIs: GetText for EditBox and DisableButton for MultiLineEditBox + +Ace3 Release - Revision r960 (July 20th, 2010) +---------------------------------------------- +- AceGUI-3.0: Label: Reset Image Size and TexCoords on Acquire (Ticket #110) +- AceGUI-3.0: CheckBox: Re-apply the disabled state after setting a value, so the visuals are correct in either case. (Ticket #107) +- AceGUI-3.0: Icon: Fix the vertical size. It'll now properly scale with the image size, and not be fixed to about 110px. (Ticket #104) +- AceGUI-3.0: External Containers (Frame, Window) should always start in a visible state. (Ticket #121) +- AceGUI-3.0: Added Blizzard sounds to widgets (Ticket #120) +- AceGUI-3.0: CheckBox: check for self.desc:GetText() being nil as well as "" to prevent setting the wrong height on the checkbox causing bouncing checkboxes. +- AceGUI-3.0: Rewrite of the MultiLineEditBox (Ticket #68) +- AceGUI-3.0: CheckBox: Fix alignment of the text in OnMouseDown when an image is set. (Ticket #142) +- AceGUI-3.0: Add SetMaxLetters APIs to EB and MLEB (Ticket #135) +- AceGUI-3.0: Frame: Add events for OnEnter/OnLeave of the statusbar (Ticket #139) +- AceGUI-3.0: Major cleanups and refactoring in nearly all widgets and containers. +- AceConfigDialog-3.0: Always obey the min/max values on range-type widgets (Ticket #114) +- AceConfigDialog-3.0: Pass iconCoords set on groups in the options table to the tree widget (Ticket #111) +- AceConfigDialog-3.0: Implement "softMin" and "softMax", allowing for a UI-specific minimum/maximum for range controls, while allowing manual input of values in the old min/max range. (Ticket #123) +- AceConfigDialog-3.0: Don't close frames in CloseAll that are being opened after the CloseAll event was dispatched. (Ticket #132). +- AceSerializer-3.0: Fix encoding & decoding of \030. (Ticket #115) +- AceDB-3.0: Remove empty sections on logout, keeping the SV clean of more useless informations. +- AceDBOptions-3.0.lua: Fix a string typo (Ticket #141) + +Ace3 Release - Revision r907 (December 16th, 2009) +--------------------------------------------------- +- AceGUI-3.0: Frame: Properly save the width in the status table. +- AceConfigCmd-3.0: Properly handle help output of inline groups with a different handler. (Ticket #101) +- AceConfigDialog-3.0: Don't bail out and error when a dialogControl was invalid, instead show the error and fallback to the default control for that type. +- AceConfigDialog-3.0: Fix a hickup with the OnUpdate script not getting upgraded properly in some situations. + +Ace3 Release - Revision r900 (December 8th, 2009) +-------------------------------------------------- +- AceGUI-3.0: Alot of visual fixes regarding margins and general widget styles. +- AceGUI-3.0: Ability to accept links for EditBox Widget (Ticket #21) +- AceGUI-3.0: ScrollFrame: Hide the scrollbar when there is no overflowing content, and allow the Layout functions to use that space for widgets. +- AceGUI-3.0: DropDown: Added a GetValue() API to the Widget (Ticket #69) +- AceGUI-3.0: Button: Pass the arguments of the OnClick handler to the OnClick callback (Ticket #57) +- AceGUI-3.0: add a Window container, basically a plain window with close button +- AceGUI-3.0: Add support for inline descriptions to the checkbox widget. +- AceGUI-3.0: Added an API to the Window container to disable the user-resizing of the same. (Ticket #80) +- AceGUI-3.0: TreeGroup: Allow iconCoords to be passed for the tree elements. (Ticket #59) +- AceGUI-3.0: Slider: Add a more visible backdrop/border around the manual input area (Ticket #98, #46) +- AceGUI-3.0: Allow displaying a image in front of the checkbox label. (Ticket #82) +- AceConfig-3.0: Added an experimental "descStyle" member to all option table nodes that allows you to control the way the description is presented. + Supported values are "tooltip" for the old behaviour, and "inline" for a inline display of the description, pending support in AceGUI-3.0 widgets. +- AceConfigCmd-3.0: Properly parse functions and methods supplied for the "hidden" option table member. (Ticket #96) +- AceConfigDialog-3.0: Fix the unpacking of the basepath arguments when internally calling :Open (Ticket #90) +- AceConfigDialog-3.0: Properly refresh BlizOptions Windows which are registered with a path on NotifyChange. (Ticket #93) +- AceConfigDialog-3.0: Allow image/imageCoords on toogle elements (Note that the width/height of the image on the toggle cannot be changed) (Ticket #82) +- AceConfigDialog-3.0: Pass the groups "name" tag to DropDownGroups as the title. (Ticket #79) +- AceDB-3.0: Remove the metatable from the DB before removing defaults, so we don't accidentally invoke it in the process. (Ticket #66) +- AceDB-3.0: Don't save the profileKeys for namespaces, since we use the profile of the parent DB anyway. This will cut down on SV complexity when using alot of namespaces. +- AceDB-3.0: Don't fire the OnProfileReset callback when copying a profile. +- AceDBOptions-3.0: Show the current profile on the dialog. (Ticket #56) +- AceComm-3.0: Add callbacks for message chunks going out the wire (via CTL). Useful for displaying progress for very large messages. +- AceConsole-3.0: Add :Printf() so you don't have to do Print(format()) + +Ace3 Beta - Revision 820 (August 7th, 2009) +-------------------------------------------- +- AceComm-3.0: Updated ChatThrottleLib to v21 +- AceGUI-3.0: Fixed a glitch in the TabGroup code that caused tabs to be unresponsive under rare conditions. (Ticket #38) +- AceGUI-3.0: Consistent "disabled" behaviour of all widgets. (Ticket #47) +- AceGUI-3.0: Changed the way widgets are handled on release to avoid a crash in the game client. (Ticket #49) +- AceGUI-3.0: Fixed a glitch in the button graphics. (Ticket #58) +- AceGUI-3.0: Localized the "Close" Text on the Frame widget. + +Ace3 Beta - Revision 803 (April 14th, 2009) +-------------------------------------------- +- AceConfig-3.0: Allow spaces in the keys of config tables. Spaces will be changed on the fly to underscores in AceConfigCmd-3.0 - there is no collision check in place, yet. +- AceConfig-3.0: Support a "fontSize" attribute to the description type. Possible values are "small" (default), "medium" and "large". +- AceConfigDialog-3.0: Fixed an error that would occur when calling InterfaceOptionsFrame_OpenToCategory from within an event handler in a Blizzard Options integrated frame. (Ticket #33) +- AceConfigDialog-3.0: The "execute" type does now recognize the "image" attributes, and will display a clickable icon instead of the button when an image is supplied. (Ticket #35) +- AceConfigDialog-3.0: Pass icons defined in the option table to the TreeGroup widget (Ticket #20) +- AceConfigDialog-3.0: Fixed a bug that caused an empty group widget to be drawn if all groups were hidden. +- AceConfigCmd-3.0: Improved the behaviour of select and multiselect elements. (Ticket #26) +- AceDB-3.0: Add a GetNamespace function to the DB Objects which returns an existing namespace from the DB object. +- AceGUI-3.0 Slider Widget: Properly show percentage values as min/max if isPercent is true. (Ticket #32) +- AceGUI-3.0: Fixed an error in the TreeGroup Widget that caused execution to stop if no name was provided. +- AceGUI-3.0: Fixed the behaviour of the MultiLineEditbox Widget (Accept button not clickable). (Ticket #28) +- AceGUI-3.0: TabGroup: Set a maximum width for tabs based on the size of the widget. (Ticket #34) +- AceGUI-3.0: Added a new InteractiveLabel with OnEnter/OnLeave/OnClick callbacks and a highlight texture +- AceGUI-3.0: Add SetFont and SetFontObject functions to the Label widget (and the new InteractiveLabel) +- AceGUI-3.0: Support icons in the TreeGroup display. (Ticket #20) +- AceGUI-3.0: Added a new :SetRelativeWidth Widget-API that allows you to set the width of widgets relative to their container. +- AceGUI-3.0: Alot of fixes, tweaks and consistency changes. + +Ace3 Beta - Revision 741 (Feb 15th, 2009) +-------------------------------------------- +- AceDBOptions-3.0: Disable the "Copy From" and "Delete" dropdowns if there are no profiles to choose from. (Ticket #19) +- AceGUI-3.0: Improve TabGroup visual style - only stretch them to the full width if they would use more then 75% of the exisiting space. +- AceGUI-3.0: Added a third optional argument to :AddChild() to specify the position for the new widget. (Ticket #22) +- AceConfigCmd-3.0: Improve help output when viewing groups. +- AceConfigDialog-3.0: Refresh the Options Panel after a confirmation is canceled to reset the value to its previous value. (Ticket #23) +- AceDB-3.0: Fix a data inconsistency when using false as a table key. (Ticket #25) + +Ace3 Beta - Revision 722 (Jan 4th, 2009) +-------------------------------------------- +- AceHook-3.0: Fix :SecureHookScript to not fail on previously empty scripts since frame:HookScript does nothing at all in that case. (Ticket #16) +- AceLocale-3.0: Implement 'silent' option for :NewLocale to disable the warnings on unknown entrys (Ticket #18) +- AceTimer-3.0: Implement :TimeLeft(handle) function (Ticket #10) +- AceGUI-3.0: Fix TabGroup tab resizing to be consistent +- AceGUI-3.0: Fixed EditBox alignment when the label is disabled (Ticket #13) +- AceDB-3.0: Implement OnProfileShutdown callback (Ticket #7) +- AceDBOptions-3.0: Updated esES and ruRU locale + +Ace3 Beta - Revision 706 (Oct 18th, 2008) +-------------------------------------------- +- First Beta release after WoWAce move +- Removed WoW 2.4.x compat layer +- AceGUI-3.0: Fix disabling of the Multiline Editbox +- AceGUI-3.0: Improvements to the Keybinding Widget + +Ace3 Beta - Revision 81437 (Sept 6th, 2008) +-------------------------------------------- +- AceConfigDialog-3.0: the confirm callback will now receive the new value that is being set (same signature as the validate callback) +- AceConfigDialog-3.0: :Close and :CloseAll are now safe to call from within callbacks. +- AceGUI-3.0: Added new methods to the widget base table, see ACE-205 for full reference +- AceGUI-3.0: Various fixes to Widgets and recycling process +- Now compatible with WoW 3.0 (compat layer is to be removed upon 3.0 release) + + +Ace3 Beta - Revision 76325 (June 9th, 2008) +-------------------------------------------- +- AceGUI-3.0: Finish Multiselect support for the Dropdown widget (nargiddley) +- AceGUI-3.0: Re-write TabGroup layouting (nargiddley) +- AceGUI-3.0: TreeGroup: Add :EnableButtonTooltips(enable) to make the default tooltips on the tree optional, enabled by default. (nargiddley) +- AceGUI-3.0: TabGroup: Add OnTabEnter and OnTabLeave Callbacks (nargiddley) +- AceConfigDialog-3.0: Add :SelectGroup(appName, ...) - Selects the group given by the path specified then refreshes open windows. (nargiddley) +- AceConfigDialog-3.0: :Open now accepts an optional path, when given will open the window with only the given group and its children visible (nargiddley) +- AceConfigDialog-3.0: :AddToBlizOptions now accepts an optional path, this will add the config page to display the specified group and its children only. (nargiddley) +- AceConfigDialog-3.0: ACE-189: allow multiselect to be shown as a dropdown by setting dialogControl = "Dropdown" (nargiddley) +- AceConfigDialog-3.0: Add Custom tooltips to the TreeGroup and TabGroup, shows both name and desc for the group. (nargiddley) +- AceConfigCmd-3.0: ACE-195: Remove unneeded references to .confirm, will no longer error when .confirm is a boolean (nargiddley) +- AceAddon-3.0: Allow for an optional first argument to NewAddon to be a table to be used as the base for the addon. (ammo) + +Ace3 Beta - Revision 74633 (May 19th, 2008) +-------------------------------------------- +- AceTimer-3.0: ACE-173: don't error on nil handle for CancelTimer(), just bail out early. (ammo) +- AceGUI-3.0: ACE-161, ACE-180, ACE-181: New and improved DropDown widget (originally coded by Borlox) (nargiddley,nevcairiel) +- AceGUI-3.0: AceGUI will call OnWidthSet and OnHeightSet as frames resize (nargiddley) +- AceGUI-3.0: TabGroup: Use OptionsFrameTabButtonTemplate for tabs (nargiddley) +- AceGUI-3.0: TabGroup: Tabs now span multiple lines when there are too many to fit in the width of the frame (nargiddley) +- AceGUI-3.0: TreeGroup: Tree is now sizable by dragging, orig patch by yssaril (nargiddley) +- AceGUI-3.0: Flow layout will now reduce widgets width to fit rather than leaving them sticking out the side of container widgets (nargiddley) +- AceGUI-3.0: Dropdowns will no longer be left open in the background when the frame is clicked or other widgets are activated (nargiddley) +- AceGUI-3.0: ACE-159: Rename Release to OnRelease and Acquire to OnAcquire for widgets. (nargiddley) +- AceGUI-3.0: ACE-171: add IsVisible and IsShown methods to the widget metatable (nargiddley) +- AceGUI-3.0: ACE-164: add tooltips to tree to show full text of childs that got clipped (ammo) +- AceGUI-3.0: ACE-174: make buttons in AceGUI-3.0 locale independant (ammo) +- AceGUI-3.0: ACE-166: fix treegroup visual bug (ammo) +- AceGUI-3.0: ACE-184: make numeric entry for slider more intuitive (ammo) +- AceConfigCmd-3.0: ACE-172 - ignore description in cmd (ammo) +- AceConsole-3.0: nolonger check for existance of slashcommands, overwrite where needed. Last one wins, this enables AddonLoader to X-LoadOn-Slash and override the slashcommand from AddonLoader slashcommand with an Ace3 one. (Ammo) + +Ace3 Beta - Revision 69509 (April 13th, 2008) +--------------------------------------------- +- AceComm-3.0: turn off error messages when receiving invalid multi-part messages (its happening on login etc) (nevcairiel) +- AceDBOptions-3.0: shorten info text at top to prevent scrollbars. (nevcairiel) +- AceHook-3.0: ACE-162: fix unhooking of objects that were not actually hooked (nevcairiel) +- AceDB-3.0: fire the DB callbacks after the namespaces changed their profile as well (nevcairiel) +- AceDB-3.0: namespaces can now be individually reset using :ResetProfile() on the namespace directly (nevcairiel) +- AceDB-3.0: added a optional argument to :ResetProfile to not populate the reset to all namespaces (so the main profile can reset individually without reseting all namespaces too) (nevcairiel) + +Ace3 Beta - Revision 66329 (March 27th, 2008) +--------------------------------------------- +- Overall 2.4 clean ups - removing 2.4 checks and work arounds (nevcairiel) +- AceBucket-3.0: clear the timer reference when unregistering a bucket to prevent a error when unregistering a bucket that was never fired (nevcairiel) +- AceAddon-3.0: Bugfix when enabling/disabling modules from the parents OnEnable after disabling / enabling the parent addon. (ammo) +- AceGUI-3.0: Don't parent the BlizOptionsGroup widget to UIParent and Hide it by default. Fixes stray controls on the screen. (nargiddley) +- AceConfigDialog-3.0: Config windows without a default size won't incorrectly get a default size from a previously open window. (nargiddley) +- AceDBOptions-3.0: added zhCN and zhTW locale (nevcairiel) + +Ace3 Beta - Revision 65665 (March 25th, 2008) +--------------------------------------------- +- AceGUI-3.0: ACE-139: Changed all Widgets to resemble the Blizzard 2.4 Options Style (nevcairiel) +- AceGUI-3.0: Fixed "List"-Layout not reporting new width to "fill"-mode widgets (mikk) +- AceGUI-3.0: added :SetColor to the Label widget (nevcairiel) +- AceGUI-3.0: ACE-132: ColorPicker: added checkers texture for better alpha channel display, and fixed "white"-texture bug (nevcairiel,nargiddley,ammo) +- AceConfig-3.0: ACE-113: Added uiName, uiType, handler, option, type to the info table (nevcairiel,nargiddley) +- AceConfigDialog-3.0: ACE-139: Adjusted for 2.4 options panels (nevcairiel) +- AceConfigDialog-3.0: Use "width" parameter for the description widget (if present) (nevcairiel) +- AceConfigDialog-3.0: ACE-135: Add support for specifying a rowcount for multiline editboxes (nargiddley) +- AceConfigDialog-3.0: :AddToBlizOptions will return the frame registered so you can use it in InterfaceOptionsFrame_OpenToFrame (nevcairiel) +- AceConfigCmd-3.0: handle "hidden" in help-output (nevcairiel) +- AceHook-3.0: fix unhooking of secure hooks (nevcairiel) +- AceDBOptions-3.0: add optional argument to GetOptionsTable(db[, noDefaultProfiles]) - if set to true will not show the default profiles in the profile selection (nevcairiel) +- AceDBOptions-3.0: added koKR locale (nevcairiel) +- Ace3 Standalone: Removed the "Ace3" Category from the 2.4 options panel (nevcairiel) + +Ace3 Beta - Revision 64176 (March 10th, 2008) +--------------------------------------------- +- AceGUI-3.0: Improve Alpha handling for the ColorPicker widget, ColorPicker widget closes the ColorPickerFrame before opening to prevent values getting carried over (nargiddley) +- AceGUI-3.0: The Slider widget will only react to the mousewheel after it has been clicked (anywhere including the label) to prevent accidental changes to the value when trying to scroll the container it is in (nargiddley) +- AceGUI-3.0: The TreeGroup widget is scrollable with the mousewheel (nargiddley) +- AceGUI-3.0: ACE-154: Fix frame levels in more cases to prevent widgets ending up behind their containers (nargiddley) +- AceConfigDialog: Color picker obeys hasAlpha on the color type (nargiddley) +- AceConfigDialog-3.0: ACE-155: Make sure that the selected group is type='group' when checking if it exists (nargiddley) +- AceDBOptions-3.0: added frFR locale (nevcairiel) + +Ace3 Beta - Revision 63886 (March 8th, 2008) +--------------------------------------------- +- AceDBOptions-3.0: new library to provide a Ace3Options table to control the AceDB-3.0 profiles (nevcairiel) +- AceDB-3.0: add "silent" option to DeleteProfile and CopyProfile when we deal with namespaces (nevcairiel) +- AceDB-3.0: implement library upgrade path (nevcairiel) +- AceDB-3.0: ACE-146: fix problem with non-table values overruling ['*']-type defaults (nevcairiel) +- AceConsole-3.0: treat |T|t texture links similar to |H|h|h links. (ammo) +- AceGUI-3.0: Use Blizzard Templates for the EditBox and DropDown widget (nevcairiel) +- AceBucket-3.0: ACE-150: callback is now optional, if not supplied will use the eventname as method name (only possible if one event is supplied, and not a event table) (nevcairiel) +- tests: adjust tests for AceGUI and AceConsole changes (nevcairiel) + +Ace3 Beta - Revision 63220 (Feb 29th, 2008) +--------------------------------------------- +- AceTimer-3.0: CancelAllTimers() now cancels silent (elkano) +- AceConfigDialog: Add :SetDefaultSize(appName, width, height), sets the size the dialog will open to. Does not effect already open windows. (nargiddley) +- AceConfigDialog: Fix typo in type check for range values (nargiddley) +- AceGUI: ColorPicker widget will correctly fire OnValueChanged for the cancel event of the colorpicker popup. Reset ColorPicker's color on Acquire. (nargiddley) +- AceGUI: Fix Spelling of Aquire -> Acquire for widgets, all custom widgets will need to be updated. A warning will be printed for widgets not upgraded yet. (nargiddley) +- AceConfigCmd-3.0: add simple coloring to slashcommand output. (ammo) +- AceConsole-3.0: add some color to :Print (ammo) +- AceAddon-3.0: set error level on library embedding to point to the :NewAddon call (nevcairiel) + +Ace3 Beta - Revision 62182 (Feb 20th, 2008) +--------------------------------------------- +- Ace3 StandAlone: Add a page to the Blizzard 2.4 Interface Options with icons to open dialogs for configs registered when installed standalone (nargiddley) +- AceConfigDialog: type = 'description' now uses the fields image and imageCoords instead of icon and iconCoords, add imageWidth and imageHeight (nargiddley) +- AceConfigDialog: Add :AddToBlizzardOptions(appName, name), this will add the specified config to the Blizzard Options pane new in 2.4. This will only be available if running on the 2.4 PTR (nargiddley) +- AceDB: fix GetProfiles() when setting the same profile twice (nevcairiel) +- AceDB: bail out of :SetProfile early when trying to set to the same profile (nevcairiel) +- AceDB: add nil checks to metatable handling (nevcairiel) +- AceDB: clear tables that are empty after defaults removal (nevcairiel) +- AceGUI: Fix a couple of layout bugs causing the width of groups to be wrong (nargiddley) +- AceGUI: Add Icon widget (nargiddley) +- AceGUI: Allow room for the border in the BlizOptionsGroup widget (nargiddley) +- AceGUI: Button and Keybinding use UIPanelButtonTemplate2 (nargiddley) +- AceConsole-3.0: Fix bug where no table for [self] was created when registering weak commands (ammo) +- AceTimer-3.0: add missing :OnEmbedDisable (ammo) +- AceAddon-3.0: added :GetName() that will always return the "real" name of a addon or module object without any prefixes (nevcairiel) + +Ace3 Beta - Revision 60697 (Feb 9th, 2008) +--------------------------------------------- +- CallbackHandler-1.0: remove unnecessary table creation if a event is fired thats not registered (nevcairiel) +- AceAddon-3.0: fixed a bug with recursive addon loading (nevcairiel) +- AceGUI: Update TabGroup's tablist format, tabs are selected by value not index (nargiddley) +- AceGUI: Add MultiLineEditBox widget (nargiddley, originally by bam) +- AceGUI: Small fix to the flow layout preventing controls overlapping in some cases (nargiddley) +- AceConfigDialog: Implement control and dialogControl for types 'input' and 'select' (nargiddley) +- AceConfigDialog: Add support for multiline = true on type = 'input' (nargiddley) +- AceConfigDialog: Fix an error when all groups are hidden in a group with childGroups = 'select' (nargiddley) +- AceConfigDialog: type = 'description' will now show .icon as an image with its text (nargiddley) +- AceConfigDialog: multiline inputs are no longer forced to width = "full" (nargiddley) +- AceConfigDialog: bug fix when loading without AceConsole present (nevcairiel) + +Ace3 Beta - Revision 60545 (Feb 7th, 2008) +--------------------------------------------- +- AceGUI: SetToplevel(true) for the Frame widget, multiple open windows should play nice together now (nargiddley) +- AceGUI: Move Frames to the FULLSCREEN_DIALOG strata (nargiddley) +- AceGUI: Dropdown, Editbox and Keybinding labels grey out when disabled (nargiddley) +- AceGUI: Add OnClick callback to the TreeGroup widget (nargiddley) +- AceConfigDialog: Confirm popups will be above the config window (nargiddley) + +Ace3 Beta - Revision 60163 (Feb 3rd, 2008) +--------------------------------------------- +- Initial Beta release diff --git a/Libs/changelogAce3-r1244.txt b/Libs/changelogAce3-r1244.txt new file mode 100644 index 0000000..b00755e --- /dev/null +++ b/Libs/changelogAce3-r1244.txt @@ -0,0 +1,435 @@ +Ace3 Release - Revision r1241 (October 13th, 2020) +-------------------------------------------------- +- AceAddon-3.0: Suppress more Blizzard addon load events from activating Ace3 addons "too early", causing loading issues. +- AceGUI-3.0: Updated for Backdrop changes in WoW 9.0 +- AceGUI-3.0: Re-structured widget releasing to avoid recursive release in some circumstances +- AceGUI-3.0: Label: Anchors are being refreshed when the font is changed (Ticket #540) +- AceGUI-3.0: Dropdown: Initialize the widget with an empty list so that AddItem can be used on a fresh dropdown (Ticket #542) + +Ace3 Release - Revision r1227 (August 12th, 2019) +------------------------------------------------- +- AceConfigDialog-3.0: Fixed an issue with a missing template on WoW Classic (Ticket #517) + +Ace3 Release - Revision r1224 (August 1st, 2019) +------------------------------------------------ +- AceConfigDialog-3.0: Replace use of StaticPopup with a custom frame to minimize taint +- AceGUI-3.0: Ensure the OnLeave callback on various widgets still fires when its being released while visible (Ticket #505) +- AceGUI-3.0: Various fixes for anchoring problems in WoW 8.2 (Ticket #512, and other reports) + +Ace3 Release - Revision r1214 (June 26th, 2019) +----------------------------------------------- +- AceConfigDialog-3.0: Exposed "select" type sorting control through a new "sorting" config table member +- AceConfigDialog-3.0: Clear existing anchors on the GameTooltip before re-anchoring it for 8.2 compatibility +- AceConfigDialog-3.0: Improved options table sorting algorithm to produce a stable result in certain edge cases (Ticket #501) +- AceConfigRegistry-3.0: Added missing custom controls entries for all types added in the last release (Ticket #494) +- AceGUI-3.0: ColorPicker: Removed usage of Show/HideUIPanel for WoW 8.2 compatibiliy +- AceGUI-3.0: DropDown: Improved dropdown sorting algorithm to support tables with mixed string and numeric keys + +Ace3 Release - Revision r1200 (January 24th, 2019) +-------------------------------------------------- +- Cleanup for WoW 8.0 improvements +- AceGUI-3.0: Worked around various quirks in the WoW 8.0/8.1 API +- AceGUI-3.0: ColorPicker: Store references to the background/checkers textures (Ticket #473) +- AceConfigDialog-3.0: Allow custom controls for almost all option types (Ticket #475) + +Ace3 Release - Revision r1182 (July 17th, 2018) +----------------------------------------------- +- AceComm-3.0: Support numeric targets for custom channels (Ticket #419) +- AceComm-3.0/ChatThrottleLib: Updated for WoW 8.0 API changes +- AceConfig-3.0: Allow number values for the "width" parameter, which acts as a multiplier of the default width +- AceConfigDialog-3.0: Enable iconCoords for the main level of a tree group (Ticket #417) +- AceGUI-3.0: Implement a Table Layout (#442) +- AceGUI-3.0: EditBox: Only try to handle dragging if a valid object is being dragged into the text box +- AceGUI-3.0: Various fixes and work-arounds for WoW 8.0 changes + +Ace3 Release - Revision r1166 (August 29th, 2017) +------------------------------------------------- +- Updated any use of PlaySound to the new numeric constants (Fix for WoW 7.3) +- AceConfigDialog-3.0: implement fallback validation feedback in a StaticPopup (Ticket #2) + +Ace3 Release - Revision r1158 (March 28th, 2017) +------------------------------------------------ +- AceGUI-3.0: Fire OnShow events from Frame and Windows containers (Ticket #396) +- AceGUI-3.0: Add SetJustifyV/H API to the Label/InteractiveLabel widgets (Ticket #397) + +Ace3 Release - Revision r1151 (July 18th, 2016) +----------------------------------------------- +- AceConfig-3.0: Allow specifying images using the numeric fileID (Ticket #389) +- AceGUI-3.0: Use SetColorTexture in WoW 7.0 +- AceGUI-3.0: Expose the HighlightText API for EditBox and MultiLineEditBox Widgets (Ticket #378) +- AceGUI-3.0: Keybinding: Support MouseWheel Up/Down bindings (Ticket #372) +- AceGUI-3.0: TreeGroup: Refresh the tree in an OnUpdate once after Acquire, not only after creation (Fixes missing tree in WoW 7.0) +- AceSerializer-3.0: Create consistent tokens for infinity, independent of the clients platform + +Ace3 Release - Revision r1134 (June 23rd, 2015) +----------------------------------------------- +- AceGUI-3.0: TreeGroup: Prevent Word Wrap in tree elements + +Ace3 Release - Revision r1128 (February 24th, 2015) +--------------------------------------------------- +- AceGUI-3.0: Fixed an error in GameTooltip handling causing wrong formatting in some cases + +Ace3 Release - Revision r1122 (October 14th, 2014) +-------------------------------------------------- +- AceDB-3.0: Now using the GetCurrentRegion() API to determine region-based profile keys (fix for WoW 6.0) +- AceComm-3.0: Update ChatThrottleLib to v23 +- AceConfigDialog-3.0: Show a more meaningful title on Blizzard Options Groups (Ticket #353) +- AceGUI-3.0: ColorPicker: Frame Level is automatically increased to ensure the color picker frame is above the option panel +- AceGUI-3.0: DropDown: Properly disable all clickable areas when the dropdown is disabled (Ticket #360) +- AceHook-3.0: Always use HookScript when hooking scripts in a secure fashion (Ticket #338) +- AceTimer-3.0: New timer implementation based on C_Timer.After + +Ace3 Release - Revision r1109 (February 19th, 2014) +--------------------------------------------------- +- AceComm-3.0: Ambiguate addon comm messages to restore behavior to be identical to pre-5.4.7 +- AceConfigRegistry-3.0: Added an option to skip options table validation on registering + +Ace3 Release - Revision r1104 (October 31st, 2013) +-------------------------------------------------- +- AceGUI-3.0: Flow Layout: Added a safeguard to prevent an infinite loop in the layout engine +- AceGUI-3.0: DropDown: Adjust its style slightly to closer resemble the Blizzard DropDown Widget +- AceGUI-3.0: DropDown: API enhancements to specify the width of the pullout and be notified when its opened + +Ace3 Release - Revision r1098 (September 13th, 2013) +---------------------------------------------------- +- AceDB-3.0: Switch characters to the default profile if their active profile is deleted (Ticket #324) +- AceConfigDialog-3.0: Try to prevent static popup taint (Ticket #322) +- AceGUI-3.0: Button: Add a new "Auto Width" option (Ticket #310) +- AceGUI-3.0: DropDown: Make the entire DropDown widget clickable (Ticket #339) +- AceGUI-3.0: EditBox: Allow dragging macros to the editbox (which will then contain the macros name) (Ticket #337) +- AceGUI-3.0: Slider: Add a workaround for the broken slider steps in WoW 5.4 (Ticket #346) +- AceGUI-3.0: TreeGroup: Fix an issue introduced by 5.4 broken scrollbars (Ticket #345) +- AceHook-3.0: Allow hooking of AnimationGroup scripts (Ticket #314) + +Ace3 Release - Revision r1086 (May 21st, 2013) +---------------------------------------------- +- AceAddon-3.0: Improved behavior when loading modules during game startup, ensures proper loading order + +Ace3 Release - Revision r1083 (March 4th, 2013) +----------------------------------------------- +- AceTimer-3.0: Fixed an issue that caused the parameter list passed to the callback to be cut off at nil values +- AceGUI-3.0: InlineGroup: The title attribute is properly reset for recycled objects + +Ace3 Release - Revision r1078 (February 10th, 2013) +--------------------------------------------------- +- AceTimer-3.0: Re-write based on AnimationTimers +- AceHook-3.0: Improved checks/error messages when trying to hook a script on a "nil" frame +- AceDBOptions-3.0: Added Italian locale +- AceGUI-3.0: BlizOptionsGroup: Fixed the "default" button callback +- AceGUI-3.0: Colorpicker: The colorpicker is now clamped to the screen + +Ace3 Release - Revision r1061 (August 27th, 2012) +------------------------------------------------- +- AceConfigDialog-3.0: Try to avoid potential taints in static popup dialogs +- AceConfigDialog-3.0: Sort multiselects with "radio" style +- AceGUI-3.0: Support for WoW 5.0 +- AceGUI-3.0: MultiLineEditBox: Support shift-click'ing items/spells/etc. into the editbox +- AceGUI-3.0: Label: Fix text alignment (Ticket #301) +- AceGUI-3.0: Checkbox: Description text on a disable checkbox should look disabled (Ticket #304) +- AceGUI-3.0: Keybinding: Ensure the Keybinding popup is on the top level (Ticket #305) + +Ace3 Release - Revision r1041 (November 29th, 2011) +--------------------------------------------------- +- AceDB-3.0: Added locale and factionrealmregion profile keys +- AceSerializer-3.0: Removed support for NaN, as WoW 4.3 does no longer allow it. +- AceGUI-3.0: Frame: Add :EnableResize (Ticket #214) + +Ace3 Release - Revision r1032 (June 29th, 2011) +----------------------------------------------- +- AceTab-3.0: Improvements to Match handling (Ticket #255 and #256) +- AceGUI-3.0: DropDown layout fix with hidden labels (Ticket #234) + +Ace3 Release - Revision r1025 (April 27th, 2011) +------------------------------------------------ +- AceComm-3.0: Updated for 4.1 changes - now handles RegisterAddonMessagePrefix internally for you. +- AceGUI-3.0: TabGroup: Fixed width of tabs in 4.1(Ticket #243) + +Ace3 Release - Revision r1009 (February 9th, 2011) +-------------------------------------------------- +- AceLocale-3.0: Fix erronous assumption that the default locale is always the first to be registered for the :NewLocale() "silent" flag. The flag must now be set on the FIRST locale to be registered. +- AceLocale-3.0: The :NewLocale() "silent" flag may now be set to the string "raw", meaning nils are returned for unknown translations. +- AceGUI-3.0: Fix the disabled state of Icon widgets +- AceGUI-3.0: The header of the Frame widget now dynamically changes size to fit the text (Ticket #171) +- AceGUI-3.0: Its now possible to define a custom order the elements in a dropdown widget +- AceGUI-3.0: Improved widget focus behaviour across the board (Ticket #192, #193) +- AceGUI-3.0: Fixed a bug that made it impossible to block the tree widget from being user resizable (Ticket #163) +- AceGUI-3.0: Fixed a bug that caused TreeGroups to become unresponsive under certain conditions (Ticket #189, #202) +- AceGUI-3.0: Enhanced the DropDown widget to allow it to be reused more easily. +- AceConfigDialog-3.0: Select Groups now have the proper order in the dropdown (Ticket #184) +- AceConfigDialog-3.0: Implemented "radio" style select boxes (Ticket #149) + +Ace3 Release - Revision r981 (October 27th, 2010) +------------------------------------------------- +- AceAddon-3.0: Fixed a library upgrading issue +- AceAddon-3.0: Modules are now enabled in loading order +- AceGUI-3.0: Keybinding: The widget will no longer steal keybindings even when inactive (Ticket #169) +- AceGUI-3.0: EditBox: Fixed spell drag'n'drop + + +Ace3 Release - Revision r971 (October 12th, 2010) +------------------------------------------------- +- Small fixes and adjustments for the 4.0 Content Patch. +- AceGUI-3.0: ScrollFrame: Allow for a small margin of error when determining if the scroll bar should be shown. +- AceGUI-3.0: Added new widget APIs: GetText for EditBox and DisableButton for MultiLineEditBox + +Ace3 Release - Revision r960 (July 20th, 2010) +---------------------------------------------- +- AceGUI-3.0: Label: Reset Image Size and TexCoords on Acquire (Ticket #110) +- AceGUI-3.0: CheckBox: Re-apply the disabled state after setting a value, so the visuals are correct in either case. (Ticket #107) +- AceGUI-3.0: Icon: Fix the vertical size. It'll now properly scale with the image size, and not be fixed to about 110px. (Ticket #104) +- AceGUI-3.0: External Containers (Frame, Window) should always start in a visible state. (Ticket #121) +- AceGUI-3.0: Added Blizzard sounds to widgets (Ticket #120) +- AceGUI-3.0: CheckBox: check for self.desc:GetText() being nil as well as "" to prevent setting the wrong height on the checkbox causing bouncing checkboxes. +- AceGUI-3.0: Rewrite of the MultiLineEditBox (Ticket #68) +- AceGUI-3.0: CheckBox: Fix alignment of the text in OnMouseDown when an image is set. (Ticket #142) +- AceGUI-3.0: Add SetMaxLetters APIs to EB and MLEB (Ticket #135) +- AceGUI-3.0: Frame: Add events for OnEnter/OnLeave of the statusbar (Ticket #139) +- AceGUI-3.0: Major cleanups and refactoring in nearly all widgets and containers. +- AceConfigDialog-3.0: Always obey the min/max values on range-type widgets (Ticket #114) +- AceConfigDialog-3.0: Pass iconCoords set on groups in the options table to the tree widget (Ticket #111) +- AceConfigDialog-3.0: Implement "softMin" and "softMax", allowing for a UI-specific minimum/maximum for range controls, while allowing manual input of values in the old min/max range. (Ticket #123) +- AceConfigDialog-3.0: Don't close frames in CloseAll that are being opened after the CloseAll event was dispatched. (Ticket #132). +- AceSerializer-3.0: Fix encoding & decoding of \030. (Ticket #115) +- AceDB-3.0: Remove empty sections on logout, keeping the SV clean of more useless informations. +- AceDBOptions-3.0.lua: Fix a string typo (Ticket #141) + +Ace3 Release - Revision r907 (December 16th, 2009) +--------------------------------------------------- +- AceGUI-3.0: Frame: Properly save the width in the status table. +- AceConfigCmd-3.0: Properly handle help output of inline groups with a different handler. (Ticket #101) +- AceConfigDialog-3.0: Don't bail out and error when a dialogControl was invalid, instead show the error and fallback to the default control for that type. +- AceConfigDialog-3.0: Fix a hickup with the OnUpdate script not getting upgraded properly in some situations. + +Ace3 Release - Revision r900 (December 8th, 2009) +-------------------------------------------------- +- AceGUI-3.0: Alot of visual fixes regarding margins and general widget styles. +- AceGUI-3.0: Ability to accept links for EditBox Widget (Ticket #21) +- AceGUI-3.0: ScrollFrame: Hide the scrollbar when there is no overflowing content, and allow the Layout functions to use that space for widgets. +- AceGUI-3.0: DropDown: Added a GetValue() API to the Widget (Ticket #69) +- AceGUI-3.0: Button: Pass the arguments of the OnClick handler to the OnClick callback (Ticket #57) +- AceGUI-3.0: add a Window container, basically a plain window with close button +- AceGUI-3.0: Add support for inline descriptions to the checkbox widget. +- AceGUI-3.0: Added an API to the Window container to disable the user-resizing of the same. (Ticket #80) +- AceGUI-3.0: TreeGroup: Allow iconCoords to be passed for the tree elements. (Ticket #59) +- AceGUI-3.0: Slider: Add a more visible backdrop/border around the manual input area (Ticket #98, #46) +- AceGUI-3.0: Allow displaying a image in front of the checkbox label. (Ticket #82) +- AceConfig-3.0: Added an experimental "descStyle" member to all option table nodes that allows you to control the way the description is presented. + Supported values are "tooltip" for the old behaviour, and "inline" for a inline display of the description, pending support in AceGUI-3.0 widgets. +- AceConfigCmd-3.0: Properly parse functions and methods supplied for the "hidden" option table member. (Ticket #96) +- AceConfigDialog-3.0: Fix the unpacking of the basepath arguments when internally calling :Open (Ticket #90) +- AceConfigDialog-3.0: Properly refresh BlizOptions Windows which are registered with a path on NotifyChange. (Ticket #93) +- AceConfigDialog-3.0: Allow image/imageCoords on toogle elements (Note that the width/height of the image on the toggle cannot be changed) (Ticket #82) +- AceConfigDialog-3.0: Pass the groups "name" tag to DropDownGroups as the title. (Ticket #79) +- AceDB-3.0: Remove the metatable from the DB before removing defaults, so we don't accidentally invoke it in the process. (Ticket #66) +- AceDB-3.0: Don't save the profileKeys for namespaces, since we use the profile of the parent DB anyway. This will cut down on SV complexity when using alot of namespaces. +- AceDB-3.0: Don't fire the OnProfileReset callback when copying a profile. +- AceDBOptions-3.0: Show the current profile on the dialog. (Ticket #56) +- AceComm-3.0: Add callbacks for message chunks going out the wire (via CTL). Useful for displaying progress for very large messages. +- AceConsole-3.0: Add :Printf() so you don't have to do Print(format()) + +Ace3 Beta - Revision 820 (August 7th, 2009) +-------------------------------------------- +- AceComm-3.0: Updated ChatThrottleLib to v21 +- AceGUI-3.0: Fixed a glitch in the TabGroup code that caused tabs to be unresponsive under rare conditions. (Ticket #38) +- AceGUI-3.0: Consistent "disabled" behaviour of all widgets. (Ticket #47) +- AceGUI-3.0: Changed the way widgets are handled on release to avoid a crash in the game client. (Ticket #49) +- AceGUI-3.0: Fixed a glitch in the button graphics. (Ticket #58) +- AceGUI-3.0: Localized the "Close" Text on the Frame widget. + +Ace3 Beta - Revision 803 (April 14th, 2009) +-------------------------------------------- +- AceConfig-3.0: Allow spaces in the keys of config tables. Spaces will be changed on the fly to underscores in AceConfigCmd-3.0 - there is no collision check in place, yet. +- AceConfig-3.0: Support a "fontSize" attribute to the description type. Possible values are "small" (default), "medium" and "large". +- AceConfigDialog-3.0: Fixed an error that would occur when calling InterfaceOptionsFrame_OpenToCategory from within an event handler in a Blizzard Options integrated frame. (Ticket #33) +- AceConfigDialog-3.0: The "execute" type does now recognize the "image" attributes, and will display a clickable icon instead of the button when an image is supplied. (Ticket #35) +- AceConfigDialog-3.0: Pass icons defined in the option table to the TreeGroup widget (Ticket #20) +- AceConfigDialog-3.0: Fixed a bug that caused an empty group widget to be drawn if all groups were hidden. +- AceConfigCmd-3.0: Improved the behaviour of select and multiselect elements. (Ticket #26) +- AceDB-3.0: Add a GetNamespace function to the DB Objects which returns an existing namespace from the DB object. +- AceGUI-3.0 Slider Widget: Properly show percentage values as min/max if isPercent is true. (Ticket #32) +- AceGUI-3.0: Fixed an error in the TreeGroup Widget that caused execution to stop if no name was provided. +- AceGUI-3.0: Fixed the behaviour of the MultiLineEditbox Widget (Accept button not clickable). (Ticket #28) +- AceGUI-3.0: TabGroup: Set a maximum width for tabs based on the size of the widget. (Ticket #34) +- AceGUI-3.0: Added a new InteractiveLabel with OnEnter/OnLeave/OnClick callbacks and a highlight texture +- AceGUI-3.0: Add SetFont and SetFontObject functions to the Label widget (and the new InteractiveLabel) +- AceGUI-3.0: Support icons in the TreeGroup display. (Ticket #20) +- AceGUI-3.0: Added a new :SetRelativeWidth Widget-API that allows you to set the width of widgets relative to their container. +- AceGUI-3.0: Alot of fixes, tweaks and consistency changes. + +Ace3 Beta - Revision 741 (Feb 15th, 2009) +-------------------------------------------- +- AceDBOptions-3.0: Disable the "Copy From" and "Delete" dropdowns if there are no profiles to choose from. (Ticket #19) +- AceGUI-3.0: Improve TabGroup visual style - only stretch them to the full width if they would use more then 75% of the exisiting space. +- AceGUI-3.0: Added a third optional argument to :AddChild() to specify the position for the new widget. (Ticket #22) +- AceConfigCmd-3.0: Improve help output when viewing groups. +- AceConfigDialog-3.0: Refresh the Options Panel after a confirmation is canceled to reset the value to its previous value. (Ticket #23) +- AceDB-3.0: Fix a data inconsistency when using false as a table key. (Ticket #25) + +Ace3 Beta - Revision 722 (Jan 4th, 2009) +-------------------------------------------- +- AceHook-3.0: Fix :SecureHookScript to not fail on previously empty scripts since frame:HookScript does nothing at all in that case. (Ticket #16) +- AceLocale-3.0: Implement 'silent' option for :NewLocale to disable the warnings on unknown entrys (Ticket #18) +- AceTimer-3.0: Implement :TimeLeft(handle) function (Ticket #10) +- AceGUI-3.0: Fix TabGroup tab resizing to be consistent +- AceGUI-3.0: Fixed EditBox alignment when the label is disabled (Ticket #13) +- AceDB-3.0: Implement OnProfileShutdown callback (Ticket #7) +- AceDBOptions-3.0: Updated esES and ruRU locale + +Ace3 Beta - Revision 706 (Oct 18th, 2008) +-------------------------------------------- +- First Beta release after WoWAce move +- Removed WoW 2.4.x compat layer +- AceGUI-3.0: Fix disabling of the Multiline Editbox +- AceGUI-3.0: Improvements to the Keybinding Widget + +Ace3 Beta - Revision 81437 (Sept 6th, 2008) +-------------------------------------------- +- AceConfigDialog-3.0: the confirm callback will now receive the new value that is being set (same signature as the validate callback) +- AceConfigDialog-3.0: :Close and :CloseAll are now safe to call from within callbacks. +- AceGUI-3.0: Added new methods to the widget base table, see ACE-205 for full reference +- AceGUI-3.0: Various fixes to Widgets and recycling process +- Now compatible with WoW 3.0 (compat layer is to be removed upon 3.0 release) + + +Ace3 Beta - Revision 76325 (June 9th, 2008) +-------------------------------------------- +- AceGUI-3.0: Finish Multiselect support for the Dropdown widget (nargiddley) +- AceGUI-3.0: Re-write TabGroup layouting (nargiddley) +- AceGUI-3.0: TreeGroup: Add :EnableButtonTooltips(enable) to make the default tooltips on the tree optional, enabled by default. (nargiddley) +- AceGUI-3.0: TabGroup: Add OnTabEnter and OnTabLeave Callbacks (nargiddley) +- AceConfigDialog-3.0: Add :SelectGroup(appName, ...) - Selects the group given by the path specified then refreshes open windows. (nargiddley) +- AceConfigDialog-3.0: :Open now accepts an optional path, when given will open the window with only the given group and its children visible (nargiddley) +- AceConfigDialog-3.0: :AddToBlizOptions now accepts an optional path, this will add the config page to display the specified group and its children only. (nargiddley) +- AceConfigDialog-3.0: ACE-189: allow multiselect to be shown as a dropdown by setting dialogControl = "Dropdown" (nargiddley) +- AceConfigDialog-3.0: Add Custom tooltips to the TreeGroup and TabGroup, shows both name and desc for the group. (nargiddley) +- AceConfigCmd-3.0: ACE-195: Remove unneeded references to .confirm, will no longer error when .confirm is a boolean (nargiddley) +- AceAddon-3.0: Allow for an optional first argument to NewAddon to be a table to be used as the base for the addon. (ammo) + +Ace3 Beta - Revision 74633 (May 19th, 2008) +-------------------------------------------- +- AceTimer-3.0: ACE-173: don't error on nil handle for CancelTimer(), just bail out early. (ammo) +- AceGUI-3.0: ACE-161, ACE-180, ACE-181: New and improved DropDown widget (originally coded by Borlox) (nargiddley,nevcairiel) +- AceGUI-3.0: AceGUI will call OnWidthSet and OnHeightSet as frames resize (nargiddley) +- AceGUI-3.0: TabGroup: Use OptionsFrameTabButtonTemplate for tabs (nargiddley) +- AceGUI-3.0: TabGroup: Tabs now span multiple lines when there are too many to fit in the width of the frame (nargiddley) +- AceGUI-3.0: TreeGroup: Tree is now sizable by dragging, orig patch by yssaril (nargiddley) +- AceGUI-3.0: Flow layout will now reduce widgets width to fit rather than leaving them sticking out the side of container widgets (nargiddley) +- AceGUI-3.0: Dropdowns will no longer be left open in the background when the frame is clicked or other widgets are activated (nargiddley) +- AceGUI-3.0: ACE-159: Rename Release to OnRelease and Acquire to OnAcquire for widgets. (nargiddley) +- AceGUI-3.0: ACE-171: add IsVisible and IsShown methods to the widget metatable (nargiddley) +- AceGUI-3.0: ACE-164: add tooltips to tree to show full text of childs that got clipped (ammo) +- AceGUI-3.0: ACE-174: make buttons in AceGUI-3.0 locale independant (ammo) +- AceGUI-3.0: ACE-166: fix treegroup visual bug (ammo) +- AceGUI-3.0: ACE-184: make numeric entry for slider more intuitive (ammo) +- AceConfigCmd-3.0: ACE-172 - ignore description in cmd (ammo) +- AceConsole-3.0: nolonger check for existance of slashcommands, overwrite where needed. Last one wins, this enables AddonLoader to X-LoadOn-Slash and override the slashcommand from AddonLoader slashcommand with an Ace3 one. (Ammo) + +Ace3 Beta - Revision 69509 (April 13th, 2008) +--------------------------------------------- +- AceComm-3.0: turn off error messages when receiving invalid multi-part messages (its happening on login etc) (nevcairiel) +- AceDBOptions-3.0: shorten info text at top to prevent scrollbars. (nevcairiel) +- AceHook-3.0: ACE-162: fix unhooking of objects that were not actually hooked (nevcairiel) +- AceDB-3.0: fire the DB callbacks after the namespaces changed their profile as well (nevcairiel) +- AceDB-3.0: namespaces can now be individually reset using :ResetProfile() on the namespace directly (nevcairiel) +- AceDB-3.0: added a optional argument to :ResetProfile to not populate the reset to all namespaces (so the main profile can reset individually without reseting all namespaces too) (nevcairiel) + +Ace3 Beta - Revision 66329 (March 27th, 2008) +--------------------------------------------- +- Overall 2.4 clean ups - removing 2.4 checks and work arounds (nevcairiel) +- AceBucket-3.0: clear the timer reference when unregistering a bucket to prevent a error when unregistering a bucket that was never fired (nevcairiel) +- AceAddon-3.0: Bugfix when enabling/disabling modules from the parents OnEnable after disabling / enabling the parent addon. (ammo) +- AceGUI-3.0: Don't parent the BlizOptionsGroup widget to UIParent and Hide it by default. Fixes stray controls on the screen. (nargiddley) +- AceConfigDialog-3.0: Config windows without a default size won't incorrectly get a default size from a previously open window. (nargiddley) +- AceDBOptions-3.0: added zhCN and zhTW locale (nevcairiel) + +Ace3 Beta - Revision 65665 (March 25th, 2008) +--------------------------------------------- +- AceGUI-3.0: ACE-139: Changed all Widgets to resemble the Blizzard 2.4 Options Style (nevcairiel) +- AceGUI-3.0: Fixed "List"-Layout not reporting new width to "fill"-mode widgets (mikk) +- AceGUI-3.0: added :SetColor to the Label widget (nevcairiel) +- AceGUI-3.0: ACE-132: ColorPicker: added checkers texture for better alpha channel display, and fixed "white"-texture bug (nevcairiel,nargiddley,ammo) +- AceConfig-3.0: ACE-113: Added uiName, uiType, handler, option, type to the info table (nevcairiel,nargiddley) +- AceConfigDialog-3.0: ACE-139: Adjusted for 2.4 options panels (nevcairiel) +- AceConfigDialog-3.0: Use "width" parameter for the description widget (if present) (nevcairiel) +- AceConfigDialog-3.0: ACE-135: Add support for specifying a rowcount for multiline editboxes (nargiddley) +- AceConfigDialog-3.0: :AddToBlizOptions will return the frame registered so you can use it in InterfaceOptionsFrame_OpenToFrame (nevcairiel) +- AceConfigCmd-3.0: handle "hidden" in help-output (nevcairiel) +- AceHook-3.0: fix unhooking of secure hooks (nevcairiel) +- AceDBOptions-3.0: add optional argument to GetOptionsTable(db[, noDefaultProfiles]) - if set to true will not show the default profiles in the profile selection (nevcairiel) +- AceDBOptions-3.0: added koKR locale (nevcairiel) +- Ace3 Standalone: Removed the "Ace3" Category from the 2.4 options panel (nevcairiel) + +Ace3 Beta - Revision 64176 (March 10th, 2008) +--------------------------------------------- +- AceGUI-3.0: Improve Alpha handling for the ColorPicker widget, ColorPicker widget closes the ColorPickerFrame before opening to prevent values getting carried over (nargiddley) +- AceGUI-3.0: The Slider widget will only react to the mousewheel after it has been clicked (anywhere including the label) to prevent accidental changes to the value when trying to scroll the container it is in (nargiddley) +- AceGUI-3.0: The TreeGroup widget is scrollable with the mousewheel (nargiddley) +- AceGUI-3.0: ACE-154: Fix frame levels in more cases to prevent widgets ending up behind their containers (nargiddley) +- AceConfigDialog: Color picker obeys hasAlpha on the color type (nargiddley) +- AceConfigDialog-3.0: ACE-155: Make sure that the selected group is type='group' when checking if it exists (nargiddley) +- AceDBOptions-3.0: added frFR locale (nevcairiel) + +Ace3 Beta - Revision 63886 (March 8th, 2008) +--------------------------------------------- +- AceDBOptions-3.0: new library to provide a Ace3Options table to control the AceDB-3.0 profiles (nevcairiel) +- AceDB-3.0: add "silent" option to DeleteProfile and CopyProfile when we deal with namespaces (nevcairiel) +- AceDB-3.0: implement library upgrade path (nevcairiel) +- AceDB-3.0: ACE-146: fix problem with non-table values overruling ['*']-type defaults (nevcairiel) +- AceConsole-3.0: treat |T|t texture links similar to |H|h|h links. (ammo) +- AceGUI-3.0: Use Blizzard Templates for the EditBox and DropDown widget (nevcairiel) +- AceBucket-3.0: ACE-150: callback is now optional, if not supplied will use the eventname as method name (only possible if one event is supplied, and not a event table) (nevcairiel) +- tests: adjust tests for AceGUI and AceConsole changes (nevcairiel) + +Ace3 Beta - Revision 63220 (Feb 29th, 2008) +--------------------------------------------- +- AceTimer-3.0: CancelAllTimers() now cancels silent (elkano) +- AceConfigDialog: Add :SetDefaultSize(appName, width, height), sets the size the dialog will open to. Does not effect already open windows. (nargiddley) +- AceConfigDialog: Fix typo in type check for range values (nargiddley) +- AceGUI: ColorPicker widget will correctly fire OnValueChanged for the cancel event of the colorpicker popup. Reset ColorPicker's color on Acquire. (nargiddley) +- AceGUI: Fix Spelling of Aquire -> Acquire for widgets, all custom widgets will need to be updated. A warning will be printed for widgets not upgraded yet. (nargiddley) +- AceConfigCmd-3.0: add simple coloring to slashcommand output. (ammo) +- AceConsole-3.0: add some color to :Print (ammo) +- AceAddon-3.0: set error level on library embedding to point to the :NewAddon call (nevcairiel) + +Ace3 Beta - Revision 62182 (Feb 20th, 2008) +--------------------------------------------- +- Ace3 StandAlone: Add a page to the Blizzard 2.4 Interface Options with icons to open dialogs for configs registered when installed standalone (nargiddley) +- AceConfigDialog: type = 'description' now uses the fields image and imageCoords instead of icon and iconCoords, add imageWidth and imageHeight (nargiddley) +- AceConfigDialog: Add :AddToBlizzardOptions(appName, name), this will add the specified config to the Blizzard Options pane new in 2.4. This will only be available if running on the 2.4 PTR (nargiddley) +- AceDB: fix GetProfiles() when setting the same profile twice (nevcairiel) +- AceDB: bail out of :SetProfile early when trying to set to the same profile (nevcairiel) +- AceDB: add nil checks to metatable handling (nevcairiel) +- AceDB: clear tables that are empty after defaults removal (nevcairiel) +- AceGUI: Fix a couple of layout bugs causing the width of groups to be wrong (nargiddley) +- AceGUI: Add Icon widget (nargiddley) +- AceGUI: Allow room for the border in the BlizOptionsGroup widget (nargiddley) +- AceGUI: Button and Keybinding use UIPanelButtonTemplate2 (nargiddley) +- AceConsole-3.0: Fix bug where no table for [self] was created when registering weak commands (ammo) +- AceTimer-3.0: add missing :OnEmbedDisable (ammo) +- AceAddon-3.0: added :GetName() that will always return the "real" name of a addon or module object without any prefixes (nevcairiel) + +Ace3 Beta - Revision 60697 (Feb 9th, 2008) +--------------------------------------------- +- CallbackHandler-1.0: remove unnecessary table creation if a event is fired thats not registered (nevcairiel) +- AceAddon-3.0: fixed a bug with recursive addon loading (nevcairiel) +- AceGUI: Update TabGroup's tablist format, tabs are selected by value not index (nargiddley) +- AceGUI: Add MultiLineEditBox widget (nargiddley, originally by bam) +- AceGUI: Small fix to the flow layout preventing controls overlapping in some cases (nargiddley) +- AceConfigDialog: Implement control and dialogControl for types 'input' and 'select' (nargiddley) +- AceConfigDialog: Add support for multiline = true on type = 'input' (nargiddley) +- AceConfigDialog: Fix an error when all groups are hidden in a group with childGroups = 'select' (nargiddley) +- AceConfigDialog: type = 'description' will now show .icon as an image with its text (nargiddley) +- AceConfigDialog: multiline inputs are no longer forced to width = "full" (nargiddley) +- AceConfigDialog: bug fix when loading without AceConsole present (nevcairiel) + +Ace3 Beta - Revision 60545 (Feb 7th, 2008) +--------------------------------------------- +- AceGUI: SetToplevel(true) for the Frame widget, multiple open windows should play nice together now (nargiddley) +- AceGUI: Move Frames to the FULLSCREEN_DIALOG strata (nargiddley) +- AceGUI: Dropdown, Editbox and Keybinding labels grey out when disabled (nargiddley) +- AceGUI: Add OnClick callback to the TreeGroup widget (nargiddley) +- AceConfigDialog: Confirm popups will be above the config window (nargiddley) + +Ace3 Beta - Revision 60163 (Feb 3rd, 2008) +--------------------------------------------- +- Initial Beta release diff --git a/Locales/Core-Locale-deDE.lua b/Locales/Core-Locale-deDE.lua index a33a0bc..d574ddf 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2021 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -164,7 +164,7 @@ L["ISB"] = "http://IsBoxer.com" L["TEMP_WEBSITE1"] = "" L["TEMP_WEBSITE2"] = "" L["TEMP_WEBSITE3"] = "" -L["COPYRIGHT"] = "Copyright (c) 2015-2019 Jennifer Calladine (Ebony)" +L["COPYRIGHT"] = "Copyright (c) 2015-2021 Jennifer Calladine (Ebony)" L["COPYRIGHTTWO"] = "Released Under License: The MIT License" L["FRAME_RESET"] = "Frame Reset" -- Msg 8000 diff --git a/Locales/Core-Locale-enUS.lua b/Locales/Core-Locale-enUS.lua index e95cb26..1179883 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -18,6 +18,7 @@ local L = LibStub("AceLocale-3.0"):NewLocale( "Core", "enUS", true ) L["JAMBA"] = "Jamba" L["JAMBA EE"] = "Jamba EE" L["EMA"] = "EMA" +L["DISABLED_IN_CLASSIC"] = "Not Supported In Classic or Classic-TBC" L[""] = true L[" "] = true L[": "] = true @@ -27,6 +28,7 @@ L[" / "] = true L["/"] = true L["%"] = true L["N/A"] = true +L["WIP"] = "wip" L["OPEN_CONFIG"] = "Opens The Config" L["OPEN_CONFIG_HELP"] = "Opens The Configuration GUI" L["PUSH_SETTINGS"] = "Push Settings" @@ -106,15 +108,13 @@ L["MESSAGE_DISPLAY"] = "Message Display" L["GROUP_LIST"] = "Group List" L["DISPLAY"] = "Display" L["ITEM_USE"] = "Item Use" -L["VENDER_LIST_MODULE"] = "Sell List" +L["VENDOR_LIST_MODULE"] = "Sell List" L["INTERACTION"] = "Interaction" L["CURRENCY"] = "Currency" L["INFORMATION"] = "Information" L["TOON"] = "Toon" L["FOLLOW"] = "Follow" L["PURCHASE"] = "Purchase" --- FUCKED UP! -L["VENDER"] = "Vendor" L["VENDOR"] = "Vendor" L["PURCHASE"] = "Purchase" L["WARNINGS"] = "Warnings" @@ -152,29 +152,14 @@ 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 v3.0 For 9.0.1!" -L["TEXT2"] = "" -L["TEXT3"] = "Welcome To v3.0!" -L["TEXT4"] = "" -L["TEXT5"] = "" -L["TEXT6"] = "|cFFFFFFFFRead The ChangeLog For More Information" -L["TEXT7"] = "" -L["TEXT8"] = "" -L["TEXT9"] = "" -L["TEXT10"] = "" +L["KEY_BINDINGS"] = "Key Bindings" +L["VERSION"] = "Version" L["SPECIAL_THANKS"] = "Special Thanks:" 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" L["ME"] = "Current Project Manger Jennifer Calladine (Ebony) " L["ME_TWITTER"] = "https://twitter.com/Jenn_Ebony" -L["D-B"] = "http://Dual-boxing.com" -L["ISB"] = "" -L["TEMP_WEBSITE1"] = "" -L["TEMP_WEBSITE2"] = "" -L["TEMP_WEBSITE3"] = "" -L["COPYRIGHT"] = "Copyright (c) 2015-2020 Jennifer Calladine (Ebony)" +L["COPYRIGHT"] = "Copyright (C) 2015-2021 Jennifer Calladine (Ebony)" L["COPYRIGHTTWO"] = "Released Under License: All Rights Reserved unless otherwise explicitly stated" L["FRAME_RESET"] = "Frame Reset" -- Msg 8000 @@ -267,6 +252,23 @@ L["ONLINE"] = "Online" L["OFFLINE"] = "Offline" L["STATICPOPUP_ADD"] = "Enter character to add in name-server format:" L["STATICPOPUP_REMOVE"] = "Are you sure you wish to remove %s from the team list?" +L["SET_FOCUS_MASTER"] = "Sets Focus To Master* " +L["SET_MASTER_TARGET"] = "Sets Target To Master* " +L["SET_MASTER_ASSIST"] = "Sets Assist To Master* " +L["FAKE_KEY_BINDING"] = "* Needs to Press the key on all clones" +L["BINDING_CLICK_TO_MOVE"] = "Toggle Click To Move" +L["COMMANDLINE_CLICK_TO_MOVE"] = "Toggles Click To Move " +L["COMMANDLINE_CLICK_TO_MOVE_HELP"] = "Toggles Click To Move By " +L["SET_FOCUS_ONE"] = "Sets Focus To Order One" +L["SET_FOCUS_TWO"] = "Sets Focus To Order Two" +L["SET_FOCUS_THREE"] = "Sets Focus To Order Three" +L["SET_FOCUS_FOUR"] = "Sets Focus To Order Four" +L["SET_FOCUS_FIVE"] = "Sets Focus To Order Five" +L["SET_FOCUS_SIX"] = "Sets Focus To Order Six" +L["SET_FOCUS_SEVEN"] = "Sets Focus To Order Seven" +L["SET_FOCUS_EIGHT"] = "Sets Focus To Order Eight" +L["SET_FOCUS_NINE"] = "Sets Focus To Order Nine" +L["SET_FOCUS_TEN"] = "Sets Focus To Order Ten" -------------------------- -- Message Locale @@ -367,8 +369,6 @@ 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" -L["DESTROY_ITEM_HELP"] = "Destroy Items At The Vender \n\nThat Means They GET DELETED \nUse With Care!" L["ONLY_SB"] = "Only SoulBound" L["ONLY_SB_HELP"] = "Only Sell SoulBound Items" L["iLVL"] = "Item Level" @@ -424,6 +424,8 @@ L["ONLY_DISMOUNT_WITH_MASTER_HELP"] = "Only Dismount's When Master Character Dis L["ONLY_MOUNT_WHEN_IN_RANGE"] = "Only Mount When In Range" L["ONLY_MOUNT_WHEN_IN_RANGE_HELP"] = "Dismounts Only When The Team Is In Range /nOnly Works In A Party!" L["I_AM_UNABLE_TO_MOUNT"] = "I Am Unable To Mount." +L["MOUNT_HELP"] = "Command Teams To Summon A Random Favorite Mount" + -- Loot Locale L["LOOT_OPTIONS"] = "Loot v2 Options" L["DISMOUNT_WITH_CHARACTER"] = "Dismount With Character That Dismount" @@ -484,6 +486,10 @@ L["SPACE_FOR_POINTS"] = "Space For Points" L["SPACE_BETWEEN_VALUES"] = "Space Between Values" L["TOTAL"] = "Total" L["CURR"] = "Curr" +L["BAG_SPACE_HELP"] = "Shows The Characters Current Bag Space" +L["DURR"] = "Durability" +L["DURR_HELP"] = "Shows The Character Durability " +-- chat Triggers L["CHAT_TRIGGER"] = "Chat !Triggers" L["CHAT_TRIGGERS"] = "Listen to Chat Triggers" L["CHAT_TRIGGERS_HELP"] = "Listen to !Triggers in \nParty/raid/guild to tell your team about things\n!emahelp" @@ -540,6 +546,8 @@ L["VALUES"] = "Values" L["VALUES_HELP"] = "Show Values" L["PERCENTAGE"] = "Percentage" L["PERCENTAGE_HELP"] = "Show Percentage" +L["SHOW_LEVEL"] = "Show Level" +L["SHOW_LEVEL_HELP"] = "Show level on experience bar" L["SHOW_XP"] = "Experience Bar" L["SHOW_XP_HELP"] = "Show the Team Experience bar" L["ARTIFACT_BAR"] = "Artifact Bar" @@ -591,6 +599,8 @@ L["FOLLOW_SET_MASTER"] = "Sets Follow By Name" L["FOLLOW_SET_MASTER_HELP"] = "Sets Follow By Name" L["TRAIN"] = "Makes All Characters Follow In A Train" L["FOLLOW_ME"] = "Follow Me" +L["FOLLOW_STOP"] = "Follow Stop" +L["FOLLOW_STOP_HELP"] = "Sends A Command To The Minions To Stop Follow There Target" L["TRAIN_HELP"] = "Makes All Characters Follow In A Train Behind Each Other" L["FOLLOW_ME_HELP"] = "Follow Me " L["SNW"] = "Snw" @@ -613,9 +623,12 @@ L["ANY_MEMBER_IN_COMBAT"] = "Any Member In Combat" L["FOLLOW_STROBING"] = "Follow Strobing" L["FOLLOW_STROBING_EMA_FOLLOW_COMMANDS."] = "Follow Strobing Is Controlled By \"/ema Commands\" Or KeyBindings" L["USE_MASTER_STROBE_TARGET"] = "Always Use Master As The Strobe Target" +-- L["PAUSE_FOLLOW_STROBING"] = "Pause Follow Strobing If ...." L["DRINKING_EATING"] = "Drinking/Eating" L["IN_A_VEHICLE"] = "In A Vehicle" +L["PLAYER_DEAD"] = "Dead Or Ghost" +-- L["GROUP_FOLLOW_STROBE"] = "Group For Follow Strobe" L["FREQUENCY"] = "Frequency (s)" L["FREQUENCY_COMABT"] = "Frequency In Combat (s)" @@ -630,7 +643,7 @@ L["PVP_FOLLOW_ERR"] = "Can Not Follow You, I Am Engaged In PvP Combat" -- Vendor/Purchase Locale. L["AUTO_BUY_ITEMS"] = "Auto Buy Items" L["OVERFLOW"] = "Overflow" -L["REMOVE_VENDER_LIST"] = "Remove From Vendor List" +L["REMOVE_VENDOR_LIST"] = "Remove From Vendor List" L["ITEM_DROP"] = "Item (Shift+Click Item In Bag)" L["PURCHASE_ITEMS"] = "Auto Purchase Items" L["ADD_ITEM"] = "Add Item" @@ -737,6 +750,14 @@ L["RELEASE_TEAM_Q"] = "Release All Team?" L["RELEASE_TEAM"] = "Release Team" L["RECOVER_CORPSES"] = "Recover All Team Corpses?" L["ERR_GOLD_TO_REPAIR"] = "I Do Not Have Enough Money To Repair All My Items" +--Set View +L["SET_VIEW_HEADER"] = "Set View Settings" +L["SET_VIEW"] = "Set View" +L["SET_VIEW_HELP"] = "Set View Team View" +L["SET_VIEW_WITHOUT_MASTER"] = "Set View Without Master" +L["SET_VIEW_WITHOUT_MASTER_HELP"] = "Set View Without The Master" + + L["RELEASE_CORPSE_FOR_X"] = function( delay ) return string.format( "I can not release to my Corpse for: %s seconds", delay ) end @@ -851,6 +872,8 @@ L["MUST_CHOOSE_OWN_REWARD"] = "Toon Must Choose Own Reward" L["MUST_CHOOSE_OWN_REWARD_HELP"] = "Toon Must Select Own Quest Reward" L["CHOOSE_SAME_REWARD"] = "Toon Choose Same Reward As Team" L["CHOOSE_SAME_REWARD_HELP"] = "Toon Will Choose Same Reward As EMA Team Members \n\nOnly Use If All Team Members Class" +L["CHOOSE_BEST_REWARD"] = "Choose Best Quest Reward" +L["CHOOSE_BEST_REWARD_HELP"] = "Try & Choose Best Quest Reward\nCan i use it < better in slot < If not best sell price!" L["MODIFIER_CHOOSE_SAME_REWARD"] = "If Modifier Keys Pressed, Toon Choose Same Reward" L["MODIFIER_CHOOSE_SAME_REWARD_HELP"] = "If Modifier Key Below Is Pressed, Minion Can Choose Same Reward" L["OVERRIDE_REWARD_SELECTED"] = "Override: If Minion Already Has Reward Selected, Choose That Reward" @@ -859,6 +882,10 @@ L["SHARING_QUEST_TO_ALLMINIONS"] = "Sharing Quests To All Minions" L["TRACKING_QUEST_TO_ALLMINIONS"] = "Tracking Quests To All Minions" L["UNTRACKING_QUESTS_ALLMINIONS"] = "Untracking Quests To All Minions" L["TOGGLE"] = "Toggle" +L["TRACK_SINGLE_QUEST"] = "Track Selected" +L["TRACK_SINGLE_QUEST_TOOLTIP"] = "Track The Selected Quest" +L["UNTRACK_SINGLE_QUEST"] = "UnTrack Selected" +L["UNTRACK_SINGLE_QUEST_TOOLTIP"] = "UnTrack The Selected Quest" L["ABANDON_ALL"] = "Abandon All Quests" L["ABANDON_ALL_TOOLTIP"] = "Aabandon All Quests On All Minions" L["SHARE_ALL"] = "Share All" @@ -895,7 +922,6 @@ end ------------------------ -- QuestTracker Locale - L["SHOW_QUEST_WATCHER"] = "Show Objective Tracker" L["SHOW_QUEST_WATCHER_HELP"] = "Show The Objective/Quest EMA Tracker Window." L["HIDE_QUEST_WATCHER"] = "Hide Objective Tracker" @@ -945,23 +971,7 @@ L["REMOVE_GUILD_LIST"] = "Are You Sure You Wish To Remove The Selected Item From L["I_HAVE_DEPOSITED_X_TO_GB"] = function( gold ) return string.format("Deposited %s To The Guild Bank", gold ) end ------------------------- --- ISBOXER Locale -L["ISBOXER_LIST_HEADER"] = "Your Current ISBoxer Team" -L["CHECKBOX_ISBOXER_SYNC"] = "Sync With ISBoxer" -L["CHECKBOX_ISBOXER_SYNC_HELP"] = "Sync With ISBoxer TeamList \nAdd/Remove Characters No Longer In ISBoxer Team" -L["ISBOXER_SYNC_HEADER"] = "Sync With ISBoxer" -L["SYNCINFORMATIONONE"] = "|cFFFF0000 This Will Remove All Your Team Members!" -L["SYNCINFORMATIONTWO"] = "|cFFFF0000 And Will Sync WIth The ISBoxer TeamList" -L["SYNCINFORMATIONTHREE"] = "|cFFFF0000 Note: Some Parts Of EMA Is Not Supported Useing This Method Currently" -L["REMOVE_ISBOXER_LIST"] = "" -L["ISBOXER_COMMAND_LINE_HELP"] = "PH For Isboxer Use Only" -L["ISBOXER_SET_MASTER"] = "ISBoxer Set Master" -L["ISBOXER_SET_STROBEONME"] = "ISBoxer Set Strobe On Me" -L["ISBOXER_SET_SNW"] = "ISBoxer Set snw PH" -L["ISBOXER_COMMAND_LINE_HELP_TWO"] = "PH For Isboxer Use Only" -L["ISBOXER_SET_STROBEOFF"] = "ISBoxer Set Strobe Off" ----------------------- -- Mail Locale diff --git a/Modules/Bank.lua b/Modules/Bank.lua index 89702a8..ee36374 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- diff --git a/Modules/DisplayTeam.lua b/Modules/DisplayTeam.lua index de723ef..d7faed3 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -75,8 +75,9 @@ EMA.settings = { followStatusHeight = 15, followStatusShowName = true, showExperienceStatus = true, + showLevel = true, showXpStatus = true, - showArtifactStatus = false, + showGoldStatus = false, showHonorStatus = false, showRepStatus = false, experienceStatusWidth = 100, @@ -469,9 +470,9 @@ function EMA:SettingsUpdateStatusBarTexture() characterStatusBar["experienceBar"]:SetStatusBarTexture( statusBarTexture ) characterStatusBar["experienceBar"]:GetStatusBarTexture():SetHorizTile( false ) characterStatusBar["experienceBar"]:GetStatusBarTexture():SetVertTile( false ) - characterStatusBar["experienceArtBar"]:SetStatusBarTexture( statusBarTexture ) - characterStatusBar["experienceArtBar"]:GetStatusBarTexture():SetHorizTile( false ) - characterStatusBar["experienceArtBar"]:GetStatusBarTexture():SetVertTile( false ) + characterStatusBar["experienceGoldBar"]:SetStatusBarTexture( statusBarTexture ) + characterStatusBar["experienceGoldBar"]:GetStatusBarTexture():SetHorizTile( false ) + characterStatusBar["experienceGoldBar"]:GetStatusBarTexture():SetVertTile( false ) characterStatusBar["reputationBar"]:SetStatusBarTexture( statusBarTexture ) characterStatusBar["reputationBar"]:GetStatusBarTexture():SetHorizTile( false ) characterStatusBar["reputationBar"]:GetStatusBarTexture():SetVertTile( false ) @@ -493,7 +494,7 @@ function EMA:SettingsUpdateFontStyle() for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do characterStatusBar["followBarText"]:SetFont( textFont , textSize , "OUTLINE") characterStatusBar["experienceBarText"]:SetFont( textFont , textSize , "OUTLINE") - characterStatusBar["experienceArtBarText"]:SetFont( textFont , textSize , "OUTLINE") + characterStatusBar["experienceGoldBarText"]:SetFont( textFont , textSize , "OUTLINE") characterStatusBar["reputationBarText"]:SetFont( textFont , textSize , "OUTLINE") characterStatusBar["healthBarText"]:SetFont( textFont , textSize , "OUTLINE") characterStatusBar["powerBarText"]:SetFont( textFont , textSize , "OUTLINE") @@ -590,33 +591,31 @@ function EMA:CreateEMATeamStatusBar( characterName, parentFrame ) characterStatusBar["experienceBarText"] = experienceBarText EMA:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil ) - -- Set the artifactXP bar. - local experienceArtName = EMA.globalFramePrefix.."ExperienceArtBar" - local experienceArtBar = CreateFrame( "StatusBar", experienceArtName, parentFrame, "AnimatedStatusBarTemplate" ) --"TextStatusBar,SecureActionButtonTemplate" ) - experienceArtBar.backgroundTexture = experienceArtBar:CreateTexture( experienceArtName.."BackgroundTexture", "ARTWORK" ) - experienceArtBar.backgroundTexture:SetColorTexture( 1.0, 0.0, 0.0, 0.15 ) - experienceArtBar:SetStatusBarTexture( statusBarTexture ) - experienceArtBar:GetStatusBarTexture():SetHorizTile( false ) - experienceArtBar:GetStatusBarTexture():SetVertTile( false ) - experienceArtBar:SetMinMaxValues( 0, 100 ) - experienceArtBar:SetValue( 100 ) - experienceArtBar:SetFrameStrata( "LOW" ) - local experienceArtBarClick = CreateFrame( "CheckButton", experienceArtName.."Click", parentFrame, "SecureActionButtonTemplate" ) - experienceArtBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) ) - experienceArtBarClick:SetFrameStrata( "MEDIUM" ) - characterStatusBar["experienceArtBar"] = experienceArtBar - characterStatusBar["experienceArtBarClick"] = experienceArtBarClick - local experienceArtBarText = experienceArtBar:CreateFontString( experienceArtName.."Text", "OVERLAY", "GameFontNormal" ) - experienceArtBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - experienceArtBarText:SetFont( textFont , textSize, "OUTLINE") - experienceArtBarText:SetAllPoints() - experienceArtBarText.artifactName = "N/A" - experienceArtBarText.artifactXP = 0 - experienceArtBarText.artifactForNextPoint = 100 - experienceArtBarText.artifactPointsSpent = 1 - experienceArtBarText.artifactPointsAvailable = 0 - characterStatusBar["experienceArtBarText"] = experienceArtBarText - EMA:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil ) + -- Set the Gold bar. + local experienceGoldName = EMA.globalFramePrefix.."ExperienceGoldBar" + local experienceGoldBar = CreateFrame( "StatusBar", experienceGoldName, parentFrame, "TextStatusBar", "SecureActionButtonTemplate" ) + experienceGoldBar.backgroundTexture = experienceGoldBar:CreateTexture( experienceGoldName.."BackgroundTexture", "ARTWORK" ) + experienceGoldBar.backgroundTexture:SetColorTexture( 1.0, 0.0, 0.0, 0.15 ) + experienceGoldBar:SetStatusBarTexture( statusBarTexture ) + experienceGoldBar:GetStatusBarTexture():SetHorizTile( false ) + experienceGoldBar:GetStatusBarTexture():SetHorizTile( false ) + experienceGoldBar:GetStatusBarTexture():SetVertTile( false ) + experienceGoldBar:SetMinMaxValues( 0, 100 ) + experienceGoldBar:SetValue( 100 ) + experienceGoldBar:SetFrameStrata( "LOW" ) + local experienceGoldBarClick = CreateFrame( "CheckButton", experienceGoldName.."Click", parentFrame, "SecureActionButtonTemplate" ) + experienceGoldBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) ) + experienceGoldBarClick:SetFrameStrata( "MEDIUM" ) + characterStatusBar["experienceGoldBar"] = experienceGoldBar + characterStatusBar["experienceGoldBarClick"] = experienceGoldBarClick + local experienceGoldBarText = experienceGoldBar:CreateFontString( experienceGoldName.."Text", "OVERLAY", "GameFontNormal" ) + experienceGoldBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + experienceGoldBarText:SetFont( textFont , textSize, "OUTLINE") + experienceGoldBarText:SetAllPoints() + experienceGoldBarText.currentGold = 100 + + characterStatusBar["experienceGoldBarText"] = experienceGoldBarText + EMA:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil ) -- Set the reputation bar. local reputationName = EMA.globalFramePrefix.."ReputationBar" @@ -795,8 +794,8 @@ function EMA:HideEMATeamStatusBar( characterName ) characterStatusBar["followBarClick"]:Hide() characterStatusBar["experienceBar"]:Hide() characterStatusBar["experienceBarClick"]:Hide() - characterStatusBar["experienceArtBar"]:Hide() - characterStatusBar["experienceArtBarClick"]:Hide() + characterStatusBar["experienceGoldBar"]:Hide() + characterStatusBar["experienceGoldBarClick"]:Hide() characterStatusBar["reputationBar"]:Hide() characterStatusBar["reputationBarClick"]:Hide() characterStatusBar["healthBar"]:Hide() @@ -950,47 +949,47 @@ function EMA:UpdateEMATeamStatusBar( characterName, characterPosition ) -- Display the experience bar. local experienceBar = characterStatusBar["experienceBar"] local experienceBarClick = characterStatusBar["experienceBarClick"] - local experienceArtBar = characterStatusBar["experienceArtBar"] - local experienceArtBarClick = characterStatusBar["experienceArtBarClick"] + local experienceGoldBar = characterStatusBar["experienceGoldBar"] + local experienceGoldBarClick = characterStatusBar["experienceGoldBarClick"] local experienceHonorBar = characterStatusBar["experienceHonorBar"] local experienceHonorBarClick = characterStatusBar["experienceHonorBarClick"] local reputationBar = characterStatusBar["reputationBar"] local reputationBarClick = characterStatusBar["reputationBarClick"] if EMA.db.showExperienceStatus == true then - --EMA:Print("TestLevel", characterName, level, maxLevel, xpDisabled, showXP, showArtifact ) + --EMA:Print("TestLevel", characterName, level, maxLevel, xpDisabled, showXP, showGold ) local showBarCount = 0 if EMA.db.showXpStatus == true then showBarCount = showBarCount + 1 showBeforeBar = parentFrame showXP = true end - if EMA.db.showArtifactStatus == true then - --EMA:Print("ShowArtifact") + if EMA.db.showGoldStatus == true then + --EMA:Print("ShowGold") showBarCount = showBarCount + 1 if EMA.db.showXpStatus == true then - showArtBeforeBar = experienceBar - setArtPoint = "BOTTOMLEFT" - setArtLeft = 0 - setArtTop = -1 + showGoldBeforeBar = experienceBar + setGoldPoint = "BOTTOMLEFT" + setGoldLeft = 0 + setGoldTop = -1 else - showArtBeforeBar = parentFrame - setArtPoint = "TOPLEFT" - setArtLeft = positionLeft - setArtTop = positionTop + showGoldBeforeBar = parentFrame + setGoldPoint = "TOPLEFT" + setGoldLeft = positionLeft + setGoldTop = positionTop end end if EMA.db.showRepStatus == true then --EMA:Print("Show Reputation") showBarCount = showBarCount + 1 - if EMA.db.showXpStatus == true and EMA.db.showArtifactStatus == false then --and EMA.db.showHonorStatus == false then + if EMA.db.showXpStatus == true and EMA.db.showGoldStatus == false then --and EMA.db.showHonorStatus == false then --EMA:Print("Show Reputation 1") showRepBeforeBar = experienceBar setRepPoint = "BOTTOMLEFT" setRepLeft = 0 setRepTop = -1 - elseif EMA.db.showArtifactStatus == true then --and EMA.db.showHonorStatus == false then + elseif EMA.db.showGoldStatusStatus == true then --and EMA.db.showHonorStatus == false then --EMA:Print("Show Reputation 2") - showRepBeforeBar = experienceArtBar + showRepBeforeBar = experienceGoldBar setRepPoint = "BOTTOMLEFT" setRepLeft = 0 setRepTop = -1 @@ -1023,22 +1022,22 @@ function EMA:UpdateEMATeamStatusBar( characterName, characterPosition ) experienceBar:Hide() experienceBarClick:Hide() end - --Artifact Bar - experienceArtBar.backgroundTexture:SetAllPoints() - experienceArtBar:SetWidth( EMA.db.experienceStatusWidth ) - experienceArtBar:SetHeight( EMA.db.experienceStatusHeight / showBarCount ) - experienceArtBar:ClearAllPoints() - experienceArtBar:SetPoint( "TOPLEFT", showArtBeforeBar, setArtPoint, setArtLeft , setArtTop ) - experienceArtBarClick:ClearAllPoints() - experienceArtBarClick:SetPoint( "TOPLEFT", showArtBeforeBar, setArtPoint, setArtLeft , setArtTop ) - experienceArtBarClick:SetWidth( EMA.db.experienceStatusWidth ) - experienceArtBarClick:SetHeight( EMA.db.experienceStatusHeight / showBarCount ) - if EMA.db.showArtifactStatus == true then - experienceArtBar:Show() - experienceArtBarClick:Show() + --Gold Bar + experienceGoldBar.backgroundTexture:SetAllPoints() + experienceGoldBar:SetWidth( EMA.db.experienceStatusWidth ) + experienceGoldBar:SetHeight( EMA.db.experienceStatusHeight / showBarCount ) + experienceGoldBar:ClearAllPoints() + experienceGoldBar:SetPoint( "TOPLEFT", showGoldBeforeBar, setGoldPoint, setGoldLeft , setGoldTop ) + experienceGoldBarClick:ClearAllPoints() + experienceGoldBarClick:SetPoint( "TOPLEFT", showGoldBeforeBar, setGoldPoint, setGoldLeft , setGoldTop ) + experienceGoldBarClick:SetWidth( EMA.db.experienceStatusWidth ) + experienceGoldBarClick:SetHeight( EMA.db.experienceStatusHeight / showBarCount ) + if EMA.db.showGoldStatus == true then + experienceGoldBar:Show() + experienceGoldBarClick:Show() else - experienceArtBar:Hide() - experienceArtBarClick:Hide() + experienceGoldBar:Hide() + experienceGoldBarClick:Hide() end --rep @@ -1068,9 +1067,12 @@ function EMA:UpdateEMATeamStatusBar( characterName, characterPosition ) else experienceBar:Hide() experienceBarClick:Hide() - experienceArtBar:Hide() - experienceArtBarClick:Hide() + experienceGoldBar:Hide() + experienceGoldBarClick:Hide() end + + + -- Display the health bar. local healthBar = characterStatusBar["healthBar"] local healthIncomingBar = characterStatusBar["healthIncomingBar"] @@ -1487,23 +1489,32 @@ local function SettingsCreateDisplayOptions( top ) L["PERCENTAGE_HELP"] ) movingTop = movingTop - checkBoxHeight - verticalSpacing - EMA.settingsControl.displayOptionsCheckBoxShowXpStatus = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl.displayOptionsCheckBoxShowLevel = EMAHelperSettings:CreateCheckBox( EMA.settingsControl, thirdWidth, left, movingTop, + L["SHOW_LEVEL"], + EMA.SettingsToggleShowLevel, + L["SHOW_LEVEL_HELP"] + ) + EMA.settingsControl.displayOptionsCheckBoxShowXpStatus = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + thirdWidth, + left2, + movingTop, L["SHOW_XP"], EMA.SettingsToggleShowXpStatus, L["SHOW_XP_HELP"] ) - EMA.settingsControl.displayOptionsCheckBoxShowArtifactStatus = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl.displayOptionsCheckBoxShowGoldStatus = EMAHelperSettings:CreateCheckBox( EMA.settingsControl, thirdWidth, - left2, + left3, movingTop, - L["ARTIFACT_BAR"], - EMA.SettingsToggleShowArtifactStatus, - L["ARTIFACT_BAR_HELP"] + L["GOLD"], + EMA.SettingsToggleShowGoldStatus, + L["GOLD"] ) movingTop = movingTop - checkBoxHeight - verticalSpacing EMA.settingsControl.displayOptionsCheckBoxShowRepStatus = EMAHelperSettings:CreateCheckBox( @@ -1807,7 +1818,8 @@ function EMA:SettingsRefresh() EMA.settingsControl.displayOptionsFollowStatusHeightSlider:SetValue( EMA.db.followStatusHeight ) EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatus:SetValue( EMA.db.showExperienceStatus ) EMA.settingsControl.displayOptionsCheckBoxShowXpStatus:SetValue( EMA.db.showXpStatus ) - EMA.settingsControl.displayOptionsCheckBoxShowArtifactStatus:SetValue( EMA.db.showArtifactStatus ) + EMA.settingsControl.displayOptionsCheckBoxShowLevel:SetValue( EMA.db.showLevel ) + EMA.settingsControl.displayOptionsCheckBoxShowGoldStatus:SetValue( EMA.db.showGoldStatus ) EMA.settingsControl.displayOptionsCheckBoxShowRepStatus:SetValue( EMA.db.showRepStatus ) EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusValues:SetValue( EMA.db.experienceStatusShowValues ) EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusPercentage:SetValue( EMA.db.experienceStatusShowPercentage ) @@ -1863,7 +1875,8 @@ function EMA:SettingsRefresh() EMA.settingsControl.displayOptionsFollowStatusHeightSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showFollowStatus) EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatus:SetDisabled( not EMA.db.showTeamList ) EMA.settingsControl.displayOptionsCheckBoxShowXpStatus:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus) - EMA.settingsControl.displayOptionsCheckBoxShowArtifactStatus:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus) + EMA.settingsControl.displayOptionsCheckBoxShowLevel:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus) + EMA.settingsControl.displayOptionsCheckBoxShowGoldStatus:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus) EMA.settingsControl.displayOptionsCheckBoxShowRepStatus:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus ) EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusValues:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus ) EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusPercentage:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus ) @@ -1939,7 +1952,8 @@ function EMA:EMAOnSettingsReceived( characterName, settings ) EMA.db.followStatusShowName = settings.followStatusShowName EMA.db.showExperienceStatus = settings.showExperienceStatus EMA.db.showXpStatus = settings.showXpStatus - EMA.db.showArtifactStatus = settings.showArtifactStatus + EMA.db.showLevel = settings.showLevel + EMA.db.showGoldStatus = settings.showGoldStatus EMA.db.showRepStatus = settings.showRepStatus EMA.db.experienceStatusWidth = settings.experienceStatusWidth EMA.db.experienceStatusHeight = settings.experienceStatusHeight @@ -2121,14 +2135,18 @@ function EMA:SettingsToggleShowExperienceStatus( event, checked ) EMA:SettingsRefresh() end -- +function EMA:SettingsToggleShowLevel( event, checked ) + EMA.db.showLevel = checked + EMA:SettingsRefresh() +end function EMA:SettingsToggleShowXpStatus( event, checked ) EMA.db.showXpStatus = checked EMA:SettingsRefresh() end -function EMA:SettingsToggleShowArtifactStatus( event, checked ) - EMA.db.showArtifactStatus = checked +function EMA:SettingsToggleShowGoldStatus( event, checked ) + EMA.db.showGoldStatus = checked EMA:SettingsRefresh() end @@ -2497,7 +2515,8 @@ function EMA:PLAYER_LEVEL_UP( event, ... ) EMA:SendExperienceStatusUpdateCommand() end -function EMA:ARTIFACT_XP_UPDATE(event, ...) + +function EMA:PLAYER_MONEY(event, ...) EMA:SendExperienceStatusUpdateCommand() end @@ -2509,52 +2528,34 @@ function EMA:SendExperienceStatusUpdateCommand() local playerMaxLevel = GetMaxPlayerLevel() local playerLevel = UnitLevel("player") local exhaustionStateID, exhaustionStateName, exhaustionStateMultiplier = GetRestState() - --Artifact XP - local artifactName = "n/a" - local artifactXP = 0 - local artifactForNextPoint = 100 - local artifactPointsAvailable = 0 - local artifactPointsSpent = 0 + -- Gold + local currentGold = GetMoney() - - local azeriteItemLocation = C_AzeriteItem.FindActiveAzeriteItem() - if (azeriteItemLocation) and HasArtifactEquipped() == false then - local azeriteXP, azeriteTotalXP = C_AzeriteItem.GetAzeriteItemXPInfo(azeriteItemLocation) - local azeriteLevel = C_AzeriteItem.GetPowerLevel(azeriteItemLocation) - local azeriteItem = Item:CreateFromItemLocation(azeriteItemLocation) - local azeriteName = azeriteItem:GetItemName() - --EMA:Print("test", azeriteName, azeriteXP, azeriteTotalXP ) - artifactName = azeriteName - artifactXP = azeriteXP - artifactForNextPoint = azeriteTotalXP - artifactPointsAvailable = 0 - artifactPointsSpent = 0 - end if EMA.db.showTeamListOnMasterOnly == true then --EMA:Print("Testtoteam", characterName, name, xp, xpForNextPoint, numPointsAvailableToSpend) --EMA:Print("TestTOTEAM", characterName, name, xp, xpForNextPoint, numPointsAvailableToSpend) - EMA:EMASendCommandToMaster( EMA.COMMAND_EXPERIENCE_STATUS_UPDATE, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, artifactName, artifactXP, artifactPointsSpent, artifactForNextPoint, artifactPointsAvailable )--, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID ) + EMA:EMASendCommandToMaster( EMA.COMMAND_EXPERIENCE_STATUS_UPDATE, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, currentGold )--, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID ) else --EMA:DebugMessage( "SendExperienceStatusUpdateCommand TO TEAM!" ) --EMA:Print("TestTOTEAM", characterName, name, xp, xpForNextPoint, numPointsAvailableToSpend) - EMA:EMASendCommandToTeam( EMA.COMMAND_EXPERIENCE_STATUS_UPDATE, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, artifactName, artifactXP, artifactPointsSpent, artifactForNextPoint, artifactPointsAvailable ) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID) + EMA:EMASendCommandToTeam( EMA.COMMAND_EXPERIENCE_STATUS_UPDATE, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, currentGold ) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID) end end end -function EMA:ProcessUpdateExperienceStatusMessage( characterName, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, artifactName, artifactXP, artifactForNextPoint, artifactPointsSpent, artifactPointsAvailable ) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID) - EMA:UpdateExperienceStatus( characterName, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, artifactName, artifactXP, artifactForNextPoint, artifactPointsSpent, artifactPointsAvailable ) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID ) +function EMA:ProcessUpdateExperienceStatusMessage( characterName, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, currentGold ) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID) + EMA:UpdateExperienceStatus( characterName, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, currentGold ) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID ) end function EMA:SettingsUpdateExperienceAll() for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do - EMA:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil) --, nil, nil, nil, nil, nil ) + EMA:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil) --, nil, nil, nil) --, nil, nil, nil, nil, nil ) end end -function EMA:UpdateExperienceStatus( characterName, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, artifactName, artifactXP, artifactPointsSpent, artifactForNextPoint, artifactPointsAvailable) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID ) +function EMA:UpdateExperienceStatus( characterName, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, currentGold ) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID ) -- EMA:Print( "UpdateExperienceStatus", characterName, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel) --- EMA:Print("ArtTest", characterName, "name", artifactName, "xp", artifactXP, "Points", artifactForNextPoint, artifactPointsAvailable) +-- EMA:Print("GoldTest", characterName, "gold", currentGold) if CanDisplayTeamList() == false then return end @@ -2570,12 +2571,12 @@ function EMA:UpdateExperienceStatus( characterName, playerExperience, playerMaxE local experienceBarText = characterStatusBar["experienceBarText"] local experienceBar = characterStatusBar["experienceBar"] - local experienceArtBarText = characterStatusBar["experienceArtBarText"] - if characterStatusBar["experienceArtBarText"] == nil then + local experienceGoldBarText = characterStatusBar["experienceGoldBarText"] + if characterStatusBar["experienceGoldBarText"] == nil then return end - local experienceArtBar = characterStatusBar["experienceArtBar"] - if characterStatusBar["experienceArtBar"] == nil then + local experienceGoldBar = characterStatusBar["experienceGoldBar"] + if characterStatusBar["experienceGoldBar"] == nil then return end if playerExperience == nil then @@ -2590,37 +2591,22 @@ function EMA:UpdateExperienceStatus( characterName, playerExperience, playerMaxE if playerLevel == nil then playerLevel = experienceBarText.playerLevel end - if artifactName == nil then - artifactName = experienceArtBarText.artifactName - end - - if artifactXP == nil then - artifactXP = experienceArtBarText.artifactXP - end - if artifactPointsSpent == nil then - artifactPointsSpent = experienceArtBarText.artifactPointsSpent - end - if artifactForNextPoint == nil then - artifactForNextPoint = experienceArtBarText.artifactForNextPoint + --EMA:Print("test", currentGold, "v", experienceGoldBarText.currentGold) + if currentGold == nil then + currentGold = experienceGoldBarText.currentGold end - if artifactPointsAvailable == nil then - artifactPointsAvailable = experienceArtBarText.artifactPointsAvailable - end - experienceBarText.playerExperience = playerExperience experienceBarText.playerMaxExperience = playerMaxExperience experienceBarText.exhaustionStateID = exhaustionStateID experienceBarText.playerLevel = playerLevel - experienceArtBarText.artifactName = artifactName - experienceArtBarText.artifactXP = artifactXP - experienceArtBarText.artifactPointsSpent = artifactPointsSpent - experienceArtBarText.artifactForNextPoint = artifactForNextPoint - experienceArtBarText.artifactPointsAvailable = artifactPointsAvailable + experienceGoldBarText.currentGold = currentGold + local min, max = math.min(0, playerExperience), playerMaxExperience experienceBar:SetAnimatedValues(playerExperience, min, max , playerLevel) - experienceArtBar:SetAnimatedValues(artifactXP, 0, artifactForNextPoint, artifactPointsAvailable + artifactPointsSpent) + + experienceGoldBar:SetValue( currentGold, currentGold ) local text = "" if EMA.db.experienceStatusShowValues == true then @@ -2632,6 +2618,9 @@ function EMA:UpdateExperienceStatus( characterName, playerExperience, playerMaxE else text = tostring( floor( (playerExperience/playerMaxExperience)*100) )..L["%"] end + if EMA.db.showLevel then + text = "Lv " ..tostring( playerLevel ) .. " | ".. text + end end experienceBarText:SetText( text ) if exhaustionStateID == 1 then @@ -2642,26 +2631,19 @@ function EMA:UpdateExperienceStatus( characterName, playerExperience, playerMaxE experienceBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 ) end ---ArtText - local artText = "" - --EMA:Print("TextTest", artifactXP, artifactForNextPoint) +-- Gold Text + local goldText = "" + --EMA:Print("TextTest", currentGold) if EMA.db.experienceStatusShowValues == true and EMA.db.experienceStatusShowPercentage == false then - artText = artText..tostring( AbbreviateLargeNumbers(artifactXP ) )..L[" / "]..tostring( AbbreviateLargeNumbers(artifactForNextPoint) )..L[" "] + goldText = goldText..tostring( EMAUtilities:FormatMoneyString(currentGold ) ) end if EMA.db.experienceStatusShowPercentage == true then - if EMA.db.experienceStatusShowValues == true then - artText = artText..L["("]..tostring( AbbreviateLargeNumbers(artifactXP ) )..L[" "]..tostring( floor( (artifactXP/artifactForNextPoint)*100) )..L["%"]..L[")"] - else - artText = artText..L["("]..tostring( floor( (artifactXP/artifactForNextPoint)*100) )..L["%"]..L[")"] - end + goldText = goldText..tostring( EMAUtilities:FormatMoneyString(currentGold ) ) end - if artifactPointsAvailable > 0 then - artText = artText..L[" "].."[+ "..artifactPointsAvailable.."]" - end - --EMA:Print("arttest", artText) - experienceArtBarText:SetText( artText ) - experienceArtBar:SetStatusBarColor( 0.901, 0.8, 0.601, 1.0 ) - experienceArtBar.backgroundTexture:SetColorTexture( 0.901, 0.8, 0.601, 0.20 ) + --EMA:Print("arttest", goldText) + experienceGoldBarText:SetText( goldText ) + experienceGoldBar:SetStatusBarColor( 0.80,0.60,0.00, 0 ) + experienceGoldBar.backgroundTexture:SetColorTexture( 0.80, 0.60, 0.00, 0.20 ) end @@ -2807,7 +2789,12 @@ function EMA:SendHealthStatusUpdateCommand(unit) --EMA:Print("itsme", unit) local playerHealth = UnitHealth( unit ) local playerMaxHealth = UnitHealthMax( unit ) - local inComingHeal = UnitGetIncomingHeals( unit ) + -- TODO FIX ME! probs need to add libincoming heal. + if EMAPrivate.Core.isEmaClassicBccBuild() == false or EMAPrivate.Core.isEmaClassicBuild() == false then + local inComingHeal = UnitGetIncomingHeals( unit ) + else + local inComingHeal = 0 + end local _, class = UnitClass ("player") if EMA.db.showTeamListOnMasterOnly == true then @@ -2821,7 +2808,12 @@ function EMA:SendHealthStatusUpdateCommand(unit) else local playerHealth = UnitHealth( unit ) local playerMaxHealth = UnitHealthMax( unit ) - local inComingHeal = UnitGetIncomingHeals( unit ) + if EMAPrivate.Core.isEmaClassicBccBuild() == false or EMAPrivate.Core.isEmaClassicBuild() == false then + local inComingHeal = UnitGetIncomingHeals( unit ) + else + local inComingHeal = 0 + end + local characterName, characterRealm = UnitName( unit ) local _, class = UnitClass ( unit ) local character = EMAUtilities:AddRealmToNameIfNotNil( characterName, characterRealm ) @@ -3330,21 +3322,23 @@ function EMA:OnEnable() EMA:RegisterEvent( "PLAYER_LEVEL_UP" ) EMA:RegisterEvent( "UNIT_HEALTH" ) EMA:RegisterEvent( "UNIT_MAXHEALTH" ) - EMA:RegisterEvent( "UNIT_HEAL_PREDICTION" ) EMA:RegisterEvent( "UNIT_POWER_UPDATE", "UNIT_POWER" ) EMA:RegisterEvent( "UNIT_MAXPOWER", "UNIT_POWER" ) EMA:RegisterEvent( "UNIT_DISPLAYPOWER" ) EMA:RegisterEvent( "CHAT_MSG_COMBAT_FACTION_CHANGE" ) EMA:RegisterEvent( "UNIT_POWER_FREQUENT") - EMA:RegisterEvent( "RUNE_POWER_UPDATE" ) - EMA:RegisterEvent( "PLAYER_TALENT_UPDATE") EMA:RegisterEvent( "GROUP_ROSTER_UPDATE" ) - EMA:RegisterEvent( "ARTIFACT_XP_UPDATE" ) + EMA:RegisterEvent( "PLAYER_MONEY" ) EMA:RegisterEvent("UNIT_PORTRAIT_UPDATE") EMA:RegisterEvent("UNIT_SPELLCAST_START") EMA:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED") EMA:RegisterEvent("UNIT_SPELLCAST_STOP") EMA:RegisterEvent("UNIT_SPELLCAST_CHANNEL_STOP") + if EMAPrivate.Core.isEmaClassicBccBuild() == false then + EMA:RegisterEvent( "UNIT_HEAL_PREDICTION" ) + EMA:RegisterEvent( "PLAYER_TALENT_UPDATE") + EMA:RegisterEvent( "RUNE_POWER_UPDATE" ) + end EMA.SharedMedia.RegisterCallback( EMA, "LibSharedMedia_Registered" ) EMA.SharedMedia.RegisterCallback( EMA, "LibSharedMedia_SetGlobal" ) EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_CHARACTER_ADDED, "OnCharactersChanged" ) diff --git a/Modules/Follow.lua b/Modules/Follow.lua index 1ebe81f..33da86b 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -36,12 +36,12 @@ EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\FollowIcon.tga" EMA.moduleOrder = 20 -- EMA key bindings. - -BINDING_HEADER_F0LLOW = L["FOLLOW_BINDING_HEADER"] +BINDING_HEADER_FOLLOW = L["FOLLOW_BINDING_HEADER"] BINDING_NAME_FOLLOWME = L["FOLLOW_ME"] BINDING_NAME_FOLLOWSTROBEME = L["FOLLOW_STROBE_ME"] BINDING_NAME_FOLLOWSTROBEOFF = L["FOLLOW_STROBE_OFF"] BINDING_NAME_FOLLOWTEAIN = L["FOLLOW_TRAIN"] +BINDING_NAME_FOLLOWSTOP = L["FOLLOW_STOP"] -- Settings - the values to store and their defaults for the settings database. EMA.settings = { @@ -60,13 +60,13 @@ EMA.settings = { strobePauseInCombat = false, strobePauseIfDrinking = false, strobePauseIfInVehicle = false, + strobePauseIfDead = false, strobePauseTag = EMAApi.AllTag(), warningArea = EMAApi.DefaultWarningArea(), followMaster = "", useFollowMaster = false, overrideStrobeTargetWithMaster = false, onlyWarnIfOutOfFollowRange = false, - }, } @@ -173,7 +173,15 @@ function EMA:GetConfiguration() usage = "/ema-follow snw", get = false, set = "SuppressNextFollowWarningCommand", - }, + }, + stop = { + type = "input", + name = L["FOLLOW_STOP"], + desc = L["FOLLOW_STOP_HELP"], + usage = "/ema-follow stop ", + get = false, + set = "CommandFollowStop", + }, }, } return configuration @@ -194,6 +202,7 @@ EMA.COMMAND_FOLLOW_STROBE_OFF = "FollowStrobeOff" EMA.COMMAND_SET_FOLLOW_MASTER = "FollowMaster" EMA.COMMAND_FOLLOW_TRAIN = "FollowTrain" EMA.COMMAND_FOLLOW_ME = "FollowMe" +EMA.COMMAND_FOLLOW_STOP = "FollowStop" ------------------------------------------------------------------------------------------------------------- -- Messages module sends. @@ -419,13 +428,23 @@ local function SettingsCreateDisplayOptions( top ) EMA.SettingsTogglePauseDrinking ) movingTop = movingTop - checkBoxHeight - EMA.settingsControl.checkBoxPauseIfInVehicle = EMAHelperSettings:CreateCheckBox( + if EMAPrivate.Core.isEmaClassicBccBuild() == false then + EMA.settingsControl.checkBoxPauseIfInVehicle = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + halfWidth, + left, + movingTop, + L["IN_A_VEHICLE"], + EMA.SettingsTogglePauseIfInVehicle + ) + end + EMA.settingsControl.checkBoxPauseIfDead = EMAHelperSettings:CreateCheckBox( EMA.settingsControl, halfWidth, - left, + column2left, movingTop, - L["IN_A_VEHICLE"], - EMA.SettingsTogglePauseIfInVehicle + L["PLAYER_DEAD"], + EMA.SettingsTogglePauseIfDead ) movingTop = movingTop - checkBoxHeight EMA.settingsControl.editBoxFollowStrobePauseTag = EMAHelperSettings:CreateEditBox( EMA.settingsControl, @@ -502,7 +521,10 @@ function EMA:SettingsRefresh() EMA.settingsControl.checkBoxOverrideStrobeTargetWithMaster:SetValue( EMA.db.overrideStrobeTargetWithMaster ) EMA.settingsControl.checkBoxPauseInCombat:SetValue( EMA.db.strobePauseInCombat ) EMA.settingsControl.checkBoxPauseDrinking:SetValue( EMA.db.strobePauseIfDrinking ) - EMA.settingsControl.checkBoxPauseIfInVehicle:SetValue( EMA.db.strobePauseIfInVehicle ) + if EMAPrivate.Core.isEmaClassicBccBuild() == false then + EMA.settingsControl.checkBoxPauseIfInVehicle:SetValue( EMA.db.strobePauseIfInVehicle ) + end + EMA.settingsControl.checkBoxPauseIfDead:SetValue( EMA.db.strobePauseIfDead ) EMA.settingsControl.editBoxFollowStrobePauseTag:SetText( EMA.db.strobePauseTag ) EMA.settingsControl.editBoxFollowStrobeDelaySeconds:SetText( EMA.db.strobeFrequencySeconds ) EMA.settingsControl.editBoxFollowStrobeDelaySecondsInCombat:SetText( EMA.db.strobeFrequencySecondsInCombat ) @@ -602,6 +624,11 @@ function EMA:SettingsTogglePauseIfInVehicle( event, checked ) EMA:SettingsRefresh() end +function EMA:SettingsTogglePauseIfDead( event, checked ) + EMA.db.strobePauseIfDead = checked + EMA:SettingsRefresh() +end + function EMA:EditBoxChangedFollowStrobePauseTag( event, text ) EMA.db.strobePauseTag = text EMA:SettingsRefresh() @@ -638,32 +665,39 @@ function EMA:UPDATE_BINDINGS() ClearOverrideBindings( EMA.keyBindingFrame ) local key1, key2 = GetBindingKey( "FOLLOWME" ) if key1 then - SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowSecureButtonFollowMe" ) + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowMe" ) end if key2 then - SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowSecureButtonFollowMe" ) + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowMe" ) end local key1, key2 = GetBindingKey( "FOLLOWSTROBEME" ) if key1 then - SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowSecureButtonFollowStrobeMe" ) + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowStrobeMe" ) end if key2 then - SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowSecureButtonFollowStrobeMe" ) + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowStrobeMe" ) end local key1, key2 = GetBindingKey( "FOLLOWSTROBEOFF" ) if key1 then - SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowSecureButtonFollowStrobeOff" ) + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowStrobeOff" ) end if key2 then - SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowSecureButtonFollowStrobeOff" ) + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowStrobeOff" ) end local key1, key2 = GetBindingKey( "FOLLOWTEAIN" ) if key1 then - SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowSecureButtonFollowTrain" ) + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowTrain" ) end if key2 then - SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowSecureButtonFollowTrain" ) + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowTrain" ) end + local key1, key2 = GetBindingKey( "FOLLOWSTOP" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowStop" ) + end + if key2 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowStop" ) + end end ------------------------------------------------------------------------------------------------------------- @@ -701,22 +735,26 @@ function EMA:OnInitialize() -- Character on taxi flag. EMA.characterIsOnTaxi = false -- Key bindings. - EMAFollowSecureButtonFollowMe = CreateFrame( "CheckButton", "EMAFollowSecureButtonFollowMe", nil, "SecureActionButtonTemplate" ) - EMAFollowSecureButtonFollowMe:SetAttribute( "type", "macro" ) - EMAFollowSecureButtonFollowMe:SetAttribute( "macrotext", "/ema-follow me all" ) - EMAFollowSecureButtonFollowMe:Hide() - EMAFollowSecureButtonStrobeMe = CreateFrame( "CheckButton", "EMAFollowSecureButtonFollowStrobeMe", nil, "SecureActionButtonTemplate" ) - EMAFollowSecureButtonStrobeMe:SetAttribute( "type", "macro" ) - EMAFollowSecureButtonStrobeMe:SetAttribute( "macrotext", "/ema-follow strobeonme all" ) - EMAFollowSecureButtonStrobeMe:Hide() - EMAFollowSecureButtonFollowStrobeOff = CreateFrame( "CheckButton", "EMAFollowSecureButtonFollowStrobeOff", nil, "SecureActionButtonTemplate" ) - EMAFollowSecureButtonFollowStrobeOff:SetAttribute( "type", "macro" ) - EMAFollowSecureButtonFollowStrobeOff:SetAttribute( "macrotext", "/ema-follow strobeoff all" ) - EMAFollowSecureButtonFollowStrobeOff:Hide() - EMAFollowSecureButtonFollowTrain = CreateFrame( "CheckButton", "EMAFollowSecureButtonFollowTrain", nil, "SecureActionButtonTemplate" ) - EMAFollowSecureButtonFollowTrain:SetAttribute( "type", "macro" ) - EMAFollowSecureButtonFollowTrain:SetAttribute( "macrotext", "/ema-follow train all" ) - EMAFollowSecureButtonFollowTrain:Hide() + EMAFollowMe = CreateFrame( "CheckButton", "EMAFollowMe", nil, "SecureActionButtonTemplate" ) + EMAFollowMe:SetAttribute( "type", "macro" ) + EMAFollowMe:SetAttribute( "macrotext", "/ema-follow me all" ) + EMAFollowMe:Hide() + EMAFollowStrobeMe = CreateFrame( "CheckButton", "EMAFollowStrobeMe", nil, "SecureActionButtonTemplate" ) + EMAFollowStrobeMe:SetAttribute( "type", "macro" ) + EMAFollowStrobeMe:SetAttribute( "macrotext", "/ema-follow strobeonme all" ) + EMAFollowStrobeMe:Hide() + EMAFollowStrobeOff = CreateFrame( "CheckButton", "EMAFollowStrobeOff", nil, "SecureActionButtonTemplate" ) + EMAFollowStrobeOff:SetAttribute( "type", "macro" ) + EMAFollowStrobeOff:SetAttribute( "macrotext", "/ema-follow strobeoff all" ) + EMAFollowStrobeOff:Hide() + EMAFollowTrain = CreateFrame( "CheckButton", "EMAFollowTrain", nil, "SecureActionButtonTemplate" ) + EMAFollowTrain:SetAttribute( "type", "macro" ) + EMAFollowTrain:SetAttribute( "macrotext", "/ema-follow train all" ) + EMAFollowTrain:Hide() + EMAFollowStop = CreateFrame( "CheckButton", "EMAFollowStop", nil, "SecureActionButtonTemplate" ) + EMAFollowStop:SetAttribute( "type", "macro" ) + EMAFollowStop:SetAttribute( "macrotext", "/ema-follow stop all" ) + EMAFollowStop:Hide() end -- Called when the addon is enabled. @@ -727,9 +765,11 @@ function EMA:OnEnable() EMA:RegisterEvent( "PLAYER_REGEN_DISABLED" ) EMA:RegisterEvent( "PLAYER_REGEN_ENABLED" ) EMA:RegisterEvent( "PLAYER_CONTROL_GAINED" ) - EMA:RegisterEvent( "UNIT_ENTERING_VEHICLE" ) - EMA:RegisterEvent( "UNIT_EXITING_VEHICLE" ) - EMA:RegisterEvent( "UI_ERROR_MESSAGE", "PVP_FOLLOW" ) + if EMAPrivate.Core.isEmaClassicBccBuild() == false then + EMA:RegisterEvent( "UNIT_ENTERING_VEHICLE" ) + EMA:RegisterEvent( "UNIT_EXITING_VEHICLE" ) + EMA:RegisterEvent( "UI_ERROR_MESSAGE", "PVP_FOLLOW" ) + end -- Initialise key bindings. EMA.keyBindingFrame = CreateFrame( "Frame", nil, UIParent ) EMA:RegisterEvent( "UPDATE_BINDINGS" ) @@ -763,6 +803,7 @@ function EMA:EMAOnSettingsReceived( characterName, settings ) EMA.db.warnFollowPvP = settings.warnFollowPvP EMA.db.strobePauseInCombat = settings.strobePauseInCombat EMA.db.strobePauseIfInVehicle = settings.strobePauseIfInVehicle + EMA.db.strobePauseIfDead = settings.strobePauseIfDead EMA.db.strobePauseIfDrinking = settings.strobePauseIfDrinking EMA.db.strobePauseTag = settings.strobePauseTag EMA.db.doNotWarnFollowStrobing = settings.doNotWarnFollowStrobing @@ -857,6 +898,7 @@ end function EMA:SuppressNextFollowWarning() -- Events are fired as follows for a /follow command. + --EMA:Print("testfollow", EMA.isFollowing) if EMA.isFollowing == true then EMA:SetNoFollowBrokenWarningNextBreak() EMA:SetNoFollowBrokenWarningNextSecondBreak() @@ -904,19 +946,21 @@ function EMA:AutoFollowEndSend() end -- Do not warn if on Taxi if UnitOnTaxi("player") == true then - --EMA:Print("taxi") - canWarn = false + --EMA:Print("taxi") + canWarn = false end --Do not warn if in combat? if EMA.db.doNotWarnFollowBreakInCombat == true and EMA.outOfCombat == false then --EMA:Print("Do Not warn in comabt") canWarn = false end - --Do not warn if a passenger in a vehicle. - if UnitInVehicle("Player") == true and UnitControllingVehicle("player") == false then - --EMA:Print("UnitInVehicle") - canWarn = false - end + --Do not warn if a passenger in a vehicle. -- not in classic or bc + if EMAPrivate.Core.isEmaClassicBccBuild() == false then + if UnitInVehicle("Player") == true and UnitControllingVehicle("player") == false then + --EMA:Print("UnitInVehicle") + canWarn = false + end + end -- Do not warn if any other members in combat? if EMA.db.doNotWarnFollowBreakMembersInCombat == true and EMA:AreTeamMembersInCombat() == true or UnitAffectingCombat("player") == true then --EMA:Print("doNotWarnFollowBreakMembersInCombat") @@ -936,6 +980,11 @@ function EMA:AutoFollowEndSend() canWarn = false end end + if EMA.EMAExternalNoWarnNextBreak == true then + --EMA:Print("test", EMA.EMAExternalNoWarnNextBreak ) + canWarn = false + EMA.EMAExternalNoWarnNextBreak = false + end -- If allowed to warn, then warn. if canWarn == true then EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.followBrokenMessage, false ) @@ -990,7 +1039,7 @@ end function EMA:PVP_FOLLOW(event, arg1, message, ... ) --EMA:Print("test", message, EMA.warnFollowPvPCombat ) - if EMA.db.warnFollowPvP == false and EMA.db.warnWhenFollowBreaks == false then + if EMA.db.warnFollowPvP == false and EMA.db.warnWhenFollowBreaks == false and EMAPrivate.Core.isEmaClassicBccBuild() == true then return end if message == ERR_INVALID_FOLLOW_TARGET_PVP_COMBAT or message == ERR_INVALID_FOLLOW_PVP_COMBAT then @@ -1107,13 +1156,15 @@ end function EMA:CommandFollowMe( info, parameters ) local tag = parameters if tag ~= nil and tag:trim() ~= "" then + EMA.SuppressNextFollowWarning() EMA:EMASendCommandToTeam( EMA.COMMAND_FOLLOW_ME, tag ) end end function EMA:ReceiveCommandFollowMe( characterName, tag ) - --EMA:Print("testfollowme", characterName, tag ) - if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) then + --EMA:Print("testfollowme", characterName, tag ) + if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) and characterName ~= EMA.characterName then + --EMA:Print("works") FollowUnit( Ambiguate( characterName, "none" ), true ) end end @@ -1278,6 +1329,12 @@ function EMA:FollowTarget( target ) end end end + if EMA.followingStrobing == true and EMA.db.strobePauseIfDead == true then + local isDeadOrGhost = UnitIsDeadOrGhost("player") + if isDeadOrGhost == true then + canFollowTarget = false + end + end -- If follow strobing and strobing paused. if EMA.followingStrobing == true and EMA.followingStrobingPaused == true then -- Follow strobing is paused, do not follow target. @@ -1342,6 +1399,20 @@ function EMA:FollowStrobingPause( pause ) end end +function EMA:CommandFollowStop( info, parameters ) + local tag = parameters + if tag ~= nil and tag:trim() ~= "" then + EMA:EMASendCommandToTeam( EMA.COMMAND_FOLLOW_STOP, tag ) + end +end + +function EMA:ReceiveCommandFollowStop( characterName, tag ) + --EMA:Print("testfollowStop", characterName, tag ) + if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) and characterName ~= EMA.characterName then + FollowUnit( "player" ) + end +end + -- A EMA command has been recieved. function EMA:EMAOnCommandReceived( characterName, commandName, ... ) if commandName == EMA.COMMAND_FOLLOW_TARGET then @@ -1365,6 +1436,9 @@ function EMA:EMAOnCommandReceived( characterName, commandName, ... ) if commandName == EMA.COMMAND_FOLLOW_ME then EMA:ReceiveCommandFollowMe( characterName, ... ) end + if commandName == EMA.COMMAND_FOLLOW_STOP then + EMA:ReceiveCommandFollowStop( characterName, ... ) + end end EMAApi.Follow = {} diff --git a/Modules/Guild.lua b/Modules/Guild.lua index d3034af..a58792e 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -10,6 +10,10 @@ -- -- -- ================================================================================ -- +-- Olny Load on Live/Tbc! +if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + return +end -- Create the addon using AceAddon-3.0 and embed some libraries. local EMA = LibStub( "AceAddon-3.0" ):NewAddon( @@ -817,10 +821,14 @@ end function EMA:GUILDBANKFRAME_OPENED() if EMA.db.showEMAGuildWindow == true then - EMA:AddAllToGuildBank() + if not IsShiftKeyDown() then + EMA:AddAllToGuildBank() + end end if EMA.db.adjustMoneyWithGuildBank == true then - AddGoldToGuildBank() + if not IsShiftKeyDown() then + AddGoldToGuildBank() + end end end diff --git a/Modules/ISBoxer.lua b/Modules/ISBoxer.lua deleted file mode 100644 index c8e0440..0000000 --- a/Modules/ISBoxer.lua +++ /dev/null @@ -1,534 +0,0 @@ --- ================================================================================ -- --- EMA - ( Ebony's MultiBoxing Assistant ) -- --- Current Author: Jennifer Cally (Ebony) -- --- -- --- License: All Rights Reserved 2018-2019 Jennifer Cally -- --- -- --- Some Code Used from "Jamba" that is -- --- Released under the MIT License -- --- "Jamba" Copyright 2008-2015 Michael "Jafula" Miller -- --- -- --- ================================================================================ -- --- Create the addon using AceAddon-3.0 and embed some libraries. - -local EMA = LibStub( "AceAddon-3.0" ):NewAddon( - "ISBoxer", - "Module-1.0", - "AceConsole-3.0", - "AceEvent-3.0", - "AceHook-3.0", - "AceTimer-3.0" -) - --- Get the EMA Utilities Library. -local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" ) -local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" ) -local ISBoxerAddon = IsAddOnLoaded("Isboxer" ) -local AceGUI = LibStub( "AceGUI-3.0" ) - --- Constants and Locale for this module. -EMA.moduleName = "ISBoxer" -EMA.settingsDatabaseName = "ISBoxerProfileDB" -EMA.chatCommand = "ema-isboxer" -local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" ) -EMA.parentDisplayName = L["TEAM"] -EMA.moduleDisplayName = L["ISBOXER"] --- Icon -EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\ISBoxerIcon.tga" --- order -EMA.moduleOrder = 30 - - --- Settings - the values to store and their defaults for the settings database. -EMA.settings = { - profile = { - messageArea = EMAApi.DefaultMessageArea(), - isboxerTeamList = {}, - isboxerTeamName = L["N/A"], - isboxerSync = false, - }, -} - --- Configuration. -function EMA:GetConfiguration() - local configuration = { - name = EMA.moduleDisplayName, - handler = EMA, - type = 'group', - childGroups = "tab", - get = "EMAConfigurationGetSetting", - set = "EMAConfigurationSetSetting", - args = { - config = { - type = "input", - name = L["OPEN_CONFIG"], - desc = L["OPEN_CONFIG_HELP"], - usage = "/ema-isboxer config", - get = false, - set = "", - }, - push = { - type = "input", - name = L["PUSH_SETTINGS"], - desc = L["PUSH_ALL_SETTINGS"], - usage = "/ema-isboxer push", - get = false, - set = "EMASendSettings", - guiHidden = true, - }, - iammaster = { - type = "input", - name = L["ISBOXER_SET_MASTER"], - desc = L["ISBOXER_COMMAND_LINE_HELP"], - usage = "/ema-isboxer iammaster ", - get = false, - set = "CommandIAmMasterIsboxer", - guiHidden = true, - }, - strobeOnMe = { - type = "input", - name = L["ISBOXER_SET_STROBEONME"], - desc = L["ISBOXER_COMMAND_LINE_HELP"], - usage = "/ema-isboxer strobeOnMe ", - get = false, - set = "FollowStrobeOnMeCommandIsboxer", - guiHidden = true, - }, - strobeoff = { - type = "input", - name = L["ISBOXER_SET_STROBEOFF"], - desc = L["ISBOXER_COMMAND_LINE_HELP"], - usage = "/ema-isboxer strobeoff ", - get = false, - set = "FollowStrobeOffCommandIsboxer", - guiHidden = true, - }, - snw = { - type = "input", - name = L["ISBOXER_SET_SNW"], - desc = L["ISBOXER_COMMAND_LINE_HELP"], - usage = "/ema-isboxer snw", - get = false, - set = "FollowStrobeOffCommandSnw", - guiHidden = true, - }, - }, - } - return configuration -end - -------------------------------------------------------------------------------------------------------------- --- CommandLines for this module sends. (cross "Jamba" Support) for isboxer -------------------------------------------------------------------------------------------------------------- - -function EMA:ChatCommandTeam(input) - if not input or input:trim() == "" then - return - else - LibStub( "AceConfigCmd-3.0" ):HandleCommand( EMA.chatCommand, EMA.moduleName, input ) - end -end - -function EMA:ChatCommandFollow(input) - --EMA:Print("test", input ) - if not input or input:trim() == "" then - return - else - LibStub( "AceConfigCmd-3.0" ):HandleCommand( EMA.chatCommand, EMA.moduleName, input ) - end -end - -function EMA:CommandIAmMasterIsboxer( info, parameters ) - EMAApi.CommandIAmMaster( parameters ) -end - -function EMA:FollowStrobeOnMeCommandIsboxer( info, parameters ) - EMAApi.Follow.StrobeOnMeCommand( parameters ) -end - -function EMA:FollowStrobeOffCommandIsboxer( info, parameters ) - EMAApi.Follow.StrobeOffCommand( parameters ) -end - -function EMA:FollowStrobeOffCommandSnw( info, parameters ) - -end - -------------------------------------------------------------------------------------------------------------- --- Messages module sends. -------------------------------------------------------------------------------------------------------------- - - -------------------------------------------------------------------------------------------------------------- --- Popup Dialogs. -------------------------------------------------------------------------------------------------------------- - -local function InitializePopupDialogs() - StaticPopupDialogs["EMAISBoxer_CONFIRM_REMOVE_ISBoxer_ITEMS"] = { - text = L["REMOVE_ISBOXER_LIST"], - button1 = YES, - button2 = NO, - timeout = 0, - whileDead = 1, - hideOnEscape = 1, - OnAccept = function() - EMA:RemoveItem() - end, - } -end - -------------------------------------------------------------------------------------------------------------- --- Addon initialization, enabling and disabling. -------------------------------------------------------------------------------------------------------------- - --- Initialise the module. -function EMA:OnInitialize() - -- Initialise the popup dialogs. - InitializePopupDialogs() - --EMA.autoISBoxerItemLink = L["N/A"] - EMA.isboxerTeamName = L["N/A"] - -- CommandLines for this module sends. (cross "Jamba" Support) for isboxer - EMA:RegisterChatCommand("jamba-team", "ChatCommandTeam") - EMA:RegisterChatCommand("jamba-follow", "ChatCommandFollow") - EMA.autoISBoxerItemTag = EMAApi.AllTag() - -- Create the settings control. - EMA:SettingsCreate() - -- Initialse the EMAModule part of this module. - EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame ) - -- Populate the settings. - EMA:SettingsRefresh() -end - --- Called when the addon is enabled. -function EMA:OnEnable() - EMA:RegisterEvent( "PLAYER_ENTERING_WORLD" ) - --EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" ) - --EMA:RegisterMessage( EMAApi.GROUP_LIST_CHANGED , "OnGroupAreasChanged" ) -end - --- Called when the addon is disabled. -function EMA:OnDisable() - -- AceHook-3.0 will tidy up the hooks for us. -end - -function EMA:SettingsCreate() - EMA.settingsControl = {} - -- Create the settings panel. - EMAHelperSettings:CreateSettings( - EMA.settingsControl, - EMA.moduleDisplayName, - EMA.parentDisplayName, - EMA.SettingsPushSettingsClick, - EMA.moduleIcon, - EMA.moduleOrder - ) - local bottomOfInfo = EMA:SettingsCreateISBoxer( EMAHelperSettings:TopOfSettings() ) - EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo ) - -- Help - local helpTable = {} - EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() ) -end - -function EMA:SettingsPushSettingsClick( event ) - EMA:EMASendSettings() -end - -function EMA:SettingsCreateISBoxer( top ) - local buttonControlWidth = 85 - local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight() - local labelHeight = EMAHelperSettings:GetLabelHeight() - local labelContinueHeight = EMAHelperSettings:GetContinueLabelHeight() - local editBoxHeight = EMAHelperSettings:GetEditBoxHeight() - local buttonHeight = EMAHelperSettings:GetButtonHeight() - local dropdownHeight = EMAHelperSettings:GetDropdownHeight() - local left = EMAHelperSettings:LeftOfSettings() - local headingHeight = EMAHelperSettings:HeadingHeight() - local headingWidth = EMAHelperSettings:HeadingWidth( false ) - local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing() - local verticalSpacing = EMAHelperSettings:GetVerticalSpacing() - local ISBoxerWidth = headingWidth - local dropBoxWidth = (headingWidth - horizontalSpacing) / 4 - local movingTop = top - -- A blank to get layout to show right? - EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false ) - movingTop = movingTop - headingHeight - EMAHelperSettings:CreateHeading( EMA.settingsControl, L["ISBOXER_LIST_HEADER"], movingTop, false ) - movingTop = movingTop - headingHeight - EMA.settingsControl.ISBoxerItemsHighlightRow = 1 - EMA.settingsControl.ISBoxerItemsOffset = 1 - local list = {} - list.listFrameName = "EMAISBoxerIteamsSettingsFrame" - list.parentFrame = EMA.settingsControl.widgetSettings.content - list.listTop = movingTop - list.listLeft = left - list.listWidth = ISBoxerWidth - list.rowHeight = 20 - list.rowsToDisplay = 10 - list.columnsToDisplay = 3 - list.columnInformation = {} - list.columnInformation[1] = {} - list.columnInformation[1].width = 10 - list.columnInformation[1].alignment = "LEFT" - list.columnInformation[2] = {} - list.columnInformation[2].width = 70 - list.columnInformation[2].alignment = "LEFT" - list.columnInformation[3] = {} - list.columnInformation[3].width = 20 - list.columnInformation[3].alignment = "LEFT" - list.scrollRefreshCallback = EMA.SettingsScrollRefresh - list.rowClickCallback = EMA.SettingsISBoxerItemsRowClick - EMA.settingsControl.ISBoxerItems = list - EMAHelperSettings:CreateScrollList( EMA.settingsControl.ISBoxerItems ) - movingTop = movingTop - list.listHeight - verticalSpacing - EMAHelperSettings:CreateHeading( EMA.settingsControl, L["ISBOXER_SYNC_HEADER"], movingTop, false ) - movingTop = movingTop - headingHeight - -- Information line 1. - EMA.settingsControl.labelSyncInformation1 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - left, - movingTop, - L["SYNCINFORMATIONONE"] - ) - movingTop = movingTop - labelContinueHeight - -- Information line 2. - EMA.settingsControl.labelSyncInformation2 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - left, - movingTop, - L["SYNCINFORMATIONTWO"] - ) - movingTop = movingTop - labelContinueHeight - -- Information line 3. - EMA.settingsControl.labelSyncInformation3 = EMAHelperSettings:CreateContinueLabel( - EMA.settingsControl, - headingWidth, - left, - movingTop, - L["SYNCINFORMATIONTHREE"] - ) - movingTop = movingTop - labelHeight - - EMA.settingsControl.checkBoxISBoxerSnyc = EMAHelperSettings:CreateCheckBox( - EMA.settingsControl, - headingWidth, - left, - movingTop, - L["CHECKBOX_ISBOXER_SYNC"], - EMA.SettingsToggleIsboxerSync, - L["CHECKBOX_ISBOXER_SYNC_HELP"] - ) - --[[ - movingTop = movingTop - checkBoxHeight - EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown( - EMA.settingsControl, - headingWidth, - left, - movingTop, - L["MESSAGE_AREA"] - ) - EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() ) - EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea ) - ]] - movingTop = movingTop - dropdownHeight - verticalSpacing - return movingTop -end - - -------------------------------------------------------------------------------------------------------------- --- Settings Callbacks. -------------------------------------------------------------------------------------------------------------- - -local function GetISBoxerTeamMaxPosition() - return #EMA.db.isboxerTeamList -end - -function EMA:GetISBoxerTeamAtPosition( position ) - return EMA.db.isboxerTeamList[position] -end - -local function GetCharacterNameAtOrderPosition( position ) - local characterNameAtPosition = "" - for characterPosition, characterName in pairs(EMA.db.isboxerTeamList) do - if characterPosition == position then - characterNameAtPosition = characterName - break - end - end - return characterNameAtPosition -end - -function EMA:SettingsScrollRefresh() - FauxScrollFrame_Update( - EMA.settingsControl.ISBoxerItems.listScrollFrame, - GetISBoxerTeamMaxPosition(), - EMA.settingsControl.ISBoxerItems.rowsToDisplay, - EMA.settingsControl.ISBoxerItems.rowHeight - ) - EMA.settingsControl.ISBoxerItemsOffset = FauxScrollFrame_GetOffset( EMA.settingsControl.ISBoxerItems.listScrollFrame ) - for iterateDisplayRows = 1, EMA.settingsControl.ISBoxerItems.rowsToDisplay do - -- Reset. - EMA.settingsControl.ISBoxerItems.rows[iterateDisplayRows].columns[1].textString:SetText( "" ) - EMA.settingsControl.ISBoxerItems.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - EMA.settingsControl.ISBoxerItems.rows[iterateDisplayRows].columns[2].textString:SetText( "" ) - EMA.settingsControl.ISBoxerItems.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - EMA.settingsControl.ISBoxerItems.rows[iterateDisplayRows].columns[3].textString:SetText( "" ) - EMA.settingsControl.ISBoxerItems.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - EMA.settingsControl.ISBoxerItems.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) - -- Get data. - local dataRowNumber = iterateDisplayRows + EMA.settingsControl.ISBoxerItemsOffset - if dataRowNumber <= GetISBoxerTeamMaxPosition() then - -- Put data information into columns. - local characterName = GetCharacterNameAtOrderPosition( dataRowNumber ) - local teamName = EMA.db.isboxerTeamName - EMA.settingsControl.ISBoxerItems.rows[iterateDisplayRows].columns[1].textString:SetText( dataRowNumber ) - EMA.settingsControl.ISBoxerItems.rows[iterateDisplayRows].columns[2].textString:SetText( characterName ) - EMA.settingsControl.ISBoxerItems.rows[iterateDisplayRows].columns[3].textString:SetText( teamName ) - -- Highlight the selected row. - --if dataRowNumber == EMA.settingsControl.ISBoxerItemsHighlightRow then - -- EMA.settingsControl.ISBoxerItems.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) - --end - end - end -end - -function EMA:SettingsISBoxerItemsRowClick( rowNumber, columnNumber ) - --[[ - if EMA.settingsControl.ISBoxerItemsOffset + rowNumber <= EMA:GetISBoxerItemsMaxPosition() then - EMA.settingsControl.ISBoxerItemsHighlightRow = EMA.settingsControl.ISBoxerItemsOffset + rowNumber - EMA:SettingsScrollRefresh() - end - ]] -end - ---[[ -function EMA:OnMessageAreasChanged( message ) - EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() ) -end - -function EMA:OnGroupAreasChanged( message ) - EMA.settingsControl.ISBoxerItemsEditBoxToonTag:SetList( EMAApi.GroupList() ) -end - -function EMA:SettingsSetMessageArea( event, value ) - EMA.db.messageArea = value - EMA:SettingsRefresh() -end -]] - -function EMA:SettingsToggleIsboxerSync( event, checked ) - EMA.db.isboxerSync = checked - EMA:SettingsRefresh() -end - --- Settings received. -function EMA:EMAOnSettingsReceived( characterName, settings ) - if characterName ~= EMA.characterName then - -- Update the settings. - EMA.db.isboxerSync = settings.isboxerSync - --EMA.db.messageArea = settings.messageArea - -- Refresh the settings. - EMA:SettingsRefresh() - -- Tell the player. - EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) ) - end -end - -function EMA:BeforeEMAProfileChanged() -end - -function EMA:OnEMAProfileChanged() - EMA:SettingsRefresh() -end - -function EMA:SettingsRefresh() - EMA.settingsControl.checkBoxISBoxerSnyc:SetValue ( EMA.db.isboxerSync ) - - --EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea ) - EMA:SettingsScrollRefresh() -end - ---Comms not sure if we going to use comms here. --- A EMA command has been received. -function EMA:EMAOnCommandReceived( characterName, commandName, ... ) - if characterName == self.characterName then - return - end -end - -------------------------------------------------------------------------------------------------------------- --- ISBoxer functionality. -------------------------------------------------------------------------------------------------------------- - -function EMA:PLAYER_ENTERING_WORLD(event, ... ) - EMA:ScheduleTimer( "IsboxerSyncTeamList", 0.5 ) - EMA:AddIsboxerMembers() -end - -function EMA:AddIsboxerMembers() - --table.wipe( EMA.db.isboxerTeamList ) - if IsAddOnLoaded("Isboxer" ) == true then - --EMA:Print("test") - --local _, teamName, members = isboxer.CharacterSet - for value, data in pairs( isboxer.CharacterSet ) do - --EMA:Print("test",value, "data", data ) - if value == "Members" then - --EMA:Print("testMembersList") - for isbSlot, characterName in pairs( data ) do - if EMA.db.isboxerTeamList[isbSlot] == nil then - EMA.db.isboxerTeamList[isbSlot] = characterName - end - end - else - --EMA:Print("testTeamListName", data ) - EMA.db.isboxerTeamName = data - end - end - end -end - -local function IsboxerTeamList() - return pairs( EMA.db.isboxerTeamList ) -end - -local function IsStillInTeam( characterName ) - local stillInTeam = false - for value, data in pairs( isboxer.CharacterSet ) do - --EMA:Print("test",value, "data", data ) - if value == "Members" then - --EMA:Print("testMembersList") - for b, isboxerCharacterName in pairs( data ) do - --EMA:Print("test", characterName, "vs", isboxerCharacterName ) - if isboxerCharacterName == characterName then - stillInTeam = true - break - end - end - end - end - return stillInTeam -end - -function EMA:IsboxerSyncTeamList() - if EMA.db.isboxerSync == true and IsAddOnLoaded("Isboxer" ) == true then - for isbSlot, isboxerCharacterName in pairs( EMA.db.isboxerTeamList ) do - --EMA:Print("test", isboxerCharacterName) - local characterName = EMAUtilities:AddRealmToNameIfMissing( isboxerCharacterName ) - if EMAApi.IsCharacterInTeam ( isboxerCharacterName ) == false and (characterName ~= EMA.characterName ) then - --EMA:Print("NOT IN TEAM", isboxerCharacterName) - EMAApi.AddMember( characterName ) - elseif IsStillInTeam( characterName ) == false and (characterName ~= EMA.characterName ) then - if EMAApi.IsCharacterInTeam ( characterName ) == true then - --EMA:Print("NoLongerInTeam", characterName, isbSlot ) - EMA.db.isboxerTeamList[isbSlot] = nil - EMAApi.RemoveMember( characterName ) - end - end - end - end - EMA:SettingsScrollRefresh() -end - -EMAApi.IsboxerTeamList = IsboxerTeamList -EMAApi.addisboxermembers = EMA.AddIsboxerMembers \ No newline at end of file diff --git a/Modules/Information-Classic.lua b/Modules/Information-Classic.lua new file mode 100644 index 0000000..da7dfcd --- /dev/null +++ b/Modules/Information-Classic.lua @@ -0,0 +1,1135 @@ +-- ================================================================================ -- +-- EMA - ( Ebony's MultiBoxing Assistant ) -- +-- Current Author: Jennifer Cally (Ebony) -- +-- -- +-- License: All Rights Reserved 2018-2020 Jennifer Cally -- +-- -- +-- Some Code Used from "Jamba" that is -- +-- Released under the MIT License -- +-- "Jamba" Copyright 2008-2015 Michael "Jafula" Miller -- +-- -- +-- ================================================================================ -- + +-- Only Load for Classic/TBC +if _G.WOW_PROJECT_ID == _G.WOW_PROJECT_MAINLINE then + return +end + +-- Create the addon using AceAddon-3.0 and embed some libraries. +local EMA = LibStub( "AceAddon-3.0" ):NewAddon( + "Information", + "Module-1.0", + "AceConsole-3.0", + "AceEvent-3.0", + "AceTimer-3.0" +) + +-- Get the EMA Utilities Library. +local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" ) +local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" ) +local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" ) +EMA.SharedMedia = LibStub( "LibSharedMedia-3.0" ) + +-- Constants and Locale for this module. +EMA.moduleName = "Information" +EMA.settingsDatabaseName = "InformationClassicProfileDB" +EMA.chatCommand = "ema-information" +local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" ) +EMA.parentDisplayName = L["DISPLAY"] +EMA.moduleDisplayName = L["CURRENCY"] +-- Icon +EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\SellIcon.tga" +-- order +EMA.moduleOrder = 3 + +EMA.globalCurrencyFramePrefix = "EMAToonCurrencyListFrame" +EMA.currTypes = {} +EMA.simpleCurrList = {} + +-------------------------------------- End of edit -------------------------------------------------------------- + + + +-- Settings - the values to store and their defaults for the settings database. +EMA.settings = { + profile = { + currGold = true, + bagSpace = true, + charDurr = true, + + currencyFrameAlpha = 1.0, + currencyFramePoint = "CENTER", + currencyFrameRelativePoint = "CENTER", + currencyFrameXOffset = 0, + currencyFrameYOffset = 0, + currencyFrameBackgroundColourR = 1.0, + currencyFrameBackgroundColourG = 1.0, + currencyFrameBackgroundColourB = 1.0, + currencyFrameBackgroundColourA = 1.0, + currencyFrameBorderColourR = 1.0, + currencyFrameBorderColourG = 1.0, + currencyFrameBorderColourB = 1.0, + currencyFrameBorderColourA = 1.0, + currencyBorderStyle = L["BLIZZARD_TOOLTIP"], + currencyBackgroundStyle = L["BLIZZARD_DIALOG_BACKGROUND"], + currencyFontStyle = L["ARIAL_NARROW"], + currencyFontSize = 12, + currencyScale = 1, + currencyNameWidth = 60, + currencyPointsWidth = 50, + currencyGoldWidth = 140, + currencySpacingWidth = 3, + currencyLockWindow = false, + currOpenStartUpMaster = false, + }, +} + +-- Configuration. +function EMA:GetConfiguration() + local configuration = { + name = EMA.moduleDisplayName, + handler = EMA, + type = 'group', + childGroups = "tab", + get = "EMAConfigurationGetSetting", + set = "EMAConfigurationSetSetting", + args = { + config = { + type = "input", + name = L["OPEN_CONFIG"], + desc = L["OPEN_CONFIG_HELP"], + usage = "/ema-information config", + get = false, + set = "", + }, + show = { + type = "input", + name = L["SHOW_CURRENCY"], + desc = L["SHOW_CURRENCY_HELP"], + usage = "ema-information show", + get = false, + set = "EMAToonRequestCurrency", + }, + hide = { + type = "input", + name = L["HIDE_CURRENCY"], + desc = L["HIDE_CURRENCY_HELP"], + usage = "ema-information hide", + get = false, + set = "EMAToonHideCurrency", + }, + push = { + type = "input", + name = L["PUSH_ALL_SETTINGS"], + desc = L["PUSH_SETTINGS_INFO"], + usage = "ema-information push", + get = false, + set = "EMASendSettings", + }, + }, + } + return configuration +end + +local function DebugMessage( ... ) + --EMA:Print( ... ) +end + +------------------------------------------------------------------------------------------------------------- +-- Command this module sends. +------------------------------------------------------------------------------------------------------------- + +EMA.COMMAND_REQUEST_CURRENCY = "SendCurrency" +EMA.COMMAND_HERE_IS_CURRENCY = "HereIsCurrency" + +------------------------------------------------------------------------------------------------------------- +-- Messages module sends. +------------------------------------------------------------------------------------------------------------- + +------------------------------------------------------------------------------------------------------------- +-- Variables used by module. +------------------------------------------------------------------------------------------------------------- + + +------------------------------------------------------------------------------------------------------------- +-- Settings Dialogs. +------------------------------------------------------------------------------------------------------------- + +local function SettingsCreate() + EMA.settingsControl = {} + -- Create the settings panel. + EMAHelperSettings:CreateSettings( + EMA.settingsControl, + EMA.moduleDisplayName, + EMA.parentDisplayName, + EMA.SettingsPushSettingsClick, + EMA.moduleIcon, + EMA.moduleOrder + ) + local bottomOfInfo = EMA:SettingsCreateCurrency( EMAHelperSettings:TopOfSettings() ) + EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo ) + -- Help + local helpTable = {} + EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() ) +end + + + + +function EMA:SettingsCreateCurrency( top ) + -- Get positions. + local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight() + local sliderHeight = EMAHelperSettings:GetSliderHeight() + local mediaHeight = EMAHelperSettings:GetMediaHeight() + local editBoxHeight = EMAHelperSettings:GetEditBoxHeight() + local buttonHeight = EMAHelperSettings:GetButtonHeight() + local dropdownHeight = EMAHelperSettings:GetDropdownHeight() + 10 + local labelHeight = EMAHelperSettings:GetLabelHeight() + local continueLabelHeight = 18 + local left = EMAHelperSettings:LeftOfSettings() + local headingHeight = EMAHelperSettings:HeadingHeight() + local headingWidth = EMAHelperSettings:HeadingWidth( true ) + local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing() + local indent = horizontalSpacing * 12 + local verticalSpacing = EMAHelperSettings:GetVerticalSpacing() + local halfWidth = (headingWidth - horizontalSpacing) / 2 + local thirdWidth = (headingWidth - (horizontalSpacing * 5)) / 5 + local halfWidthSlider = (headingWidth - horizontalSpacing) / 2 + local column2left = left + halfWidthSlider + local left2 = left + thirdWidth + local left3 = left + (thirdWidth * 1) + local right = left + halfWidth + horizontalSpacing + local movingTop = top + EMAHelperSettings:CreateHeading( EMA.settingsControl, L["CURRENCY_HEADER"], movingTop, false ) + movingTop = movingTop - headingHeight + EMA.settingsControl.checkBoxCurrencyGold = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["GOLD"], + EMA.SettingsToggleCurrencyGold, + L["GOLD_HELP"] + ) + movingTop = movingTop - checkBoxHeight + EMA.settingsControl.checkBoxCurrencyBagSpace = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["BAG_SPACE"], + EMA.SettingsToggleCurrencyBagSpace, + L["BAG_SPACE_HELP"] + ) + movingTop = movingTop - checkBoxHeight + EMA.settingsControl.checkBoxCurrencyCharDurr = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["DURR"], + EMA.SettingsToggleCurrencyCharDurr, + L["DURR_HELP"] + ) + movingTop = movingTop - checkBoxHeight + + -- Other Stuff + EMA.settingsControl.currencyButtonShowList = EMAHelperSettings:CreateButton( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["SHOW_CURRENCY"], + EMA.EMAToonRequestCurrency, + L["SHOW_CURRENCY_HELP"] + ) + movingTop = movingTop - buttonHeight + EMA.settingsControl.checkBoxCurrencyOpenStartUpMaster = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["CURR_STARTUP"], + EMA.SettingsToggleCurrencyOpenStartUpMaster, + L["CURR_STARTUP_HELP"] + ) + movingTop = movingTop - checkBoxHeight + -- Create appearance & layout. + EMAHelperSettings:CreateHeading( EMA.settingsControl, L["APPEARANCE_LAYOUT_HEALDER"], movingTop, true ) + movingTop = movingTop - headingHeight + EMA.settingsControl.checkBoxCurrencyLockWindow = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["LOCK_CURR_LIST"], + EMA.SettingsToggleCurrencyLockWindow, + L["LOCK_CURR_LIST_HELP"] + ) + movingTop = movingTop - checkBoxHeight + EMA.settingsControl.currencyScaleSlider = EMAHelperSettings:CreateSlider( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["SCALE"] + ) + EMA.settingsControl.currencyScaleSlider:SetSliderValues( 0.5, 2, 0.01 ) + EMA.settingsControl.currencyScaleSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeScale ) + movingTop = movingTop - sliderHeight - verticalSpacing + EMA.settingsControl.currencyTransparencySlider = EMAHelperSettings:CreateSlider( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["TRANSPARENCY"] + ) + EMA.settingsControl.currencyTransparencySlider:SetSliderValues( 0, 1, 0.01 ) + EMA.settingsControl.currencyTransparencySlider:SetCallback( "OnValueChanged", EMA.SettingsChangeTransparency ) + movingTop = movingTop - sliderHeight - verticalSpacing + EMA.settingsControl.currencyMediaBorder = EMAHelperSettings:CreateMediaBorder( + EMA.settingsControl, + halfWidthSlider, + left, + movingTop, + L["BORDER_STYLE"] + ) + EMA.settingsControl.currencyMediaBorder:SetCallback( "OnValueChanged", EMA.SettingsChangeBorderStyle ) + + EMA.settingsControl.currencyBorderColourPicker = EMAHelperSettings:CreateColourPicker( + EMA.settingsControl, + halfWidthSlider, + column2left + 15, + movingTop - 15, + L["BORDER COLOUR"] + ) + EMA.settingsControl.currencyBorderColourPicker:SetHasAlpha( true ) + EMA.settingsControl.currencyBorderColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsBorderColourPickerChanged ) + movingTop = movingTop - mediaHeight - verticalSpacing + EMA.settingsControl.currencyMediaBackground = EMAHelperSettings:CreateMediaBackground( + EMA.settingsControl, + halfWidthSlider, + left, + movingTop, + L["BACKGROUND"] + ) + EMA.settingsControl.currencyMediaBackground:SetCallback( "OnValueChanged", EMA.SettingsChangeBackgroundStyle ) + EMA.settingsControl.currencyBackgroundColourPicker = EMAHelperSettings:CreateColourPicker( + EMA.settingsControl, + halfWidthSlider, + column2left + 15, + movingTop - 15, + L["BG_COLOUR"] + ) + EMA.settingsControl.currencyBackgroundColourPicker:SetHasAlpha( true ) + EMA.settingsControl.currencyBackgroundColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsBackgroundColourPickerChanged ) + movingTop = movingTop - mediaHeight - verticalSpacing + --Font + EMA.settingsControl.currencyMediaFont = EMAHelperSettings:CreateMediaFont( + EMA.settingsControl, + halfWidthSlider, + left, + movingTop, + L["FONT"] + ) + EMA.settingsControl.currencyMediaFont:SetCallback( "OnValueChanged", EMA.SettingsChangeFontStyle ) + EMA.settingsControl.currencyFontSize = EMAHelperSettings:CreateSlider( + EMA.settingsControl, + halfWidthSlider, + column2left, + movingTop, + L["FONT_SIZE"] + ) + EMA.settingsControl.currencyFontSize:SetSliderValues( 8, 20 , 1 ) + EMA.settingsControl.currencyFontSize:SetCallback( "OnValueChanged", EMA.SettingsChangeFontSize ) + movingTop = movingTop - mediaHeight - verticalSpacing + EMA.settingsControl.currencySliderSpaceForName = EMAHelperSettings:CreateSlider( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["SPACE_FOR_NAME"] + ) + EMA.settingsControl.currencySliderSpaceForName:SetSliderValues( 20, 200, 1 ) + EMA.settingsControl.currencySliderSpaceForName:SetCallback( "OnValueChanged", EMA.SettingsChangeSliderSpaceForName ) + movingTop = movingTop - sliderHeight - verticalSpacing + EMA.settingsControl.currencySliderSpaceForGold = EMAHelperSettings:CreateSlider( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["SPACE_FOR_GOLD"] + ) + EMA.settingsControl.currencySliderSpaceForGold:SetSliderValues( 20, 200, 1 ) + EMA.settingsControl.currencySliderSpaceForGold:SetCallback( "OnValueChanged", EMA.SettingsChangeSliderSpaceForGold ) + movingTop = movingTop - sliderHeight - verticalSpacing + EMA.settingsControl.currencySliderSpaceForPoints = EMAHelperSettings:CreateSlider( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["SPACE_FOR_POINTS"] + ) + EMA.settingsControl.currencySliderSpaceForPoints:SetSliderValues( 20, 200, 1 ) + EMA.settingsControl.currencySliderSpaceForPoints:SetCallback( "OnValueChanged", EMA.SettingsChangeSliderSpaceForPoints ) + movingTop = movingTop - sliderHeight - verticalSpacing + EMA.settingsControl.currencySliderSpaceBetweenValues = EMAHelperSettings:CreateSlider( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["SPACE_BETWEEN_VALUES"] + ) + EMA.settingsControl.currencySliderSpaceBetweenValues:SetSliderValues( 0, 20, 1 ) + EMA.settingsControl.currencySliderSpaceBetweenValues:SetCallback( "OnValueChanged", EMA.SettingsChangeSliderSpaceBetweenValues ) + movingTop = movingTop - sliderHeight - verticalSpacing + return movingTop +end + + + +------------------------------------------------------------------------------------------------------------- +-- Settings Populate. +------------------------------------------------------------------------------------------------------------- + +function EMA:BeforeEMAProfileChanged() +end + +function EMA:OnEMAProfileChanged() + EMA:SettingsRefresh() +end + +function EMA:SettingsRefresh() + EMA.settingsControl.checkBoxCurrencyGold:SetValue( EMA.db.currGold ) + EMA.settingsControl.checkBoxCurrencyBagSpace:SetValue ( EMA.db.bagSpace ) + EMA.settingsControl.checkBoxCurrencyCharDurr:SetValue ( EMA.db.charDurr ) + + --state + EMA.settingsControl.checkBoxCurrencyOpenStartUpMaster:SetValue( EMA.db.currOpenStartUpMaster ) + EMA.settingsControl.currencyTransparencySlider:SetValue( EMA.db.currencyFrameAlpha ) + EMA.settingsControl.currencyScaleSlider:SetValue( EMA.db.currencyScale ) + EMA.settingsControl.currencyMediaBorder:SetValue( EMA.db.currencyBorderStyle ) + EMA.settingsControl.currencyMediaBackground:SetValue( EMA.db.currencyBackgroundStyle ) + EMA.settingsControl.currencyBackgroundColourPicker:SetColor( EMA.db.currencyFrameBackgroundColourR, EMA.db.currencyFrameBackgroundColourG, EMA.db.currencyFrameBackgroundColourB, EMA.db.currencyFrameBackgroundColourA ) + EMA.settingsControl.currencyBorderColourPicker:SetColor( EMA.db.currencyFrameBorderColourR, EMA.db.currencyFrameBorderColourG, EMA.db.currencyFrameBorderColourB, EMA.db.currencyFrameBorderColourA ) + EMA.settingsControl.currencyMediaFont:SetValue( EMA.db.currencyFontStyle ) + EMA.settingsControl.currencyFontSize:SetValue( EMA.db.currencyFontSize ) + EMA.settingsControl.currencySliderSpaceForName:SetValue( EMA.db.currencyNameWidth ) + EMA.settingsControl.currencySliderSpaceForGold:SetValue( EMA.db.currencyGoldWidth ) + EMA.settingsControl.currencySliderSpaceForPoints:SetValue( EMA.db.currencyPointsWidth ) + EMA.settingsControl.currencySliderSpaceBetweenValues:SetValue( EMA.db.currencySpacingWidth ) + EMA.settingsControl.checkBoxCurrencyLockWindow:SetValue( EMA.db.currencyLockWindow ) + if EMA.currencyListFrameCreated == true then + EMA:CurrencyListSetColumnWidth() + EMA:SettingsUpdateBorderStyle() + EMA:SettingsUpdateFontStyle() + EMA:CurrencyUpdateWindowLock() + EMAToonCurrencyListFrame:SetScale( EMA.db.currencyScale ) +---???? EMA:UpdateHendingText() + EMA:CurrencyListSetHeight() + end +end + +function EMA:SettingsPushSettingsClick( event ) + EMA:EMASendSettings() +end + +function EMA:SettingsToggleCurrencyGold( event, checked ) + EMA.db.currGold = checked + EMA:SettingsRefresh() +end + +function EMA:SettingsToggleCurrencyBagSpace( event, checked ) + EMA.db.bagSpace = checked + EMA:SettingsRefresh() +end + +function EMA:SettingsToggleCurrencyCharDurr( event, checked ) + EMA.db.charDurr = checked + EMA:SettingsRefresh() +end + +function EMA:SettingsToggleCurrencyOpenStartUpMaster( event, checked ) + EMA.db.currOpenStartUpMaster = checked + EMA:SettingsRefresh() +end + +function EMA:SettingsChangeScale( event, value ) + EMA.db.currencyScale = tonumber( value ) + EMA:SettingsRefresh() +end + +function EMA:SettingsChangeTransparency( event, value ) + EMA.db.currencyFrameAlpha = tonumber( value ) + EMA:SettingsRefresh() +end + +function EMA:SettingsChangeBorderStyle( event, value ) + EMA.db.currencyBorderStyle = value + EMA:SettingsRefresh() +end + +function EMA:SettingsChangeBackgroundStyle( event, value ) + EMA.db.currencyBackgroundStyle = value + EMA:SettingsRefresh() +end + +function EMA:SettingsBackgroundColourPickerChanged( event, r, g, b, a ) + EMA.db.currencyFrameBackgroundColourR = r + EMA.db.currencyFrameBackgroundColourG = g + EMA.db.currencyFrameBackgroundColourB = b + EMA.db.currencyFrameBackgroundColourA = a + EMA:SettingsRefresh() +end + +function EMA:SettingsBorderColourPickerChanged( event, r, g, b, a ) + EMA.db.currencyFrameBorderColourR = r + EMA.db.currencyFrameBorderColourG = g + EMA.db.currencyFrameBorderColourB = b + EMA.db.currencyFrameBorderColourA = a + EMA:SettingsRefresh() +end + +function EMA:SettingsChangeFontStyle( event, value ) + EMA.db.currencyFontStyle = value + EMA:SettingsRefresh() +end + +function EMA:SettingsChangeFontSize( event, value ) + EMA.db.currencyFontSize = value + EMA:SettingsRefresh() +end + +function EMA:SettingsChangeSliderSpaceForName( event, value ) + EMA.db.currencyNameWidth = tonumber( value ) + EMA:SettingsRefresh() +end + +function EMA:SettingsChangeSliderSpaceForGold( event, value ) + EMA.db.currencyGoldWidth = tonumber( value ) + EMA:SettingsRefresh() +end + +function EMA:SettingsChangeSliderSpaceForPoints( event, value ) + EMA.db.currencyPointsWidth = tonumber( value ) + EMA:SettingsRefresh() +end + +function EMA:SettingsChangeSliderSpaceBetweenValues( event, value ) + EMA.db.currencySpacingWidth = tonumber( value ) + EMA:SettingsRefresh() +end + +function EMA:SettingsToggleCurrencyLockWindow( event, checked ) + EMA.db.currencyLockWindow = checked + EMA:CurrencyUpdateWindowLock() + EMA:SettingsRefresh() +end + +------------------------------------------------------------------------------------------------------------- +-- Addon initialization, enabling and disabling. +------------------------------------------------------------------------------------------------------------- + +-- Initialise the module. +function EMA:OnInitialize() + EMA.currencyTotalGold = 0 + EMA.currencyListFrameCreated = false + EMA.currencyFrameCharacterInfo = {} + EMA.currentCurrencyValues = {} + -- Create the settings control. + SettingsCreate() + -- Initialise the EMAModule part of this module. + EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame ) + -- Populate the settings. + EMA:SettingsRefresh() + -- Create the currency list frame. + EMA:CreateEMAToonCurrencyListFrame() +end + +-- Called when the addon is enabled. +function EMA:OnEnable() + -- WoW events. + --EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" ) + if EMA.db.currOpenStartUpMaster == true then + if EMAApi.IsCharacterTheMaster( self.characterName ) == true then + EMA:ScheduleTimer( "EMAToonRequestCurrency", 5 ) + end + end +end + +-- Called when the addon is disabled. +function EMA:OnDisable() +end + +-- Settings received. +function EMA:EMAOnSettingsReceived( characterName, settings ) + if characterName ~= EMA.characterName then + -- Update the settings. + EMA.db.currGold = settings.currGold + EMA.db.bagSpace = settings.bagSpace + EMA.db.charDurr = settings.charDurr + + EMA.db.currOpenStartUpMaster = settings.currOpenStartUpMaster + EMA.db.currencyScale = settings.currencyScale + EMA.db.currencyFrameAlpha = settings.currencyFrameAlpha + EMA.db.currencyFramePoint = settings.currencyFramePoint + EMA.db.currencyFrameRelativePoint = settings.currencyFrameRelativePoint + EMA.db.currencyFrameXOffset = settings.currencyFrameXOffset + EMA.db.currencyFrameYOffset = settings.currencyFrameYOffset + EMA.db.currencyFrameBackgroundColourR = settings.currencyFrameBackgroundColourR + EMA.db.currencyFrameBackgroundColourG = settings.currencyFrameBackgroundColourG + EMA.db.currencyFrameBackgroundColourB = settings.currencyFrameBackgroundColourB + EMA.db.currencyFrameBackgroundColourA = settings.currencyFrameBackgroundColourA + EMA.db.currencyFrameBorderColourR = settings.currencyFrameBorderColourR + EMA.db.currencyFrameBorderColourG = settings.currencyFrameBorderColourG + EMA.db.currencyFrameBorderColourB = settings.currencyFrameBorderColourB + EMA.db.currencyFrameBorderColourA = settings.currencyFrameBorderColourA + EMA.db.currencyBorderStyle = settings.currencyBorderStyle + EMA.db.currencyBackgroundStyle = settings.currencyBackgroundStyle + EMA.db.currencyFontSize = settings.currencyFontSize + EMA.db.currencyFontStyle = settings.currencyFontStyle + EMA.db.currencyNameWidth = settings.currencyNameWidth + EMA.db.currencyPointsWidth = settings.currencyPointsWidth + EMA.db.currencyGoldWidth = settings.currencyGoldWidth + EMA.db.currencySpacingWidth = settings.currencySpacingWidth + EMA.db.currencyLockWindow = settings.currencyLockWindow + -- Refresh the settings. + EMA:SettingsRefresh() + -- Tell the player. + EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) ) + end +end + +function EMA:CreateEMAToonCurrencyListFrame() + -- The frame. + local frame = CreateFrame( "Frame", "EMAToonCurrencyListWindowFrame", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil ) + frame.obj = EMA + frame:SetFrameStrata( "LOW" ) + frame:SetToplevel( false ) + frame:SetClampedToScreen( true ) + frame:EnableMouse( true ) + frame:SetMovable( true ) + frame:RegisterForDrag( "LeftButton" ) + frame:SetScript( "OnDragStart", + function( this ) + if IsAltKeyDown() then + this:StartMoving() + end + end ) + frame:SetScript( "OnDragStop", + function( this ) + this:StopMovingOrSizing() + local point, relativeTo, relativePoint, xOffset, yOffset = this:GetPoint() + EMA.db.currencyFramePoint = point + EMA.db.currencyFrameRelativePoint = relativePoint + EMA.db.currencyFrameXOffset = xOffset + EMA.db.currencyFrameYOffset = yOffset + end ) + frame:SetWidth( 500 ) + frame:SetHeight( 200 ) + frame:ClearAllPoints() + frame:SetPoint( EMA.db.currencyFramePoint, UIParent, EMA.db.currencyFrameRelativePoint, EMA.db.currencyFrameXOffset, EMA.db.currencyFrameYOffset ) + frame:SetBackdrop( { + bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", + edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", + tile = true, tileSize = 10, edgeSize = 10, + insets = { left = 3, right = 3, top = 3, bottom = 3 } + } ) + + -- Create the title for the frame. + local titleName = frame:CreateFontString( "EMAToonCurrencyListWindowFrameTitleText", "OVERLAY", "GameFontNormal" ) + titleName:SetPoint( "TOPLEFT", frame, "TOPLEFT", 3, -8 ) + titleName:SetTextColor( NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1.0 ) + titleName:SetText( L["CURRENCY"] ) + titleName:SetWidth( 200 ) + titleName:SetJustifyH( "LEFT" ) + titleName:SetWordWrap( false ) + frame.titleName = titleName + + -- Create the headings. + local left = 10 + local spacing = 50 + local width = 50 + local top = -30 + local parentFrame = frame + local r = 1.0 + local g = 0.96 + local b = 0.41 + local a = 1.0 + -- Set the characters name font string. + local frameCharacterName = EMA.globalCurrencyFramePrefix.."TitleCharacterName" + local frameCharacterNameText = parentFrame:CreateFontString( frameCharacterName.."Text", "OVERLAY", "GameFontNormal" ) + frameCharacterNameText:SetText( L["NAME"] ) + frameCharacterNameText:SetTextColor( r, g, b, a ) + frameCharacterNameText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameCharacterNameText:SetWidth( width * 2.5 ) + frameCharacterNameText:SetJustifyH( "LEFT" ) + frame.characterNameText = frameCharacterNameText + left = left + (spacing * 2) + -- Set the Gold font string. + local frameGold = EMA.globalCurrencyFramePrefix.."TitleGold" + local frameGoldText = parentFrame:CreateFontString( frameGold.."Text", "OVERLAY", "GameFontNormal" ) + frameGoldText:SetText( L["GOLD"] ) + frameGoldText:SetTextColor( r, g, b, a ) + frameGoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameGoldText:SetWidth( width ) + frameGoldText:SetJustifyH( "CENTER" ) + frame.GoldText = frameGoldText + left = left + spacing + -- Set the BagSpace font string. + local frameBagSpace = EMA.globalCurrencyFramePrefix.."TitleBagSpace" + local frameBagSpaceText = parentFrame:CreateFontString( frameBagSpace.."Text", "OVERLAY", "GameFontNormal" ) + frameBagSpaceText:SetText( L["BAG_SPACE"] ) + frameBagSpaceText:SetTextColor( r, g, b, a ) + frameBagSpaceText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameBagSpaceText:SetWidth( width ) + frameBagSpaceText:SetJustifyH( "CENTER" ) + frame.BagSpaceText = frameBagSpaceText + left = left + spacing + -- Set the CharDurr font string. + local frameCharDurr = EMA.globalCurrencyFramePrefix.."TitleBagSpace" + local frameCharDurrText = parentFrame:CreateFontString( frameCharDurr.."Text", "OVERLAY", "GameFontNormal" ) + frameCharDurrText:SetText( L["DURR"] ) + frameCharDurrText:SetTextColor( r, g, b, a ) + frameCharDurrText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameCharDurrText:SetWidth( width ) + frameCharDurrText:SetJustifyH( "CENTER" ) + frame.CharDurrText = frameCharDurrText + left = left + spacing + + -- Set the Total Gold font string. + left = 10 + top = -50 + local frameTotalGoldTitle = EMA.globalCurrencyFramePrefix.."TitleTotalGold" + local frameTotalGoldTitleText = parentFrame:CreateFontString( frameTotalGoldTitle.."Text", "OVERLAY", "GameFontNormal" ) + frameTotalGoldTitleText:SetText( L["TOTAL"] ) + frameTotalGoldTitleText:SetTextColor( r, g, b, a ) + frameTotalGoldTitleText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTotalGoldTitleText:SetWidth( width ) + frameTotalGoldTitleText:SetJustifyH( "LEFT" ) + frame.TotalGoldTitleText = frameTotalGoldTitleText + + local frameTotalGold = EMA.globalCurrencyFramePrefix.."TotalGold" + local frameTotalGoldText = parentFrame:CreateFontString( frameTotalGold.."Text", "OVERLAY", "GameFontNormal" ) + frameTotalGoldText:SetText( "0" ) + frameTotalGoldText:SetTextColor( r, g, b, a ) + frameTotalGoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTotalGoldText:SetWidth( width ) + frameTotalGoldText:SetJustifyH( "RIGHT" ) + frame.TotalGoldText = frameTotalGoldText + + -- Set frame width. + frame:SetWidth( left + 10 ) + + -- Set transparency of the the frame (and all its children). + frame:SetAlpha( EMA.db.currencyFrameAlpha ) + + -- Set scale. + frame:SetScale( EMA.db.currencyScale ) + + -- Set the global frame reference for this frame. + EMAToonCurrencyListFrame = frame + + -- Close. + local closeButton = CreateFrame( "Button", EMA.globalCurrencyFramePrefix.."ButtonClose", frame, "UIPanelCloseButton" ) + closeButton:SetScript( "OnClick", function() EMAToonCurrencyListFrame:Hide() end ) + closeButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", 0, 0 ) + frame.closeButton = closeButton + + -- Update. + local updateButton = CreateFrame( "Button", EMA.globalCurrencyFramePrefix.."ButtonUpdate", frame, "UIPanelButtonTemplate" ) + updateButton:SetScript( "OnClick", function() EMA:EMAToonRequestCurrency() end ) + updateButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", -30, -4 ) + updateButton:SetHeight( 22 ) + updateButton:SetWidth( 55 ) + updateButton:SetText( L["UPDATE"] ) + + frame.updateButton = updateButton + + EMA:SettingsUpdateBorderStyle() + EMA:CurrencyUpdateWindowLock() + EMA:SettingsUpdateFontStyle() + EMAToonCurrencyListFrame:Hide() + EMA.currencyListFrameCreated = true + + EMA:CurrencyListSetHeight() +end + +function EMA:CurrencyUpdateWindowLock() + if EMA.db.currencyLockWindow == false then + EMAToonCurrencyListFrame:EnableMouse( true ) + else + EMAToonCurrencyListFrame:EnableMouse( false ) + end +end + +function EMA:SettingsUpdateBorderStyle() + local borderStyle = EMA.SharedMedia:Fetch( "border", EMA.db.currencyBorderStyle ) + local backgroundStyle = EMA.SharedMedia:Fetch( "background", EMA.db.currencyBackgroundStyle ) + local frame = EMAToonCurrencyListFrame + frame:SetBackdrop( { + bgFile = backgroundStyle, + edgeFile = borderStyle, + tile = true, tileSize = frame:GetWidth(), edgeSize = 10, + insets = { left = 3, right = 3, top = 3, bottom = 3 } + } ) + frame:SetBackdropColor( EMA.db.currencyFrameBackgroundColourR, EMA.db.currencyFrameBackgroundColourG, EMA.db.currencyFrameBackgroundColourB, EMA.db.currencyFrameBackgroundColourA ) + frame:SetBackdropBorderColor( EMA.db.currencyFrameBorderColourR, EMA.db.currencyFrameBorderColourG, EMA.db.currencyFrameBorderColourB, EMA.db.currencyFrameBorderColourA ) + frame:ClearAllPoints() + frame:SetAlpha( EMA.db.currencyFrameAlpha ) + frame:SetPoint( EMA.db.currencyFramePoint, UIParent, EMA.db.currencyFrameRelativePoint, EMA.db.currencyFrameXOffset, EMA.db.currencyFrameYOffset ) +end + +function EMA:SettingsUpdateFontStyle() + local textFont = EMA.SharedMedia:Fetch( "font", EMA.db.currencyFontStyle ) + local textSize = EMA.db.currencyFontSize + local frame = EMAToonCurrencyListFrame + frame.titleName:SetFont( textFont , textSize , "OUTLINE") + frame.characterNameText:SetFont( textFont , textSize , "OUTLINE") + frame.GoldText:SetFont( textFont , textSize , "OUTLINE") + frame.BagSpaceText:SetFont( textFont , textSize , "OUTLINE") + frame.CharDurrText:SetFont( textFont , textSize , "OUTLINE") + for characterName, currencyFrameCharacterInfo in pairs( EMA.currencyFrameCharacterInfo ) do + --EMA:Print("test", characterName) + currencyFrameCharacterInfo.characterNameText:SetFont( textFont , textSize , "OUTLINE") + currencyFrameCharacterInfo.GoldText:SetFont( textFont , textSize , "OUTLINE") + currencyFrameCharacterInfo.BagSpaceText:SetFont( textFont , textSize , "OUTLINE") + currencyFrameCharacterInfo.CharDurrText:SetFont( textFont , textSize , "OUTLINE") + end +end + + +function EMA:CurrencyListSetHeight() + local additionalLines = 0 + local addHeight = 0 + if EMA.db.currGold == true then + additionalLines = 1 + addHeight = 5 + end + EMAToonCurrencyListFrame:SetHeight( 56 + (( EMAApi.GetTeamListMaximumOrderOnline() + additionalLines) * 15) + addHeight ) +end + +function EMA:CurrencyListSetColumnWidth() + local nameWidth = EMA.db.currencyNameWidth + local pointsWidth = EMA.db.currencyPointsWidth + local goldWidth = EMA.db.currencyGoldWidth + local spacingWidth = EMA.db.currencySpacingWidth + local frameHorizontalSpacing = 10 + local numberOfPointsColumns = 0 + local parentFrame = EMAToonCurrencyListFrame + local headingRowTopPoint = -30 + local left = frameHorizontalSpacing + local haveGold = 0 + -- Heading rows. + parentFrame.characterNameText:SetWidth( nameWidth ) + parentFrame.characterNameText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) + left = left + nameWidth + spacingWidth + if EMA.db.currGold == true then + parentFrame.GoldText:SetWidth( goldWidth ) + parentFrame.GoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) + left = left + goldWidth + (spacingWidth * 3) + parentFrame.GoldText:Show() + haveGold = 1 + else + parentFrame.GoldText:Hide() + haveGold = 0 + end + if EMA.db.bagSpace == true then + parentFrame.BagSpaceText:SetWidth( pointsWidth ) + parentFrame.BagSpaceText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) + left = left + pointsWidth + spacingWidth + numberOfPointsColumns = numberOfPointsColumns + 1 + parentFrame.BagSpaceText:Show() + else + parentFrame.BagSpaceText:Hide() + end + if EMA.db.charDurr == true then + parentFrame.CharDurrText:SetWidth( pointsWidth ) + parentFrame.CharDurrText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) + left = left + pointsWidth + spacingWidth + numberOfPointsColumns = numberOfPointsColumns + 1 + parentFrame.CharDurrText:Show() + else + parentFrame.CharDurrText:Hide() + end + -- Character rows. + for characterName, currencyFrameCharacterInfo in pairs( EMA.currencyFrameCharacterInfo ) do + if EMAPrivate.Team.GetCharacterOnlineStatus (characterName) == true then + local left = frameHorizontalSpacing + local characterRowTopPoint = currencyFrameCharacterInfo.characterRowTopPoint + currencyFrameCharacterInfo.characterNameText:SetWidth( nameWidth ) + currencyFrameCharacterInfo.characterNameText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) + left = left + nameWidth + spacingWidth + if EMA.db.currGold == true then + currencyFrameCharacterInfo.GoldText:SetWidth( goldWidth ) + currencyFrameCharacterInfo.GoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) + left = left + goldWidth + (spacingWidth * 3) + currencyFrameCharacterInfo.GoldText:Show() + else + currencyFrameCharacterInfo.GoldText:Hide() + end + if EMA.db.bagSpace == true then + currencyFrameCharacterInfo.BagSpaceText:SetWidth( pointsWidth ) + currencyFrameCharacterInfo.BagSpaceText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) + left = left + pointsWidth + spacingWidth + currencyFrameCharacterInfo.BagSpaceText:Show() + else + currencyFrameCharacterInfo.BagSpaceText:Hide() + end + if EMA.db.charDurr == true then + currencyFrameCharacterInfo.CharDurrText:SetWidth( pointsWidth ) + currencyFrameCharacterInfo.CharDurrText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) + left = left + pointsWidth + spacingWidth + currencyFrameCharacterInfo.CharDurrText:Show() + else + currencyFrameCharacterInfo.CharDurrText:Hide() + end + end + end + -- Parent frame width and title. + local finalParentWidth = frameHorizontalSpacing + nameWidth + spacingWidth + (haveGold * (goldWidth + (spacingWidth * 3))) + (numberOfPointsColumns * (pointsWidth + spacingWidth)) + frameHorizontalSpacing + if finalParentWidth < 95 then + finalParentWidth = 95 + end + local widthOfCloseAndUpdateButtons = 70 + parentFrame.titleName:SetWidth( finalParentWidth - widthOfCloseAndUpdateButtons - frameHorizontalSpacing - frameHorizontalSpacing ) + parentFrame.titleName:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", frameHorizontalSpacing, -9 ) + if EMA.db.currGold == true then + if numberOfPointsColumns > 1 then + parentFrame.titleName:SetText( L["EMA_CURRENCY"] ) + else + parentFrame.titleName:SetText( L["CURRENCY"] ) + end + else + if numberOfPointsColumns < 2 then + parentFrame.titleName:SetText( "" ) + end + if numberOfPointsColumns == 2 then + parentFrame.titleName:SetText( L["CURR"] ) + end + if (numberOfPointsColumns >= 3) and (numberOfPointsColumns <= 4) then + parentFrame.titleName:SetText( L["CURRENCY"] ) + end + if numberOfPointsColumns > 4 then + parentFrame.titleName:SetText( L["EMA_CURRENCY"] ) + end + end + parentFrame:SetWidth( finalParentWidth ) + -- Total Gold. + local nameLeft = frameHorizontalSpacing + local goldLeft = frameHorizontalSpacing + nameWidth + spacingWidth + local guildTop = -35 - ((EMAApi.GetTeamListMaximumOrderOnline() + 1) * 15) - 5 + local goldTop = -35 - ((EMAApi.GetTeamListMaximumOrderOnline() + 1) * 15) - 7 + if EMA.db.currGold == true then + parentFrame.TotalGoldTitleText:SetWidth( nameWidth ) + parentFrame.TotalGoldTitleText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", nameLeft, goldTop ) + parentFrame.TotalGoldTitleText:Show() + parentFrame.TotalGoldText:SetWidth( goldWidth ) + parentFrame.TotalGoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", goldLeft, goldTop ) + parentFrame.TotalGoldText:Show() + else + parentFrame.TotalGoldTitleText:Hide() + parentFrame.TotalGoldText:Hide() + end +end + + + + +function EMA:CreateEMACurrencyFrameInfo( characterName, parentFrame ) + --EMA.Print("makelist", characterName) + --if EMAPrivate.Team.GetCharacterOnlineStatus (characterName) == true then + local left = 10 + local spacing = 50 + local width = 50 + local top = 0 + --local top = -35 + (-15 * EMAApi.GetPositionForCharacterName( characterName )) + -- WHAT THE HELL IS GOING ON HERE! Ebony! + local height1 = -35 + ( -15 * EMAApi.GetPositionForCharacterName( characterName) ) + local height2 = -35 + ( -15 * EMAApi.GetPositionForCharacterNameOnline( characterName) ) + if height1 < height2 then + --EMA:Print("greater than ", characterName ) + top = height2 + elseif height1 > height2 then + top = height2 + else + top = height2 + end + --EMA:Print("Top", top) + -- Create the table to hold the status bars for this character. + EMA.currencyFrameCharacterInfo[characterName] = {} + -- Get the character info table. + local currencyFrameCharacterInfo = EMA.currencyFrameCharacterInfo[characterName] + currencyFrameCharacterInfo.characterRowTopPoint = top + -- Set the characters name font string. + local frameCharacterName = EMA.globalCurrencyFramePrefix.."CharacterName" + local frameCharacterNameText = parentFrame:CreateFontString( frameCharacterName.."Text", "OVERLAY", "GameFontNormal" ) + frameCharacterNameText:SetText( Ambiguate( characterName , "none" ) ) + frameCharacterNameText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + frameCharacterNameText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameCharacterNameText:SetWidth( width * 2.5 ) + frameCharacterNameText:SetJustifyH( "LEFT" ) + currencyFrameCharacterInfo.characterNameText = frameCharacterNameText + left = left + (spacing * 2) + -- Set the Gold font string. + local frameGold = EMA.globalCurrencyFramePrefix.."Gold" + local frameGoldText = parentFrame:CreateFontString( frameGold.."Text", "OVERLAY", "GameFontNormal" ) + frameGoldText:SetText( "0" ) + frameGoldText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + frameGoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameGoldText:SetWidth( width ) + frameGoldText:SetJustifyH( "RIGHT" ) + currencyFrameCharacterInfo.GoldText = frameGoldText + left = left + spacing + -- Set the BagSpace font string. + local frameBagSpace = EMA.globalCurrencyFramePrefix.."BagSpace" + local frameBagSpaceText = parentFrame:CreateFontString( frameBagSpace.."Text", "OVERLAY", "GameFontNormal" ) + frameBagSpaceText:SetText( "0/0" ) + frameBagSpaceText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + frameBagSpaceText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameBagSpaceText:SetWidth( width ) + frameBagSpaceText:SetJustifyH( "RIGHT" ) + currencyFrameCharacterInfo.BagSpaceText = frameBagSpaceText + left = left + spacing + -- Set the Durability font string. + local frameCharDurr = EMA.globalCurrencyFramePrefix.."CharDurr" + local frameCharDurrText = parentFrame:CreateFontString( frameCharDurr.."Text", "OVERLAY", "GameFontNormal" ) + frameCharDurrText:SetText( "0"..L["%"] ) + frameCharDurrText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + frameCharDurrText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameCharDurrText:SetWidth( width ) + frameCharDurrText:SetJustifyH( "RIGHT" ) + currencyFrameCharacterInfo.CharDurrText = frameCharDurrText + left = left + spacing + + EMA:SettingsUpdateFontStyle() +end + +function EMA:EMAToonHideCurrency() + EMAToonCurrencyListFrame:Hide() +end + +function EMA:EMAToonRequestCurrency() + -- Colour Light Red. + local r = 1.0 + local g = 0.42 + local b = 0.42 + local a = 0.6 + for characterName, currencyFrameCharacterInfo in pairs( EMA.currencyFrameCharacterInfo ) do + --EMA.Print("DoRequestCurrency", characterName) + -- Change Hight if a new member joins the team or leaves the team. + local height1 = currencyFrameCharacterInfo.characterRowTopPoint + local height2 = -35 + ( -15 * EMAApi.GetPositionForCharacterNameOnline( characterName) ) + if height1 < height2 then + currencyFrameCharacterInfo.characterRowTopPoint = height2 + elseif height1 > height2 then + currencyFrameCharacterInfo.characterRowTopPoint = height2 + end + if EMAApi.GetCharacterOnlineStatus ( characterName ) == false then + -- Hides currency for offline members. + --EMA.Print("offlineRemove", characterName ) + currencyFrameCharacterInfo.characterNameText:Hide() + currencyFrameCharacterInfo.GoldText:Hide() + currencyFrameCharacterInfo.BagSpaceText:Hide() + currencyFrameCharacterInfo.CharDurrText:Hide() + else + currencyFrameCharacterInfo.characterNameText:Show() + currencyFrameCharacterInfo.characterNameText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.GoldText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.BagSpaceText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.CharDurrText:SetTextColor( r, g, b, a ) + end + end + EMA.currencyTotalGold = 0 + EMA:EMASendCommandToTeam( EMA.COMMAND_REQUEST_CURRENCY, "" ) + EMA.SettingsRefresh() + +end + +function EMA:DoSendCurrency( characterName, dummyValue ) + --EMA:Print("Test2") + if EMAApi.GetCharacterOnlineStatus ( characterName ) == true then + table.wipe( EMA.currentCurrencyValues ) + EMA.currentCurrencyValues.currGold = GetMoney() + -- BagSpace Maths + local numFreeSlots, numTotalSlots = LibBagUtils:CountSlots("BAGS", 0) + EMA.currentCurrencyValues.bagSpace = numFreeSlots + EMA.currentCurrencyValues.bagSpaceMax = numTotalSlots + -- Durability Maths + local curTotal, maxTotal, broken = 0, 0, 0 + for i = 1, 18 do + local curItemDurability, maxItemDurability = GetInventoryItemDurability(i) + if curItemDurability and maxItemDurability then + curTotal = curTotal + curItemDurability + maxTotal = maxTotal + maxItemDurability + if maxItemDurability > 0 and curItemDurability == 0 then + broken = broken + 1 + end + end + end + local durability = (curTotal / maxTotal) * 100 + local durabilityText = tostring(gsub( durability, "%.[^|]+", "") ) + EMA.currentCurrencyValues.durability = durabilityText + + EMA:EMASendCommandToToon( characterName, EMA.COMMAND_HERE_IS_CURRENCY, EMA.currentCurrencyValues ) + else + return + end +end + +function EMA:DoShowToonsCurrency( characterName, currencyValues ) + --EMA.Print("DoShowCurrency", characterName, EMA.currentCurrencyValues.currGold ) + local parentFrame = EMAToonCurrencyListFrame + -- Get (or create and get) the character information. + local currencyFrameCharacterInfo = EMA.currencyFrameCharacterInfo[characterName] + --EMA.Print("Frame", characterName) + if currencyFrameCharacterInfo == nil then + EMA:CreateEMACurrencyFrameInfo( characterName, parentFrame ) + currencyFrameCharacterInfo = EMA.currencyFrameCharacterInfo[characterName] + end + -- Colour white. + local r = 1.0 + local g = 1.0 + local b = 1.0 + local a = 1.0 + local v = 0 + + currencyFrameCharacterInfo.GoldText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.characterNameText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.GoldText:SetTextColor( r, g, b, a ) + + if currencyValues.bagSpace == 0 then + --EMA:Print("SetRed") + currencyFrameCharacterInfo.BagSpaceText:SetTextColor( r, v, v, a ) + else + --EMA:Print("SetWhite") + currencyFrameCharacterInfo.BagSpaceText:SetTextColor( r, g, b, a ) + end + if currencyValues.durability == "0" then + currencyFrameCharacterInfo.CharDurrText:SetTextColor( r, v, v, a ) + else + --EMA:Print("SetWhite") + currencyFrameCharacterInfo.CharDurrText:SetTextColor( r, g, b, a ) + end + + currencyFrameCharacterInfo.GoldText:SetText( EMAUtilities:FormatMoneyString( currencyValues.currGold ) ) + currencyFrameCharacterInfo.BagSpaceText:SetText( currencyValues.bagSpace..L["/"]..currencyValues.bagSpaceMax ) + currencyFrameCharacterInfo.CharDurrText:SetText ( currencyValues.durability..L["%"] ) + + -- Total gold. + EMA.currencyTotalGold = EMA.currencyTotalGold + currencyValues.currGold + parentFrame.TotalGoldText:SetText( EMAUtilities:FormatMoneyString( EMA.currencyTotalGold ) ) + -- Update width of currency list. + EMA:CurrencyListSetColumnWidth() + EMAToonCurrencyListFrame:Show() +end + +-- A EMA command has been received. +function EMA:EMAOnCommandReceived( characterName, commandName, ... ) + if commandName == EMA.COMMAND_REQUEST_CURRENCY then + EMA:DoSendCurrency( characterName, ... ) + end + if commandName == EMA.COMMAND_HERE_IS_CURRENCY then + EMA:DoShowToonsCurrency( characterName, ... ) + end +end diff --git a/Modules/Information.lua b/Modules/Information.lua index ed219af..bf91b1a 100644 --- a/Modules/Information.lua +++ b/Modules/Information.lua @@ -10,6 +10,11 @@ -- -- -- ================================================================================ -- +-- Only Load for Live +if _G.WOW_PROJECT_ID ~= _G.WOW_PROJECT_MAINLINE then + return +end + -- Create the addon using AceAddon-3.0 and embed some libraries. local EMA = LibStub( "AceAddon-3.0" ):NewAddon( "Information", @@ -137,8 +142,8 @@ end function EMA:CurrencyIconAndName( id ) local info = C_CurrencyInfo.GetCurrencyInfo(id) - --EMA:Print("test", info.name, info.iconFileID, info.description ) - if info.iconFileID ~= nil then + if info ~= nil and info.iconFileID ~= nil then + --EMA:Print("test", info.name, info.iconFileID ) local currName = strconcat(" |T"..info.iconFileID..":20|t", L[" "]..info.name) return currName end diff --git a/Modules/Interaction.lua b/Modules/Interaction.lua index 29315c6..05cd23b 100644 --- a/Modules/Interaction.lua +++ b/Modules/Interaction.lua @@ -11,10 +11,10 @@ -- ================================================================================ -- -- Create the addon using AceAddon-3.0 and embed some libraries. -local EMA = LibStub( "AceAddon-3.0" ):NewAddon( - "Interaction", - "Module-1.0", - "AceConsole-3.0", +local EMA = LibStub( "AceAddon-3.0" ):NewAddon( + "Interaction", + "Module-1.0", + "AceConsole-3.0", "AceEvent-3.0", "AceHook-3.0", "AceTimer-3.0" @@ -32,13 +32,36 @@ EMA.chatCommand = "ema-Interaction" local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" ) EMA.parentDisplayName = L["INTERACTION"] EMA.moduleDisplayName = L["INTERACTION"] --- Icon +-- Icon EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\InteractionIcon.tga" -- order EMA.moduleOrder = 60 +-- EMA key bindings. +--if EMAPrivate.Core.isEmaClassicBccBuild() == false then + BINDING_HEADER_MOUNT = L["MOUNT"] + BINDING_NAME_TEAMMOUNT = L["MOUNT_WITH_TEAM"] +--end + -- Settings - the values to store and their defaults for the settings database. EMA.settings = { + global = { + takeMastersTaxi = true, + requestTaxiStop = true, + changeTexiTime = 2, + --Mount + mountWithTeam = false, + dismountWithTeam = false, + dismountWithMaster = false, + mountInRange = false, + --Loot + autoLoot = false, + tellBoERare = false, + tellBoEEpic = false, + tellBoEMount = false, + messageArea = EMAApi.DefaultMessageArea(), + warningArea = EMAApi.DefaultWarningArea() + }, profile = { takeMastersTaxi = true, requestTaxiStop = true, @@ -67,14 +90,24 @@ function EMA:GetConfiguration() childGroups = "tab", get = "EMAConfigurationGetSetting", set = "EMAConfigurationSetSetting", - args = { + args = { config = { type = "input", name = L["OPEN_CONFIG"], desc = L["OPEN_CONFIG_HELP"], usage = "/ema-interaction config", get = false, - set = "", + set = "", + }, + mount = { + type = "input", + name = L["MOUNT"], + desc = L["MOUNT_HELP"], + usage = "/ema-interaction mount ", + get = false, + set = "RandomMountWithTeam", + order = 3, + guiHidden = true, }, push = { type = "input", @@ -99,6 +132,7 @@ EMA.COMMAND_TAKE_TAXI = "EMATaxiTakeTaxi" EMA.COMMAND_EXIT_TAXI = "EMATaxiExitTaxi" EMA.COMMAND_CLOSE_TAXI = "EMACloseTaxi" EMA.COMMAND_MOUNT_ME = "EMAMountMe" +EMA.COMMAND_MOUNT_COMMAND = "EMAMountCommand" EMA.COMMAND_MOUNT_DISMOUNT = "EMAMountDisMount" ------------------------------------------------------------------------------------------------------------- @@ -114,6 +148,7 @@ EMA.MESSAGE_TAXI_TAKEN = "EMATaxiTaxiTaken" -- Initialise the module. function EMA:OnInitialize() + --EMA.config = nil -- Taxi EMA.TakesTaxi = false EMA.LeavsTaxi = false @@ -122,52 +157,62 @@ function EMA:OnInitialize() EMA.castingMount = nil EMA.isMounted = nil EMA.responding = false - --7.3.5 code Remove! - EMA.mountName = nil -- Create the settings control. EMA:SettingsCreate() -- Initialse the EMAModule part of this module. EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame ) -- Populate the settings. EMA:SettingsRefresh() - --EMA:DisableAutoLoot() + if InCombatLockdown() == false then + EMATeamSecureButtonMount = CreateFrame( "CheckButton", "EMATeamSecureButtonMount", nil, "SecureActionButtonTemplate" ) + EMATeamSecureButtonMount:SetAttribute( "type", "macro" ) + EMATeamSecureButtonMount:SetAttribute( "macrotext", "/ema-interaction mount all" ) + EMATeamSecureButtonMount:Hide() + end end -- Called when the addon is enabled. function EMA:OnEnable() + -- Hook the TaketaxiNode function. EMA:SecureHook( "TakeTaxiNode" ) EMA:SecureHook( "TaxiRequestEarlyLanding" ) EMA:RegisterEvent( "PLAYER_ENTERING_WORLD" ) - EMA:RegisterEvent( "UNIT_SPELLCAST_START" ) - EMA:RegisterEvent( "UNIT_SPELLCAST_SUCCEEDED" ) + if EMAPrivate.Core.isEmaClassicBccBuild() == false then + EMA:RegisterEvent( "UNIT_SPELLCAST_START" ) + EMA:RegisterEvent( "UNIT_SPELLCAST_SUCCEEDED" ) + end EMA:RegisterEvent( "LOOT_READY" ) EMA:RegisterEvent( "TAXIMAP_OPENED" ) EMA:RegisterEvent( "TAXIMAP_CLOSED" ) + -- Initialise key bindings. + EMA.keyBindingFrame = CreateFrame( "Frame", nil, UIParent ) + EMA:RegisterEvent( "UPDATE_BINDINGS" ) + EMA:UPDATE_BINDINGS() EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" ) end -- Called when the addon is disabled. function EMA:OnDisable() - -- AceHook-3.0 will tidy up the hooks for us. + -- AceHook-3.0 will tidy up the hooks for us. end function EMA:SettingsCreate() EMA.settingsControl = {} -- Create the settings panel. - EMAHelperSettings:CreateSettings( - EMA.settingsControl, - EMA.moduleDisplayName, - EMA.parentDisplayName, + EMAHelperSettings:CreateSettings( + EMA.settingsControl, + EMA.moduleDisplayName, + EMA.parentDisplayName, EMA.SettingsPushSettingsClick, EMA.moduleIcon, - EMA.moduleOrder + EMA.moduleOrder ) local bottomOfInfo = EMA:SettingsCreateTaxi( EMAHelperSettings:TopOfSettings() ) EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo ) -- Help local helpTable = {} - EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() ) + EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() ) end function EMA:SettingsPushSettingsClick( event ) @@ -176,6 +221,7 @@ end function EMA:SettingsCreateTaxi( top ) local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight() + local labelHeight = EMAHelperSettings:GetLabelHeight() local iconSize = EMAHelperSettings:GetIconHeight() local left = EMAHelperSettings:LeftOfSettings() local sliderHeight = EMAHelperSettings:GetSliderHeight() @@ -185,152 +231,157 @@ function EMA:SettingsCreateTaxi( top ) local halfWidthSlider = (headingWidth - horizontalSpacing) / 2 local dropdownHeight = EMAHelperSettings:GetDropdownHeight() local verticalSpacing = EMAHelperSettings:GetVerticalSpacing() - local leftIcon = left + iconSize + local leftIcon = left + iconSize local movingTop = top -- A blank to get layout to show right? EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false ) - movingTop = movingTop - headingHeight + movingTop = movingTop - headingHeight EMAHelperSettings:CreateHeading( EMA.settingsControl, L["TAXI_OPTIONS"], movingTop, false ) movingTop = movingTop - headingHeight - EMA.settingsControl.checkBoxTakeMastersTaxi = EMAHelperSettings:CreateCheckBox( - EMA.settingsControl, - headingWidth, - left, + EMA.settingsControl.checkBoxTakeMastersTaxi = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + headingWidth, + left, movingTop, L["TAKE_TEAMS_TAXI"], EMA.SettingsToggleTakeTaxi, L["TAKE_TEAMS_TAXI_HELP"] - ) + ) movingTop = movingTop - checkBoxHeight - EMA.settingsControl.checkBoxrequestStop = EMAHelperSettings:CreateCheckBox( - EMA.settingsControl, - headingWidth, - left, + EMA.settingsControl.checkBoxrequestStop = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + headingWidth, + left, movingTop, L["REQUEST_TAXI_STOP"], EMA.SettingsTogglerequestStop, L["REQUEST_TAXI_STOP_HELP"] - ) - movingTop = movingTop - checkBoxHeight - EMA.settingsControl.changeTexiTime = EMAHelperSettings:CreateSlider( - EMA.settingsControl, - halfWidthSlider, - left, + ) + movingTop = movingTop - checkBoxHeight + EMA.settingsControl.changeTexiTime = EMAHelperSettings:CreateSlider( + EMA.settingsControl, + halfWidthSlider, + left, movingTop, L["CLONES_TO_TAKE_TAXI_AFTER"] - ) + ) EMA.settingsControl.changeTexiTime:SetSliderValues( 0, 5, 0.5 ) EMA.settingsControl.changeTexiTime:SetCallback( "OnValueChanged", EMA.SettingsChangeTaxiTimer ) - -- Mount movingTop = movingTop - sliderHeight + if EMAPrivate.Core.isEmaClassicBccBuild() == false then + -- Mount EMAHelperSettings:CreateHeading( EMA.settingsControl, L["MOUNT_OPTIONS"], movingTop, false ) movingTop = movingTop - headingHeight - EMA.settingsControl.checkBoxMountWithTeam = EMAHelperSettings:CreateCheckBox( - EMA.settingsControl, - headingWidth, - left, - movingTop, - L["MOUNT_WITH_TEAM"], - EMA.SettingsToggleMountWithTeam, - L["MOUNT_WITH_TEAM_HELP"] - ) - movingTop = movingTop - checkBoxHeight - EMA.settingsControl.checkBoxDismountWithTeam = EMAHelperSettings:CreateCheckBox( - EMA.settingsControl, - headingWidth, - left, - movingTop, - L["DISMOUNT_WITH_TEAM"], - EMA.SettingsToggleDisMountWithTeam, - L["DISMOUNT_WITH_TEAM_HELP"] - ) - movingTop = movingTop - checkBoxHeight - EMA.settingsControl.checkBoxDismountWithMaster = EMAHelperSettings:CreateCheckBox( - EMA.settingsControl, - headingWidth, - left, - movingTop, - L["ONLY_DISMOUNT_WITH_MASTER"], - EMA.SettingsToggleDisMountWithMaster, - L["ONLY_DISMOUNT_WITH_MASTER_HELP"] - ) - --[[ - movingTop = movingTop - checkBoxHeight - EMA.settingsControl.checkBoxMountInRange = EMAHelperSettings:CreateCheckBox( - EMA.settingsControl, - headingWidth, - left, - movingTop, - L["ONLY_MOUNT_WHEN_IN_RANGE"], - EMA.SettingsToggleMountInRange, - L["ONLY_MOUNT_WHEN_IN_RANGE_HELP"] - ) - ]] + --Disabled in classic note + EMA.settingsControl.checkBoxMountWithTeam = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["MOUNT_WITH_TEAM"], + EMA.SettingsToggleMountWithTeam, + L["MOUNT_WITH_TEAM_HELP"] + ) + movingTop = movingTop - checkBoxHeight + EMA.settingsControl.checkBoxDismountWithTeam = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["DISMOUNT_WITH_TEAM"], + EMA.SettingsToggleDisMountWithTeam, + L["DISMOUNT_WITH_TEAM_HELP"] + ) + movingTop = movingTop - checkBoxHeight + EMA.settingsControl.checkBoxDismountWithMaster = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["ONLY_DISMOUNT_WITH_MASTER"], + EMA.SettingsToggleDisMountWithMaster, + L["ONLY_DISMOUNT_WITH_MASTER_HELP"] + ) + --[[ + movingTop = movingTop - checkBoxHeight + EMA.settingsControl.checkBoxMountInRange = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["ONLY_MOUNT_WHEN_IN_RANGE"], + EMA.SettingsToggleMountInRange, + L["ONLY_MOUNT_WHEN_IN_RANGE_HELP"] + ) + ]] + end -- Loot movingTop = movingTop - headingHeight - EMAHelperSettings:CreateHeading( EMA.settingsControl, L["LOOT_OPTIONS"] , movingTop, false ) + EMAHelperSettings:CreateHeading( EMA.settingsControl, L["LOOT_OPTIONS"] , movingTop, false ) movingTop = movingTop - headingHeight - EMA.settingsControl.checkBoxAutoLoot = EMAHelperSettings:CreateCheckBox( - EMA.settingsControl, - headingWidth, - left, + EMA.settingsControl.checkBoxAutoLoot = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + headingWidth, + left, movingTop, L["ENABLE_AUTO_LOOT"], EMA.SettingsToggleAutoLoot, L["ENABLE_AUTO_LOOT_HELP"] ) movingTop = movingTop - checkBoxHeight - EMA.settingsControl.checkBoxTellBoERare = EMAHelperSettings:CreateCheckBox( - EMA.settingsControl, - headingWidth, - left, + EMA.settingsControl.checkBoxTellBoERare = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + headingWidth, + left, movingTop, L["TELL_TEAM_BOE_RARE"], EMA.SettingsToggleTellBoERare, L["TELL_TEAM_BOE_RARE_HELP"] ) movingTop = movingTop - checkBoxHeight - EMA.settingsControl.checkBoxTellBoEEpic = EMAHelperSettings:CreateCheckBox( - EMA.settingsControl, - headingWidth, - left, + EMA.settingsControl.checkBoxTellBoEEpic = EMAHelperSettings:CreateCheckBox( + EMA.settingsControl, + headingWidth, + left, movingTop, L["TELL_TEAM_BOE_EPIC"] , 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"] - ) + if EMAPrivate.Core.isEmaClassicBccBuild() == false then + 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"] + ) + end movingTop = movingTop - sliderHeight - verticalSpacing - EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown( - EMA.settingsControl, - headingWidth, - left, - movingTop, + EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown( + EMA.settingsControl, + headingWidth, + left, + movingTop, L["MESSAGE_AREA"] ) EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() ) EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea ) movingTop = movingTop - dropdownHeight - verticalSpacing - EMA.settingsControl.dropdownWarningArea = EMAHelperSettings:CreateDropdown( - EMA.settingsControl, - headingWidth, - left, - movingTop, - L["SEND_WARNING_AREA"] + EMA.settingsControl.dropdownWarningArea = EMAHelperSettings:CreateDropdown( + EMA.settingsControl, + headingWidth, + left, + movingTop, + L["SEND_WARNING_AREA"] ) EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() ) EMA.settingsControl.dropdownWarningArea:SetCallback( "OnValueChanged", EMA.SettingsSetWarningArea ) movingTop = movingTop - dropdownHeight - verticalSpacing - return movingTop + return movingTop end function EMA:OnMessageAreasChanged( message ) @@ -363,7 +414,7 @@ function EMA:SettingsChangeTaxiTimer( event, value ) EMA:SettingsRefresh() end --- Mount +-- Mount function EMA:SettingsToggleMountWithTeam( event, checked ) EMA.db.mountWithTeam = checked EMA:SettingsRefresh() @@ -405,24 +456,24 @@ function EMA:SettingsToggleTellBoEMount( event, checked ) end -- Settings received. -function EMA:EMAOnSettingsReceived( characterName, settings ) +function EMA:EMAOnSettingsReceived( characterName, settings ) if characterName ~= EMA.characterName then -- Update the settings. EMA.db.takeMastersTaxi = settings.takeMastersTaxi EMA.db.requestTaxiStop = settings.requestTaxiStop EMA.db.changeTexiTime = settings.changeTexiTime - + EMA.db.mountWithTeam = settings.mountWithTeam EMA.db.dismountWithTeam = settings.dismountWithTeam EMA.db.dismountWithMaster = settings.dismountWithMaster --EMA.db.mountInRange = settings.mountInRange - + EMA.db.autoLoot = settings.autoLoot EMA.db.tellBoERare = settings.tellBoERare EMA.db.tellBoEEpic = settings.tellBoEEpic - EMA.db.tellBoEMount = settings.tellBoEMount + EMA.db.tellBoEMount = settings.tellBoEMount EMA.db.messageArea = settings.messageArea - EMA.db.warningArea = settings.warningArea + EMA.db.warningArea = settings.warningArea -- Refresh the settings. EMA:SettingsRefresh() -- Tell the player. @@ -430,31 +481,30 @@ function EMA:EMAOnSettingsReceived( characterName, settings ) end end -function EMA:BeforeEMAProfileChanged() +function EMA:BeforeEMAProfileChanged() end -function EMA:OnEMAProfileChanged() +function EMA:OnEMAProfileChanged() EMA:SettingsRefresh() end function EMA:SettingsRefresh() +-- EMA:Print("test", EMA.db, "vs", EMA.db.global ) EMA.settingsControl.checkBoxTakeMastersTaxi:SetValue( EMA.db.takeMastersTaxi ) EMA.settingsControl.checkBoxrequestStop:SetValue( EMA.db.requestTaxiStop ) EMA.settingsControl.changeTexiTime:SetValue( EMA.db.changeTexiTime ) - EMA.settingsControl.checkBoxMountWithTeam:SetValue( EMA.db.mountWithTeam ) - EMA.settingsControl.checkBoxDismountWithTeam:SetValue( EMA.db.dismountWithTeam ) - EMA.settingsControl.checkBoxDismountWithMaster:SetValue( EMA.db.dismountWithMaster ) - --EMA.settingsControl.checkBoxMountInRange:SetValue( EMA.db.mountInRange ) + if EMAPrivate.Core.isEmaClassicBccBuild() == false then + EMA.settingsControl.checkBoxMountWithTeam:SetValue( EMA.db.mountWithTeam ) + EMA.settingsControl.checkBoxDismountWithTeam:SetValue( EMA.db.dismountWithTeam ) + EMA.settingsControl.checkBoxDismountWithMaster:SetValue( EMA.db.dismountWithMaster ) + --EMA.settingsControl.checkBoxMountInRange:SetValue( EMA.db.mountInRange ) + EMA.settingsControl.checkBoxTellBoEMount:SetValue( EMA.db.tellBoEMount ) + end EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea ) EMA.settingsControl.dropdownWarningArea:SetValue( EMA.db.warningArea ) 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 ) - --EMA.settingsControl.checkBoxMountInRange:SetDisabled( not EMA.db.mountWithTeam ) end ------------------------------------------------------------------------------------------------------------- @@ -463,12 +513,12 @@ end function EMA:TAXIMAP_OPENED(event, ...) local uiMapSystem = ... - if (uiMapSystem == Enum.UIMapSystem.Taxi) then + if (uiMapSystem == Enum.UIMapSystem.Taxi) then EMA.TaxiFrameName = TaxiFrame else EMA.TaxiFrameName = FlightMapFrame end -end +end -- Take a taxi. local function TakeTaxi( sender, nodeName, taxiNodeIndex ) @@ -495,7 +545,7 @@ local function TakeTaxi( sender, nodeName, taxiNodeIndex ) break end end - end + end -- If a node index was found... if nodeIndex ~= nil then -- Send a message to any listeners that a taxi is being taken. @@ -515,7 +565,7 @@ function EMA.TakeTimedTaxi( event, nodeIndex, ...) if nodeIndex ~= nil then GetNumRoutes( nodeIndex ) TakeTaxiNode( nodeIndex ) - end + end end -- Called after the character has just taken a flight (hooked function). @@ -538,16 +588,16 @@ local function LeaveTaxi ( sender ) if sender ~= EMA.characterName then EMA.LeavsTaxi = true TaxiRequestEarlyLanding() - EMA:EMASendMessageToTeam( EMA.db.messageArea, L["REQUESTED_STOP_X"]( sender ), false ) + EMA:EMASendMessageToTeam( EMA.db.messageArea, L["REQUESTED_STOP_X"]( sender ), false ) end - end + end end function EMA.TaxiRequestEarlyLanding( sender ) -- If the take masters taxi option is on. --EMA:Print("test") if EMA.db.requestTaxiStop == true then - if UnitOnTaxi( "player" ) and CanExitVehicle() == true then + if UnitOnTaxi( "player" ) == true then if EMA.LeavsTaxi == false then -- Send a message to any listeners that a taxi is being taken. EMA:EMASendCommandToTeam ( EMA.COMMAND_EXIT_TAXI ) @@ -577,11 +627,12 @@ end --EMA:UNIT_SPELLCAST_START(event, unitID, spell, rank, lineID, spellID, ... ) function EMA:PLAYER_ENTERING_WORLD(event, ... ) - if EMA.db.autoLoot == true then + if EMA.db.autoLoot == true then EMA:EnableAutoLoot() - end - if IsMounted() then - local mountIDs = C_MountJournal.GetMountIDs() + end + if EMAPrivate.Core.isEmaClassicBccBuild() == true then return end + if IsMounted() then + local mountIDs = C_MountJournal.GetMountIDs() for i = 1, #mountIDs do local creatureName, spellID, icon, active = C_MountJournal.GetMountInfoByID(mountIDs[i]) if active then @@ -591,12 +642,13 @@ function EMA:PLAYER_ENTERING_WORLD(event, ... ) end end end -end +end function EMA:UNIT_SPELLCAST_START(event, unitID, lineID, spellID, ... ) + if EMAPrivate.Core.isEmaClassicBccBuild() == true then return end --EMA:Print("Looking for Spells.", unitID, spellID) if unitID == "player" then - local mountIDs = C_MountJournal.GetMountIDs() + local mountIDs = C_MountJournal.GetMountIDs() for i = 1, #mountIDs do --local name , id, icon, active = C_MountJournal.GetMountInfoByID(i) local creatureName,mountSpellID,_,_,_,_,_,_,_,_,_,mountID = C_MountJournal.GetMountInfoByID(mountIDs[i]) @@ -604,58 +656,63 @@ function EMA:UNIT_SPELLCAST_START(event, unitID, lineID, spellID, ... ) if spellID == mountSpellID then --EMA:Print("SendtoTeam", "name", creatureName, "id", mountID) if IsShiftKeyDown() == false then - if EMA.responding == false then + if EMA.responding == false then EMA:EMASendCommandToTeam( EMA.COMMAND_MOUNT_ME, creatureName, mountID ) EMA.castingMount = spellID break - end - end + end + end end - end + end end end function EMA:UNIT_SPELLCAST_SUCCEEDED(event, unitID, lineID, spellID, ... ) - if EMA.db.mountWithTeam == false or EMA.castingMount == nil or unitID ~= "player" then + if EMAPrivate.Core.isEmaClassicBccBuild() == true then return end + if EMA.db.mountWithTeam == false or EMA.castingMount == nil or unitID ~= "player" or EMA.CommandLineMount == true then return end --EMA:Print("Looking for Spells Done", spellID, EMA.castingMount) if spellID == EMA.castingMount then --EMA:Print("Mounted!", EMA.isMounted) EMA.isMounted = spellID - EMA.mountName = spell + EMA.mountName = spell EMA:RegisterEvent("UNIT_AURA") end end function EMA:UNIT_AURA(event, unitID, ... ) + if EMAPrivate.Core.isEmaClassicBccBuild() == true then return end --EMA:Print("tester", unitID, EMA.isMounted) - if unitID ~= "player" or EMA.isMounted == nil or EMA.db.dismountWithTeam == false then + if unitID ~= "player" or EMA.isMounted == nil then return end --EMA:Print("auraTrack", unitID, EMA.isMounted, EMA.mountName ) - if not LibAuras:UnitAura(unitID, EMA.isMounted ) then + if not LibAuras:UnitAura(unitID, EMA.isMounted ) then --EMA:Print("I have Dismounted - Send to team!") if EMA.db.dismountWithMaster == true then if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then - if IsShiftKeyDown() == false then - --EMA:Print("test") + if IsShiftKeyDown() == false then + --EMA:Print("test") EMA:EMASendCommandToTeam( EMA.COMMAND_MOUNT_DISMOUNT ) EMA:UnregisterEvent("UNIT_AURA") - end + end end else - if IsShiftKeyDown() == false then - EMA:EMASendCommandToTeam( EMA.COMMAND_MOUNT_DISMOUNT ) - EMA:UnregisterEvent("UNIT_AURA") - end - end + if EMA.db.dismountWithTeam == true then + if IsShiftKeyDown() == false then + EMA:EMASendCommandToTeam( EMA.COMMAND_MOUNT_DISMOUNT ) + EMA:UnregisterEvent("UNIT_AURA") + end + end + end end end function EMA:TeamMount(characterName, name, mountID) + if EMAPrivate.Core.isEmaClassicBccBuild() == true then return end --EMA:Print("testTeamMount", characterName, name, mountID ) EMA.responding = true --mount with team truned off. @@ -663,14 +720,14 @@ function EMA:TeamMount(characterName, name, mountID) return end -- already mounted. - if IsMounted() then + if IsMounted() then return end -- Checks if character is in range. if EMA.db.mountInRange == true then if UnitIsVisible(Ambiguate(characterName, "none") ) == false then --EMA:Print("UnitIsNotVisible", characterName) - return + return end end -- Checks done now the fun stuff! @@ -696,35 +753,58 @@ function EMA:TeamMount(characterName, name, mountID) hasMount = true break end - end + end end - end - + end + --EMA:Print("test1420", mount, name) - -- for unsupported mounts. + -- for unsupported mounts. if hasMount == true then --EMA:Print("test14550", mount, name ) if name == "Random" then -- name doesn't seem to be set anywhere... C_MountJournal.SummonByID(0) EMA.responding = false - else + else --EMA:Print("test1054" ) C_MountJournal.SummonByID( mount ) EMA.responding = false end - if IsMounted() == false then + if IsMounted() == false then EMA:ScheduleTimer( "AmNotMounted", 2 ) - end - end + end + end end function EMA:AmNotMounted() if IsMounted() == false then --EMA:Print("test") EMA:EMASendMessageToTeam( EMA.db.warningArea, L["I_AM_UNABLE_TO_MOUNT"], false ) - end + end +end + +function EMA:RandomMountWithTeam( info, parameters ) + if EMAPrivate.Core.isEmaClassicBccBuild() == true then return end + local tag = parameters + --EMA:Print("test", tag ) + EMA:EMASendCommandToTeam( EMA.COMMAND_MOUNT_COMMAND, tag ) end +function EMA:ReceiveRandomMountWithTeam( characterName, tag) + if EMAPrivate.Core.isEmaClassicBccBuild() == true then return end + --EMA:Print("test", characterName, tag ) + if EMAApi.IsCharacterInGroup( EMA.characterName, tag ) == true then + if IsMounted() == false then + C_MountJournal.SummonByID(0) + else + if EMA.db.dismountWithTeam == true then + Dismount() + end + end + end +end + + + ------------------------------------------------------------------------------------------------------------- -- Loot Functionality. ------------------------------------------------------------------------------------------------------------- @@ -732,7 +812,7 @@ end function EMA:LOOT_READY( event, ... ) if EMA.db.autoLoot == true then EMA:doLoot() - end + end end function EMA:doLoot( tries ) @@ -752,27 +832,27 @@ function EMA:doLoot( tries ) if lootQuality == 3 then EMA:ScheduleTimer( "TellTeamEpicBoE", 1 , name) end - end + end if EMA.db.tellBoEEpic == true or EMA.db.tellBoEMount == true then if lootQuality == 4 then --EMA:Print("Can Tell") EMA:ScheduleTimer( "TellTeamEpicBoE", 1 , name) end - end + end ---EMA:Print("canLoot", "slot", slot, "name", name ) LootSlot(slot) numloot = GetNumLootItems() - end + end end tries = tries + 1 if tries < 8 then EMA:doLootLoop( tries ) - else + else CloseLoot() - end + end else CloseLoot() - end + end end function EMA:doLootLoop( tries ) @@ -781,18 +861,18 @@ function EMA:doLootLoop( tries ) end function EMA:EnableAutoLoot() - if EMA.db.autoLoot == true then - if GetCVar("autoLootDefault") == "0" then + if EMA.db.autoLoot == true then + if GetCVar("autoLootDefault") == "0" then --EMA:Print("testSetOFF") SetCVar( "autoLootDefault", 1 ) - end - end + end + end end function EMA:TellTeamEpicBoE( name ) --EMA:Print("loottest", name ) for bagID = 0, NUM_BAG_SLOTS do - for slotID = 1,GetContainerNumSlots( bagID ),1 do + for slotID = 1,GetContainerNumSlots( bagID ),1 do --EMA:Print( "Bags OK. checking", itemLink ) local rarity = nil local item = Item:CreateFromBagAndSlot(bagID, slotID) @@ -815,16 +895,16 @@ function EMA:TellTeamEpicBoE( name ) else rarity = L["RARE"] end - end - if rarity ~= nil then - EMA:EMASendMessageToTeam( EMA.db.messageArea, L["I_HAVE_LOOTED_X_Y_ITEM"]( rarity, itemLink ), false ) + end + if rarity ~= nil then + EMA:EMASendMessageToTeam( EMA.db.messageArea, L["I_HAVE_LOOTED_X_Y_ITEM"]( rarity, itemLink ), false ) end else - if EMA.db.tellBoEMount == true then + if EMA.db.tellBoEMount == true and EMAPrivate.Core.isEmaClassicBccBuild() == false then if isBop == false then - local mountIDs = C_MountJournal.GetMountIDs() + local mountIDs = C_MountJournal.GetMountIDs() for i = 1, #mountIDs do - local creatureName, mountSpellID,_,_,_,_,_,_,_,_, isCollected, mountID = C_MountJournal.GetMountInfoByID(mountIDs[i]) + local creatureName, mountSpellID,_,_,_,_,_,_,_,_, isCollected, mountID = C_MountJournal.GetMountInfoByID(mountIDs[i]) --EMA:Print("test2", itemLink) if name == creatureName then --EMA:Print("FoundAMount", bagItemName) @@ -832,19 +912,19 @@ function EMA:TellTeamEpicBoE( name ) end 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 ) + if rarity ~= nil then + EMA:EMASendMessageToTeam( EMA.db.messageArea, L["I_HAVE_LOOTED_X_Y_ITEM"]( rarity, itemLink ), false ) end end end end - end - end + end + end end -end - +end + ------------------------------------------------------------------------------------------------------------- -- EMA Commands functionality. ------------------------------------------------------------------------------------------------------------- @@ -861,7 +941,7 @@ function EMA:EMAOnCommandReceived( characterName, commandName, ... ) local TaxiFrame = EMA.TaxiFrameName if TaxiFrame:IsVisible() then TakeTaxi( characterName, ... ) - end + end end end if commandName == EMA.COMMAND_EXIT_TAXI then @@ -872,20 +952,38 @@ function EMA:EMAOnCommandReceived( characterName, commandName, ... ) if commandName == EMA.COMMAND_CLOSE_TAXI then CloseTaxiMapFrame() end - + if commandName == EMA.COMMAND_MOUNT_ME then --EMA:Print("command") - EMA:TeamMount( characterName, ... ) + EMA:TeamMount( characterName, ... ) end -- Dismount if mounted! if commandName == EMA.COMMAND_MOUNT_DISMOUNT then --EMA:Print("time to Dismount") if IsMounted() then Dismount() - end - end + end + end + end + if commandName == EMA.COMMAND_MOUNT_COMMAND then + EMA:ReceiveRandomMountWithTeam( characterName, ... ) end end +function EMA:UPDATE_BINDINGS() + if InCombatLockdown() then + return + end + ClearOverrideBindings( EMA.keyBindingFrame ) + local key1, key2 = GetBindingKey( "TEAMMOUNT" ) + if key1 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMATeamSecureButtonMount" ) + end + if key2 then + SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMATeamSecureButtonMount" ) + end +end + + EMAApi.Taxi = {} EMAApi.Taxi.MESSAGE_TAXI_TAKEN = EMA.MESSAGE_TAXI_TAKEN diff --git a/Modules/ItemUse.lua b/Modules/ItemUse.lua index f1a2648..43e0d62 100644 --- a/Modules/ItemUse.lua +++ b/Modules/ItemUse.lua @@ -10,6 +10,7 @@ -- -- -- ================================================================================ -- + -- Create the addon using AceAddon-3.0 and embed some libraries. local EMA = LibStub( "AceAddon-3.0" ):NewAddon( "ItemUse", @@ -41,7 +42,7 @@ EMA.moduleOrder = 1 -- EMA key bindings. -BINDING_HEADER_EMAITEMUSE = L["ITEM-USE"] +BINDING_HEADER_ITEMUSE = L["ITEM-USE"] BINDING_NAME_ITEMUSE1 = L["ITEM"]..L[" "]..L["1"] BINDING_NAME_ITEMUSE2 = L["ITEM"]..L[" "]..L["2"] BINDING_NAME_ITEMUSE3 = L["ITEM"]..L[" "]..L["3"] @@ -206,7 +207,8 @@ end local function CreateEMAItemUseFrame() -- The frame. EMAItemUseWindowFrame - local frame = CreateFrame("Frame", "EMAItemUseWindowFrame", UIParent, "SecureHandlerStateTemplate")Mixin(frame, BackdropTemplateMixin or {}) + local frame = CreateFrame("Frame", "EMAItemUseWindowFrame", UIParent, "SecureHandlerStateTemplate") Mixin(frame, BackdropTemplateMixin or {}) + --local frame = CreateFrame( "Frame", "EMAItemUseWindowFrame" , UIParent, "SecureHandlerStateTemplate" ) frame:SetAttribute("_onstate-page", [[ self:SetAttribute("state", newstate) control:ChildUpdate("state", newstate) @@ -237,14 +239,12 @@ local function CreateEMAItemUseFrame() EMA.db.frameXOffset = xOffset EMA.db.frameYOffset = yOffset end ) - frame:SetBackdrop( { bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 10, edgeSize = 10, insets = { left = 3, right = 3, top = 3, bottom = 3 } - } ) - + } ) frame:ClearAllPoints() frame:SetPoint( EMA.db.framePoint, nil, EMA.db.frameRelativePoint, EMA.db.frameXOffset, EMA.db.frameYOffset ) -- Clear Button @@ -482,27 +482,41 @@ end --ebony test Using the wowapi and not the scanning of tooltips function EMA:CheckForQuestItemAndAddToBar() - --for iterateQuests = 1, GetNumQuestLogEntries() do - -- local questLogTitleText,_,_,isHeader, _, _, _, questID = GetQuestLogTitle(iterateQuests) - - local index = C_QuestLog.GetNumQuestLogEntries() - for iterateQuests = 1, index do - local info = C_QuestLog.GetInfo( iterateQuests ) - - - if not info.isHeader then - --EMA:Print("test", questItemLink, iterateQuests, questLogTitleText, questID ) - local questItemLink, questItemIcon, questItemCharges = GetQuestLogSpecialItemInfo( iterateQuests ) - if questItemLink ~= nil then - local itemName = GetItemInfo(questItemLink) - local questName, rank = GetItemSpell(questItemLink) -- Only means to detect if the item is usable - if questName then - --EMA:Print("addItem", questItemLink ) - EMA:AddAnItemToTheBarIfNotExists( questItemLink, false) + if EMAPrivate.Core.isEmaClassicBccBuild() == true then + for bag = 0, NUM_BAG_SLOTS do + for slot = 1, GetContainerNumSlots(bag) do + local itemLink = GetContainerItemLink(bag, slot) + if itemLink and itemLink:match("item:%d") then + local name, itemLink,_,_,_,itemType,questItem = GetItemInfo( itemLink ) + --EMA:Print("test", itemType,questItem ) + if itemType ~= nil and itemType == "Quest" then + local spellName, spellID = GetItemSpell( itemLink ) + if spellName then + --EMA:Print("test", itemLink, tooltipText ) + EMA:AddAnItemToTheBarIfNotExists( itemLink, false ) + end + end end - end + end end - end + else + local index = C_QuestLog.GetNumQuestLogEntries() + for iterateQuests = 1, index do + local info = C_QuestLog.GetInfo( iterateQuests ) + if not info.isHeader then + --EMA:Print("test", questItemLink, iterateQuests, questLogTitleText, questID ) + local questItemLink, questItemIcon, questItemCharges = GetQuestLogSpecialItemInfo( iterateQuests ) + if questItemLink ~= nil then + local itemName = GetItemInfo(questItemLink) + local questName, rank = GetItemSpell(questItemLink) -- Only means to detect if the item is usable + if questName then + --EMA:Print("addItem", questItemLink ) + EMA:AddAnItemToTheBarIfNotExists( questItemLink, false) + end + end + end + end + end end -- Removes unused items. diff --git a/Modules/LDBBar.lua b/Modules/LDBBar.lua index 974f876..39a1197 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -13,7 +13,7 @@ -- With Help From Jabberie, EMA Edit By Jennifer local ldb = LibStub:GetLibrary("LibDataBroker-1.1") -local dataobj = ldb:NewDataObject("EMA" .." ".. "Ebony's Muktiboxing Assistant", { +local dataobj = ldb:NewDataObject("EMA" .." ".. "Ebony's Multiboxing Assistant", { type = "data source", text = "EMA", OnLeave = dataObject_OnLeave diff --git a/Modules/Macro.lua b/Modules/Macro.lua index 0fe1b8e..e8ab4c3 100644 --- a/Modules/Macro.lua +++ b/Modules/Macro.lua @@ -2,7 +2,7 @@ -- EMA - ( Ebony's MultiBoxing Assistant ) -- -- Current Author: Jennifer Cally (Ebony) -- -- -- --- License: All Rights Reserved 2018-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- diff --git a/Modules/Mail.lua b/Modules/Mail.lua index aaf90d9..8bc4851 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-2020 Jennifer Cally -- +-- License: All Rights Reserved 2018-2022 Jennifer Calladine -- -- -- -- Some Code Used from "Jamba" that is -- -- Released under the MIT License -- @@ -937,14 +937,14 @@ function EMA:AddAllToMailBox() --EMA:Print( "Bags OK. checking", itemLink ) local itemLink = item:GetItemLink() local location = item:GetItemLocation() - local itemType = C_Item.GetItemInventoryType( location ) + local itemTypeNew = C_Item.GetItemInventoryType( location ) local isBop = C_Item.IsBound( location ) local itemRarity = C_Item.GetItemQuality( location ) local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemIcon, itemSellPrice, itemClassID, itemSubClassID, bindType, expacID, itemSetID, isCraftingReagent = GetItemInfo( bagItemLink ) local canSend = false local toonName = nil if EMA.db.MailBoEItems == true then - if itemType ~= 0 then + if itemTypeNew ~= 0 then if EMAApi.IsCharacterInGroup( EMA.characterName, EMA.db.autoBoEItemTag ) == true then if isBop == false then if itemRarity == 2 or itemRarity == 3 or itemRarity == 4 then @@ -1013,7 +1013,7 @@ function EMA:AddAllToMailBox() end end end - EMA:ScheduleTimer( "DoSendMail", 1, nil ) + EMA:ScheduleTimer( "DoSendMail", 2, nil ) end function EMA:MAIL_SEND_SUCCESS( event, ... ) @@ -1047,6 +1047,9 @@ end -- gold function EMA:AddGoldToMailBox() + if EMA.ShiftkeyDown == true then + return + end local moneyToKeepOnToon = tonumber( EMA.db.goldAmountToKeepOnToon ) * 10000 local moneyOnToon = GetMoney() - 30 local moneyToDepositOrWithdraw = moneyOnToon - moneyToKeepOnToon @@ -1071,7 +1074,7 @@ function EMA:AddGoldToMailBox() SendMailMoneyGold:SetText(gold) SendMailMoneySilver:SetText(silver) SendMailMoneyCopper:SetText(copper) - EMA:ScheduleTimer( "DoSendMail", 1, true ) + EMA:ScheduleTimer( "DoSendMail", 2, true ) end end else diff --git a/Modules/Modules.xml b/Modules/Modules.xml index 09f163d..13d08bf 100644 --- a/Modules/Modules.xml +++ b/Modules/Modules.xml @@ -1,7 +1,7 @@