diff --git a/Jamba-AdvancedLoot/Jamba-AdvancedLoot.toc b/Jamba-AdvancedLoot/Jamba-AdvancedLoot.toc index 9db86ae..4a8a9dd 100644 --- a/Jamba-AdvancedLoot/Jamba-AdvancedLoot.toc +++ b/Jamba-AdvancedLoot/Jamba-AdvancedLoot.toc @@ -1,12 +1,12 @@ -## Interface: 60200 +## Interface: 70000 ## Title: Jamba-AdvancedLoot ## Notes: Jamba-AdvancedLoot ## Author: Max Schilling -## Version: 4.2.2 - +## Version: 7.0.3-5.0 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba ## Dependencies: Jamba ## SavedVariables: JambaAdvancedLootProfileDB ## LoadOnDemand: 1 - Locales\Locales.xml JambaAdvancedLoot.lua diff --git a/Jamba-AdvancedLoot/JambaAdvancedLoot.lua b/Jamba-AdvancedLoot/JambaAdvancedLoot.lua index bbd7cd4..10e160c 100644 --- a/Jamba-AdvancedLoot/JambaAdvancedLoot.lua +++ b/Jamba-AdvancedLoot/JambaAdvancedLoot.lua @@ -391,7 +391,7 @@ function AJM:SettingsScrollRefresh() AJM.settingsControl.list.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) AJM.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetText( "" ) AJM.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControl.list.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + AJM.settingsControl.list.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + AJM.settingsControl.advancedLootOffset if dataRowNumber <= AJM:GetItemsMaxPosition() then @@ -401,7 +401,7 @@ function AJM:SettingsScrollRefresh() AJM.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetText( itemInformation.characterName ) -- Highlight the selected row. if dataRowNumber == AJM.settingsControl.advancedLootHighlightRow then - AJM.settingsControl.list.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + AJM.settingsControl.list.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) end end end @@ -740,18 +740,28 @@ function AJM:DoAdvancedLoot() for slot = 1, numloot do lootThisSlot = false - + + -- Ebony's Change for personal Loot as players can always loot always Loot Items and other characters can not loot the item so AVD Loot is kinda pointless. + -- personal Loot is always on in the outside world from legion so always loot items. + local isInstance, instanceType = IsInInstance() + --local method = GetLootMethod() + if isInstance == true then + lootThisSlot = false + --safeToLoot = true + else + lootThisSlot = true + safeToLoot = true + end + local _, icon, name, quantity, quality, locked, isQuestItem, questId, isActive = pcall(GetLootSlotInfo, slot) - if icon then + if icon and lootThisSlot == false then local is_item = (GetLootSlotType(slot) == LOOT_SLOT_ITEM) if is_item then local link = GetLootSlotLink(slot) - - local itemName, sLink, iRarity, iLevel, iMinLevel, sType, sSubType, iStackCount = GetItemInfo(link); - + local itemName, sLink, iRarity, iLevel, iMinLevel, sType, sSubType, iStackCount = GetItemInfo(link); -- Check for items specified in config local advancedLootCharacterName = AJM:GetAdvancedLootCharacterName(link); if advancedLootCharacterName ~= nil then @@ -771,7 +781,7 @@ function AJM:DoAdvancedLoot() else AJM:AlertAboutLoot(itemName, AJM.db.lootBindPickupEpic) safeToLoot = false - end + end end if iRarity == 3 and AJM.db.lootBindPickupRare ~= nil and AJM.db.lootBindPickupRare ~= "" then if AJM.db.lootBindPickupRare == AJM.characterName then @@ -820,7 +830,8 @@ function AJM:DoAdvancedLoot() end -- Check for Cloth Matches - if sType == L["Trade Goods"] and sSubType == L["Cloth"] and AJM.db.lootCloth ~= nil and AJM.db.lootCloth ~= "" then + -- if sType == L["Trade Goods"] and sSubType == L["Cloth"] and AJM.db.lootCloth ~= nil and AJM.db.lootCloth ~= "" then + if sType == L["Tradeskill"] and sSubType == L["Cloth"] and AJM.db.lootCloth ~= nil and AJM.db.lootCloth ~= "" then if AJM.db.lootCloth == AJM.characterName then lootThisSlot = true else @@ -829,7 +840,8 @@ function AJM:DoAdvancedLoot() end end end - + + -- If this character is set to loot the item in this slot, then loot the slot. if lootThisSlot == true then LootSlot(slot) @@ -841,6 +853,7 @@ function AJM:DoAdvancedLoot() numloot = GetNumLootItems() if safeToLoot then for slot = 1, numloot do + --AJM:Print("testloot1241", numloot) LootSlot(slot) end end diff --git a/Jamba-AdvancedLoot/Locales/JambaAdvancedLoot-Locale-enUS.lua b/Jamba-AdvancedLoot/Locales/JambaAdvancedLoot-Locale-enUS.lua index a3a7c95..40e185b 100644 --- a/Jamba-AdvancedLoot/Locales/JambaAdvancedLoot-Locale-enUS.lua +++ b/Jamba-AdvancedLoot/Locales/JambaAdvancedLoot-Locale-enUS.lua @@ -35,7 +35,7 @@ L["Loot all cloth with"] = true L["Cloth Target"] = true L["Cloth"] = true L["Trade Goods"] = true - +L["Tradeskill"] = true L["Advanced Loot Items"] = true L["Character Name"] = true L["Remove"] = true diff --git a/Jamba-Curr/Jamba-Curr.toc b/Jamba-Curr/Jamba-Curr.toc new file mode 100644 index 0000000..c31e9e1 --- /dev/null +++ b/Jamba-Curr/Jamba-Curr.toc @@ -0,0 +1,14 @@ +## Interface: 70000 +## Title: JambaCurr +## Notes: JambaCurr +## Author: Ebony, Former Author: Jafula +## Version: 7.0.3-5.0 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba +## Dependencies: Jamba +## SavedVariables: JambaCurrProfileDB +## LoadOnDemand: 1 +Locales\Locales.xml +JambaCurr.lua + + diff --git a/Jamba-Curr/JambaCurr.lua b/Jamba-Curr/JambaCurr.lua new file mode 100644 index 0000000..993d4fd --- /dev/null +++ b/Jamba-Curr/JambaCurr.lua @@ -0,0 +1,1520 @@ +--[[ +Jamba - Jafula's Awesome Multi-Boxer Assistant +Copyright 2008 - 2016 Michael "Jafula" Miller +License: The MIT License +]]-- + +-- Create the addon using AceAddon-3.0 and embed some libraries. +local AJM = LibStub( "AceAddon-3.0" ):NewAddon( + "JambaCurr", + "JambaModule-1.0", + "AceConsole-3.0", + "AceEvent-3.0", + "AceTimer-3.0" +) + +-- Get the Jamba Utilities Library. +local JambaUtilities = LibStub:GetLibrary( "JambaUtilities-1.0" ) +local JambaHelperSettings = LibStub:GetLibrary( "JambaHelperSettings-1.0" ) +local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" ) +AJM.SharedMedia = LibStub( "LibSharedMedia-3.0" ) + +-- Constants and Locale for this module. +AJM.moduleName = "Jamba-Curr" +AJM.settingsDatabaseName = "JambaCurrProfileDB" +AJM.chatCommand = "jamba-curr" +local L = LibStub( "AceLocale-3.0" ):GetLocale( AJM.moduleName ) +AJM.parentDisplayName = L["Toon"] +AJM.moduleDisplayName = L["Currency"] +AJM.globalCurrencyFramePrefix = "JambaToonCurrencyListFrame" +AJM.currTypes = {} +AJM.simpleCurrList = {} + +-- Currency Identifiers. To add you own just add a new line at the bottom of this part +-- http://www.wowhead.com/currencies +-- Old Stuff +--AJM.currTypes.DalaranJewelcraftingToken = 61 +AJM.currTypes.ChampionsSeal = 241 +--AJM.currTypes.IllustriousJewelcraftersToken = 361 +AJM.currTypes.TolBaradCommendation = 391 +AJM.currTypes.LesserCharmOfGoodFortune = 738 +AJM.currTypes.ElderCharmOfGoodFortune = 697 +AJM.currTypes.MoguRuneOfFate = 752 +AJM.currTypes.WarforgedSeal = 776 +AJM.currTypes.BloodyCoin = 789 +AJM.currTypes.TimelessCoin = 777 +--WoD Currency +AJM.currTypes.GarrisonResources = 824 +AJM.currTypes.TemperedFate = 994 +AJM.currTypes.ApexisCrystal = 823 +AJM.currTypes.Darkmoon = 515 +AJM.currTypes.Oil = 1101 +AJM.currTypes.InevitableFate = 1129 +AJM.currTypes.TimeWalker = 1166 +AJM.currTypes.Valor = 1191 +--Legion Currency +AJM.currTypes.OrderResources = 1220 +AJM.currTypes.AncientMana = 1155 +AJM.currTypes.NetherShard = 1226 +AJM.currTypes.SealofBrokenFate = 1273 +AJM.currTypes.ShadowyCoins = 1154 +AJM.currTypes.SightlessEye = 1149 +AJM.currTypes.TimeWornArtifact = 1268 + + +-------------------------------------- End of edit -------------------------------------------------------------- + +function AJM:CurrencyIconAndName( id ) + local fullName, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered, quality = GetCurrencyInfo(id) + local currName = strconcat(" |T"..icon..":20|t", L[" "]..fullName) + return currName +end + + +-- Settings - the values to store and their defaults for the settings database. +AJM.settings = { + profile = { + currGold = true, + currGoldInGuildBank = false, + -- Currency default's + CcurrTypeOne = AJM.currTypes.OrderResources, + CcurrTypeOneName = AJM:CurrencyIconAndName(AJM.currTypes.OrderResources), + CcurrTypeTwo = AJM.currTypes.AncientMana, + CcurrTypeTwoName = AJM:CurrencyIconAndName(AJM.currTypes.AncientMana), + CcurrTypeThree = AJM.currTypes.TimeWalker, + CcurrTypeThreeName = AJM:CurrencyIconAndName(AJM.currTypes.TimeWalker), + CcurrTypeFour = AJM.currTypes.SightlessEye, + CcurrTypeFourName = AJM:CurrencyIconAndName(AJM.currTypes.SightlessEye), + CcurrTypeFive = 0, + CcurrTypeFiveName = "", + CcurrTypeSix = 0, + CcurrTypeSixName = "", + 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 AJM:GetConfiguration() + local configuration = { + name = AJM.moduleDisplayName, + handler = AJM, + type = 'group', + childGroups = "tab", + get = "JambaConfigurationGetSetting", + set = "JambaConfigurationSetSetting", + args = { + show = { + type = "input", + name = L["Show Currency"], + desc = L["Show the current toon the currency values for all members in the team."], + usage = "/jamba-curr show", + get = false, + set = "JambaToonRequestCurrency", + }, + hide = { + type = "input", + name = L["Hide Currency"], + desc = L["Hide the currency values for all members in the team."], + usage = "/jamba-curr hide", + get = false, + set = "JambaToonHideCurrency", + }, + push = { + type = "input", + name = L["Push Settings"], + desc = L["Push the toon settings to all characters in the team."], + usage = "/jamba-curr push", + get = false, + set = "JambaSendSettings", + }, + }, + } + return configuration +end + +local function DebugMessage( ... ) + --AJM:Print( ... ) +end + +------------------------------------------------------------------------------------------------------------- +-- Command this module sends. +------------------------------------------------------------------------------------------------------------- + +AJM.COMMAND_REQUEST_CURRENCY = "SendCurrency" +AJM.COMMAND_HERE_IS_CURRENCY = "HereIsCurrency" + +------------------------------------------------------------------------------------------------------------- +-- Messages module sends. +------------------------------------------------------------------------------------------------------------- + +------------------------------------------------------------------------------------------------------------- +-- Variables used by module. +------------------------------------------------------------------------------------------------------------- + + +------------------------------------------------------------------------------------------------------------- +-- Settings Dialogs. +------------------------------------------------------------------------------------------------------------- + +local function SettingsCreate() + AJM.settingsControl = {} + -- Create the settings panel. + JambaHelperSettings:CreateSettings( + AJM.settingsControl, + AJM.moduleDisplayName, + AJM.parentDisplayName, + AJM.SettingsPushSettingsClick + ) + local bottomOfInfo = AJM:SettingsCreateCurrency( JambaHelperSettings:TopOfSettings() ) + AJM.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo ) + -- Help + local helpTable = {} + JambaHelperSettings:CreateHelp( AJM.settingsControl, helpTable, AJM:GetConfiguration() ) +end + + + + +function AJM:SettingsCreateCurrency( top ) + -- Get positions. + local checkBoxHeight = JambaHelperSettings:GetCheckBoxHeight() + local sliderHeight = JambaHelperSettings:GetSliderHeight() + local mediaHeight = JambaHelperSettings:GetMediaHeight() + local editBoxHeight = JambaHelperSettings:GetEditBoxHeight() + local buttonHeight = JambaHelperSettings:GetButtonHeight() + local dropdownHeight = JambaHelperSettings:GetDropdownHeight() + 10 + local labelHeight = JambaHelperSettings:GetLabelHeight() + local continueLabelHeight = 18 + local left = JambaHelperSettings:LeftOfSettings() + local headingHeight = JambaHelperSettings:HeadingHeight() + local headingWidth = JambaHelperSettings:HeadingWidth( true ) + local horizontalSpacing = JambaHelperSettings:GetHorizontalSpacing() + local indent = horizontalSpacing * 12 + local verticalSpacing = JambaHelperSettings: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 + JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Currency Selection"], movingTop, false ) + movingTop = movingTop - headingHeight + AJM.settingsControl.checkBoxCurrencyGold = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl, + headingWidth, + left, + movingTop, + L["Gold"], + AJM.SettingsToggleCurrencyGold, + L["Shows the minions Gold"] + ) + movingTop = movingTop - checkBoxHeight + AJM.settingsControl.checkBoxCurrencyGoldInGuildBank = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl, + headingWidth, + left, + movingTop, + L["Include Gold In Guild Bank"], + AJM.SettingsToggleCurrencyGoldInGuildBank, + L["Show Gold In Guild Bank\n\nThis does not update unless you visit the guildbank."] + ) + --Currency One & Two + movingTop = movingTop - checkBoxHeight + AJM.settingsControl.editBoxCurrencyTypeOneID = JambaHelperSettings:CreateDropdown( + AJM.settingsControl, + halfWidth, + left + indent, + movingTop, + L["Currency One"] + ) + AJM.settingsControl.editBoxCurrencyTypeOneID:SetList( AJM.CurrDropDownBox() ) + AJM.settingsControl.editBoxCurrencyTypeOneID:SetCallback( "OnValueChanged", AJM.EditBoxChangedCurrencyTypeOneID) + AJM.settingsControl.editBoxCurrencyTypeTwoID = JambaHelperSettings:CreateDropdown( + AJM.settingsControl, + halfWidth, + right + indent, + movingTop, + L["Currency Two"] + ) + AJM.settingsControl.editBoxCurrencyTypeTwoID:SetList( AJM.CurrDropDownBox() ) + AJM.settingsControl.editBoxCurrencyTypeTwoID:SetCallback( "OnValueChanged", AJM.EditBoxChangedCurrencyTypeTwoID) + --Currency Three & Four + movingTop = movingTop - dropdownHeight + AJM.settingsControl.editBoxCurrencyTypeThreeID = JambaHelperSettings:CreateDropdown( + AJM.settingsControl, + halfWidth, + left + indent, + movingTop, + L["Currency Three"] + ) + AJM.settingsControl.editBoxCurrencyTypeThreeID:SetList( AJM.CurrDropDownBox() ) + AJM.settingsControl.editBoxCurrencyTypeThreeID:SetCallback( "OnValueChanged", AJM.EditBoxChangedCurrencyTypeThreeID) + AJM.settingsControl.editBoxCurrencyTypeFourID = JambaHelperSettings:CreateDropdown( + AJM.settingsControl, + halfWidth, + right + indent, + movingTop, + L["Currency Four"] + ) + AJM.settingsControl.editBoxCurrencyTypeFourID:SetList( AJM.CurrDropDownBox() ) + AJM.settingsControl.editBoxCurrencyTypeFourID:SetCallback( "OnValueChanged", AJM.EditBoxChangedCurrencyTypeFourID) + --Currency Five & Six + movingTop = movingTop - dropdownHeight + AJM.settingsControl.editBoxCurrencyTypeFiveID = JambaHelperSettings:CreateDropdown( + AJM.settingsControl, + halfWidth, + left + indent, + movingTop, + L["Currency Five"] + ) + AJM.settingsControl.editBoxCurrencyTypeFiveID:SetList( AJM.CurrDropDownBox() ) + AJM.settingsControl.editBoxCurrencyTypeFiveID:SetCallback( "OnValueChanged", AJM.EditBoxChangedCurrencyTypeFiveID) + AJM.settingsControl.editBoxCurrencyTypeSixID = JambaHelperSettings:CreateDropdown( + AJM.settingsControl, + halfWidth, + right + indent, + movingTop, + L["Currency Six"] + ) + AJM.settingsControl.editBoxCurrencyTypeSixID:SetList( AJM.CurrDropDownBox() ) + AJM.settingsControl.editBoxCurrencyTypeSixID:SetCallback( "OnValueChanged", AJM.EditBoxChangedCurrencyTypeSixID) + -- Other Stuff + movingTop = movingTop - dropdownHeight + AJM.settingsControl.currencyButtonShowList = JambaHelperSettings:CreateButton( + AJM.settingsControl, + headingWidth, + left, + movingTop, + L["Show Currency"], + AJM.JambaToonRequestCurrency, + L["Show Currency Window"] + ) + movingTop = movingTop - buttonHeight + AJM.settingsControl.checkBoxCurrencyOpenStartUpMaster = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl, + headingWidth, + left, + movingTop, + L["Open Currency List On Start Up"], + AJM.SettingsToggleCurrencyOpenStartUpMaster, + L["Open Currency List On Start Up.\n\nThe Master Minion Only)"] + ) + movingTop = movingTop - checkBoxHeight + -- Create appearance & layout. + JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Appearance & Layout"], movingTop, true ) + movingTop = movingTop - headingHeight + AJM.settingsControl.checkBoxCurrencyLockWindow = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl, + headingWidth, + left, + movingTop, + L["Lock Currency List"], + AJM.SettingsToggleCurrencyLockWindow, + L["Lock Currency List\n\n(Enables Mouse Click-Through)"] + ) + movingTop = movingTop - checkBoxHeight + AJM.settingsControl.currencyScaleSlider = JambaHelperSettings:CreateSlider( + AJM.settingsControl, + headingWidth, + left, + movingTop, + L["Scale"] + ) + AJM.settingsControl.currencyScaleSlider:SetSliderValues( 0.5, 2, 0.01 ) + AJM.settingsControl.currencyScaleSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeScale ) + movingTop = movingTop - sliderHeight - verticalSpacing + AJM.settingsControl.currencyTransparencySlider = JambaHelperSettings:CreateSlider( + AJM.settingsControl, + headingWidth, + left, + movingTop, + L["Transparency"] + ) + AJM.settingsControl.currencyTransparencySlider:SetSliderValues( 0, 1, 0.01 ) + AJM.settingsControl.currencyTransparencySlider:SetCallback( "OnValueChanged", AJM.SettingsChangeTransparency ) + movingTop = movingTop - sliderHeight - verticalSpacing + AJM.settingsControl.currencyMediaBorder = JambaHelperSettings:CreateMediaBorder( + AJM.settingsControl, + halfWidthSlider, + left, + movingTop, + L["Border Style"] + ) + AJM.settingsControl.currencyMediaBorder:SetCallback( "OnValueChanged", AJM.SettingsChangeBorderStyle ) + + AJM.settingsControl.currencyBorderColourPicker = JambaHelperSettings:CreateColourPicker( + AJM.settingsControl, + halfWidthSlider, + column2left + 15, + movingTop - 15, + L["Border Colour"] + ) + AJM.settingsControl.currencyBorderColourPicker:SetHasAlpha( true ) + AJM.settingsControl.currencyBorderColourPicker:SetCallback( "OnValueConfirmed", AJM.SettingsBorderColourPickerChanged ) + movingTop = movingTop - mediaHeight - verticalSpacing + AJM.settingsControl.currencyMediaBackground = JambaHelperSettings:CreateMediaBackground( + AJM.settingsControl, + halfWidthSlider, + left, + movingTop, + L["Background"] + ) + AJM.settingsControl.currencyMediaBackground:SetCallback( "OnValueChanged", AJM.SettingsChangeBackgroundStyle ) + AJM.settingsControl.currencyBackgroundColourPicker = JambaHelperSettings:CreateColourPicker( + AJM.settingsControl, + halfWidthSlider, + column2left + 15, + movingTop - 15, + L["Background Colour"] + ) + AJM.settingsControl.currencyBackgroundColourPicker:SetHasAlpha( true ) + AJM.settingsControl.currencyBackgroundColourPicker:SetCallback( "OnValueConfirmed", AJM.SettingsBackgroundColourPickerChanged ) + movingTop = movingTop - mediaHeight - verticalSpacing + --Font + AJM.settingsControl.currencyMediaFont = JambaHelperSettings:CreateMediaFont( + AJM.settingsControl, + halfWidthSlider, + left, + movingTop, + L["Font"] + ) + AJM.settingsControl.currencyMediaFont:SetCallback( "OnValueChanged", AJM.SettingsChangeFontStyle ) + AJM.settingsControl.currencyFontSize = JambaHelperSettings:CreateSlider( + AJM.settingsControl, + halfWidthSlider, + column2left, + movingTop, + L["Font Size"] + ) + AJM.settingsControl.currencyFontSize:SetSliderValues( 8, 20 , 1 ) + AJM.settingsControl.currencyFontSize:SetCallback( "OnValueChanged", AJM.SettingsChangeFontSize ) + movingTop = movingTop - mediaHeight - verticalSpacing + AJM.settingsControl.currencySliderSpaceForName = JambaHelperSettings:CreateSlider( + AJM.settingsControl, + headingWidth, + left, + movingTop, + L["Space For Name"] + ) + AJM.settingsControl.currencySliderSpaceForName:SetSliderValues( 20, 200, 1 ) + AJM.settingsControl.currencySliderSpaceForName:SetCallback( "OnValueChanged", AJM.SettingsChangeSliderSpaceForName ) + movingTop = movingTop - sliderHeight - verticalSpacing + AJM.settingsControl.currencySliderSpaceForGold = JambaHelperSettings:CreateSlider( + AJM.settingsControl, + headingWidth, + left, + movingTop, + L["Space For Gold"] + ) + AJM.settingsControl.currencySliderSpaceForGold:SetSliderValues( 20, 200, 1 ) + AJM.settingsControl.currencySliderSpaceForGold:SetCallback( "OnValueChanged", AJM.SettingsChangeSliderSpaceForGold ) + movingTop = movingTop - sliderHeight - verticalSpacing + AJM.settingsControl.currencySliderSpaceForPoints = JambaHelperSettings:CreateSlider( + AJM.settingsControl, + headingWidth, + left, + movingTop, + L["Space For Points"] + ) + AJM.settingsControl.currencySliderSpaceForPoints:SetSliderValues( 20, 200, 1 ) + AJM.settingsControl.currencySliderSpaceForPoints:SetCallback( "OnValueChanged", AJM.SettingsChangeSliderSpaceForPoints ) + movingTop = movingTop - sliderHeight - verticalSpacing + AJM.settingsControl.currencySliderSpaceBetweenValues = JambaHelperSettings:CreateSlider( + AJM.settingsControl, + headingWidth, + left, + movingTop, + L["Space Between Values"] + ) + AJM.settingsControl.currencySliderSpaceBetweenValues:SetSliderValues( 0, 20, 1 ) + AJM.settingsControl.currencySliderSpaceBetweenValues:SetCallback( "OnValueChanged", AJM.SettingsChangeSliderSpaceBetweenValues ) + movingTop = movingTop - sliderHeight - verticalSpacing + return movingTop +end + + + +------------------------------------------------------------------------------------------------------------- +-- Settings Populate. +------------------------------------------------------------------------------------------------------------- + +function AJM:BeforeJambaProfileChanged() +end + +function AJM:OnJambaProfileChanged() + AJM:SettingsRefresh() +end + +function AJM:SettingsRefresh() + AJM.settingsControl.checkBoxCurrencyGold:SetValue( AJM.db.currGold ) + AJM.settingsControl.checkBoxCurrencyGoldInGuildBank:SetValue( AJM.db.currGoldInGuildBank ) + AJM.settingsControl.checkBoxCurrencyGoldInGuildBank:SetDisabled( not AJM.db.currGold ) + + AJM.settingsControl.editBoxCurrencyTypeOneID:SetValue( AJM.db.CcurrTypeOneName ) + + AJM.settingsControl.editBoxCurrencyTypeTwoID:SetValue ( AJM.db.CcurrTypeTwoName ) + + AJM.settingsControl.editBoxCurrencyTypeThreeID:SetValue ( AJM.db.CcurrTypeThreeName ) + + AJM.settingsControl.editBoxCurrencyTypeFourID:SetValue ( AJM.db.CcurrTypeFourName ) + + AJM.settingsControl.editBoxCurrencyTypeFiveID:SetValue ( AJM.db.CcurrTypeFiveName ) + + AJM.settingsControl.editBoxCurrencyTypeSixID:SetValue ( AJM.db.CcurrTypeSixName ) + --state + AJM.settingsControl.checkBoxCurrencyOpenStartUpMaster:SetValue( AJM.db.currOpenStartUpMaster ) + AJM.settingsControl.currencyTransparencySlider:SetValue( AJM.db.currencyFrameAlpha ) + AJM.settingsControl.currencyScaleSlider:SetValue( AJM.db.currencyScale ) + AJM.settingsControl.currencyMediaBorder:SetValue( AJM.db.currencyBorderStyle ) + AJM.settingsControl.currencyMediaBackground:SetValue( AJM.db.currencyBackgroundStyle ) + AJM.settingsControl.currencyBackgroundColourPicker:SetColor( AJM.db.currencyFrameBackgroundColourR, AJM.db.currencyFrameBackgroundColourG, AJM.db.currencyFrameBackgroundColourB, AJM.db.currencyFrameBackgroundColourA ) + AJM.settingsControl.currencyBorderColourPicker:SetColor( AJM.db.currencyFrameBorderColourR, AJM.db.currencyFrameBorderColourG, AJM.db.currencyFrameBorderColourB, AJM.db.currencyFrameBorderColourA ) + AJM.settingsControl.currencyMediaFont:SetValue( AJM.db.currencyFontStyle ) + AJM.settingsControl.currencyFontSize:SetValue( AJM.db.currencyFontSize ) + AJM.settingsControl.currencySliderSpaceForName:SetValue( AJM.db.currencyNameWidth ) + AJM.settingsControl.currencySliderSpaceForGold:SetValue( AJM.db.currencyGoldWidth ) + AJM.settingsControl.currencySliderSpaceForPoints:SetValue( AJM.db.currencyPointsWidth ) + AJM.settingsControl.currencySliderSpaceBetweenValues:SetValue( AJM.db.currencySpacingWidth ) + AJM.settingsControl.checkBoxCurrencyLockWindow:SetValue( AJM.db.currencyLockWindow ) + if AJM.currencyListFrameCreated == true then + AJM:CurrencyListSetColumnWidth() + AJM:SettingsUpdateBorderStyle() + AJM:SettingsUpdateFontStyle() + AJM:CurrencyUpdateWindowLock() + JambaToonCurrencyListFrame:SetScale( AJM.db.currencyScale ) + AJM:UpdateHendingText() + AJM:CurrencyListSetHeight() + end +end + +function AJM:SettingsPushSettingsClick( event ) + AJM:JambaSendSettings() +end + +function AJM:SettingsToggleCurrencyGold( event, checked ) + AJM.db.currGold = checked + AJM:SettingsRefresh() +end + +function AJM:SettingsToggleCurrencyGoldInGuildBank( event, checked ) + AJM.db.currGoldInGuildBank = checked + AJM:SettingsRefresh() +end + + +function AJM:EditBoxChangedCurrencyTypeOneID( event, value ) + local currName, id = AJM:MatchCurrValue(value) + AJM.db.CcurrTypeOne = id + AJM.db.CcurrTypeOneName = currName + AJM:JambaToonRequestCurrency() + AJM:SettingsRefresh() +end + + +function AJM:EditBoxChangedCurrencyTypeTwoID( event, value ) + local currName, id = AJM:MatchCurrValue(value) + AJM.db.CcurrTypeTwo = id + AJM.db.CcurrTypeTwoName = currName + AJM:JambaToonRequestCurrency() + AJM:SettingsRefresh() +end + + +function AJM:EditBoxChangedCurrencyTypeThreeID( event, value ) + local currName, id = AJM:MatchCurrValue(value) + AJM.db.CcurrTypeThree = id + AJM.db.CcurrTypeThreeName = currName + AJM:JambaToonRequestCurrency() + AJM:SettingsRefresh() +end + + +function AJM:EditBoxChangedCurrencyTypeFourID( event, value ) + local currName, id = AJM:MatchCurrValue(value) + AJM.db.CcurrTypeFour = id + AJM.db.CcurrTypeFourName = currName + AJM:JambaToonRequestCurrency() + AJM:SettingsRefresh() +end + + +function AJM:EditBoxChangedCurrencyTypeFiveID( event, value ) + local currName, id = AJM:MatchCurrValue(value) + AJM.db.CcurrTypeFive = id + AJM.db.CcurrTypeFiveName = currName + AJM:JambaToonRequestCurrency() + AJM:SettingsRefresh() +end + + +function AJM:EditBoxChangedCurrencyTypeSixID( event, value ) + --AJM:Print("test", value) + local currName, id = AJM:MatchCurrValue(value) + AJM.db.CcurrTypeSix = id + AJM.db.CcurrTypeSixName = currName + AJM:JambaToonRequestCurrency() + AJM:SettingsRefresh() +end + +function AJM:SettingsToggleCurrencyOpenStartUpMaster( event, checked ) + AJM.db.currOpenStartUpMaster = checked + AJM:SettingsRefresh() +end + +function AJM:SettingsChangeScale( event, value ) + AJM.db.currencyScale = tonumber( value ) + AJM:SettingsRefresh() +end + +function AJM:SettingsChangeTransparency( event, value ) + AJM.db.currencyFrameAlpha = tonumber( value ) + AJM:SettingsRefresh() +end + +function AJM:SettingsChangeBorderStyle( event, value ) + AJM.db.currencyBorderStyle = value + AJM:SettingsRefresh() +end + +function AJM:SettingsChangeBackgroundStyle( event, value ) + AJM.db.currencyBackgroundStyle = value + AJM:SettingsRefresh() +end + +function AJM:SettingsBackgroundColourPickerChanged( event, r, g, b, a ) + AJM.db.currencyFrameBackgroundColourR = r + AJM.db.currencyFrameBackgroundColourG = g + AJM.db.currencyFrameBackgroundColourB = b + AJM.db.currencyFrameBackgroundColourA = a + AJM:SettingsRefresh() +end + +function AJM:SettingsBorderColourPickerChanged( event, r, g, b, a ) + AJM.db.currencyFrameBorderColourR = r + AJM.db.currencyFrameBorderColourG = g + AJM.db.currencyFrameBorderColourB = b + AJM.db.currencyFrameBorderColourA = a + AJM:SettingsRefresh() +end + +function AJM:SettingsChangeFontStyle( event, value ) + AJM.db.currencyFontStyle = value + AJM:SettingsRefresh() +end + +function AJM:SettingsChangeFontSize( event, value ) + AJM.db.currencyFontSize = value + AJM:SettingsRefresh() +end + +function AJM:SettingsChangeSliderSpaceForName( event, value ) + AJM.db.currencyNameWidth = tonumber( value ) + AJM:SettingsRefresh() +end + +function AJM:SettingsChangeSliderSpaceForGold( event, value ) + AJM.db.currencyGoldWidth = tonumber( value ) + AJM:SettingsRefresh() +end + +function AJM:SettingsChangeSliderSpaceForPoints( event, value ) + AJM.db.currencyPointsWidth = tonumber( value ) + AJM:SettingsRefresh() +end + +function AJM:SettingsChangeSliderSpaceBetweenValues( event, value ) + AJM.db.currencySpacingWidth = tonumber( value ) + AJM:SettingsRefresh() +end + +function AJM:SettingsToggleCurrencyLockWindow( event, checked ) + AJM.db.currencyLockWindow = checked + AJM:CurrencyUpdateWindowLock() + AJM:SettingsRefresh() +end + +------------------------------------------------------------------------------------------------------------- +-- Addon initialization, enabling and disabling. +------------------------------------------------------------------------------------------------------------- + +-- Initialise the module. +function AJM:OnInitialize() + AJM.currencyTotalGold = 0 + AJM.currencyListFrameCreated = false + AJM.currencyFrameCharacterInfo = {} + AJM.currentCurrencyValues = {} + -- Create the settings control. + SettingsCreate() + -- Initialise the JambaModule part of this module. + AJM:JambaModuleInitialize( AJM.settingsControl.widgetSettings.frame ) + -- Populate the settings. + AJM:SettingsRefresh() + -- Create the currency list frame. + AJM:CreateJambaToonCurrencyListFrame() +end + +-- Called when the addon is enabled. +function AJM:OnEnable() + -- WoW events. + --AJM:RegisterMessage( JambaApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" ) + if AJM.db.currOpenStartUpMaster == true then + if JambaApi.IsCharacterTheMaster( self.characterName ) == true then + AJM:ScheduleTimer( "JambaToonRequestCurrency", 20 ) + end + end +end + +-- Called when the addon is disabled. +function AJM:OnDisable() +end + +-- Settings received. +function AJM:JambaOnSettingsReceived( characterName, settings ) + if characterName ~= AJM.characterName then + -- Update the settings. + AJM.db.currGold = settings.currGold + AJM.db.currGoldInGuildBank = settings.currGoldInGuildBank + AJM.db.CcurrTypeOne = settings.CcurrTypeOne + AJM.db.CcurrTypeOneName = settings.CcurrTypeOneName + AJM.db.CcurrTypeTwo = settings.CcurrTypeTwo + AJM.db.CcurrTypeTwoName = settings.CcurrTypeTwoName + AJM.db.CcurrTypeThree = settings.CcurrTypeThree + AJM.db.CcurrTypeThreeName = settings.CcurrTypeThreeName + AJM.db.CcurrTypeFour = settings.CcurrTypeFour + AJM.db.CcurrTypeFourName = settings.CcurrTypeFourName + AJM.db.CcurrTypeFive = settings.CcurrTypeFive + AJM.db.CcurrTypeFiveName = settings.CcurrTypeFiveName + AJM.db.CcurrTypeSix = settings.CcurrTypeSix + AJM.db.CcurrTypeSixName = settings.CcurrTypeSixName + AJM.db.currOpenStartUpMaster = settings.currOpenStartUpMaster + AJM.db.currencyScale = settings.currencyScale + AJM.db.currencyFrameAlpha = settings.currencyFrameAlpha + AJM.db.currencyFramePoint = settings.currencyFramePoint + AJM.db.currencyFrameRelativePoint = settings.currencyFrameRelativePoint + AJM.db.currencyFrameXOffset = settings.currencyFrameXOffset + AJM.db.currencyFrameYOffset = settings.currencyFrameYOffset + AJM.db.currencyFrameBackgroundColourR = settings.currencyFrameBackgroundColourR + AJM.db.currencyFrameBackgroundColourG = settings.currencyFrameBackgroundColourG + AJM.db.currencyFrameBackgroundColourB = settings.currencyFrameBackgroundColourB + AJM.db.currencyFrameBackgroundColourA = settings.currencyFrameBackgroundColourA + AJM.db.currencyFrameBorderColourR = settings.currencyFrameBorderColourR + AJM.db.currencyFrameBorderColourG = settings.currencyFrameBorderColourG + AJM.db.currencyFrameBorderColourB = settings.currencyFrameBorderColourB + AJM.db.currencyFrameBorderColourA = settings.currencyFrameBorderColourA + AJM.db.currencyMediaBorder = settings.currencyBorderStyle + AJM.db.currencyMediaBackground = settings.currencyBackgroundStyle + AJM.db.currencyFontSize = settings.currencyFontSize + AJM.db.currencyFontStyle = settings.currencyFontStyle + AJM.db.currencyNameWidth = settings.currencyNameWidth + AJM.db.currencyPointsWidth = settings.currencyPointsWidth + AJM.db.currencyGoldWidth = settings.currencyGoldWidth + AJM.db.currencySpacingWidth = settings.currencySpacingWidth + AJM.db.currencyLockWindow = settings.currencyLockWindow + -- Refresh the settings. + AJM:SettingsRefresh() + -- Tell the player. + AJM:Print( L["Settings received from A."]( characterName ) ) + -- Tell the team? + --AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["Settings received from A."]( characterName ), false ) + end +end + +function AJM:CurrDropDownBox() + for name, id in pairs( AJM.currTypes ) do + local currName = AJM:CurrencyIconAndName( id ) + AJM.simpleCurrList[currName] = currName + end + AJM.simpleCurrList[""] = "" + table.sort( AJM.simpleCurrList ) + return AJM.simpleCurrList +end + + +function AJM:MatchCurrValue(value) + if value == "" then + return "", 0 + end + for name, id in pairs( AJM.currTypes ) do + local currName = AJM:CurrencyIconAndName( id ) + if value == currName then + return currName, id + end + end +end + +function AJM:CreateJambaToonCurrencyListFrame() + -- The frame. + local frame = CreateFrame( "Frame", "JambaToonCurrencyListWindowFrame", UIParent ) + frame.obj = AJM + frame:SetFrameStrata( "BACKGROUND" ) + 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() + AJM.db.currencyFramePoint = point + AJM.db.currencyFrameRelativePoint = relativePoint + AJM.db.currencyFrameXOffset = xOffset + AJM.db.currencyFrameYOffset = yOffset + end ) + frame:SetWidth( 500 ) + frame:SetHeight( 200 ) + frame:ClearAllPoints() + frame:SetPoint( AJM.db.currencyFramePoint, UIParent, AJM.db.currencyFrameRelativePoint, AJM.db.currencyFrameXOffset, AJM.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( "JambaToonCurrencyListWindowFrameTitleText", "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 = AJM.globalCurrencyFramePrefix.."TitleCharacterName" + local frameCharacterNameText = parentFrame:CreateFontString( frameCharacterName.."Text", "OVERLAY", "GameFontNormal" ) + frameCharacterNameText:SetText( L["Toon"] ) + 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 = AJM.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 TypeOne font string. + local frameTypeOne = AJM.globalCurrencyFramePrefix.."TitleTypeOne" + local frameTypeOneText = parentFrame:CreateFontString( frameTypeOne.."Text", "OVERLAY", "GameFontNormal" ) + frameTypeOneText:SetText( L["CurrOne"] ) + frameTypeOneText:SetTextColor( r, g, b, a ) + frameTypeOneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTypeOneText:SetWidth( width ) + frameTypeOneText:SetJustifyH( "CENTER" ) + frame.TypeOneText = frameTypeOneText + left = left + spacing + -- Set the TypeTwo font string. + local frameTypeTwo = AJM.globalCurrencyFramePrefix.."TitleTypeTwo" + local frameTypeTwoText = parentFrame:CreateFontString( frameTypeTwo.."Text", "OVERLAY", "GameFontNormal" ) + frameTypeTwoText:SetText( L["CurrTwo"] ) + frameTypeTwoText:SetTextColor( r, g, b, a ) + frameTypeTwoText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTypeTwoText:SetWidth( width ) + frameTypeTwoText:SetJustifyH( "CENTER" ) + frame.TypeTwoText = frameTypeTwoText + left = left + spacing + -- Set the TypeThree font string. + local frameTypeThree = AJM.globalCurrencyFramePrefix.."TitleTypeThree" + local frameTypeThreeText = parentFrame:CreateFontString( frameTypeThree.."Text", "OVERLAY", "GameFontNormal" ) + frameTypeThreeText:SetText( L["CurrThree"] ) + frameTypeThreeText:SetTextColor( r, g, b, a ) + frameTypeThreeText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTypeThreeText:SetWidth( width ) + frameTypeThreeText:SetJustifyH( "CENTER" ) + frame.TypeThreeText = frameTypeThreeText + left = left + spacing + -- Set the TypeFour font string. + local frameTypeFour = AJM.globalCurrencyFramePrefix.."TitleTypeFour" + local frameTypeFourText = parentFrame:CreateFontString( frameTypeFour.."Text", "OVERLAY", "GameFontNormal" ) + frameTypeFourText:SetText( L["CurrFour"] ) + frameTypeFourText:SetTextColor( r, g, b, a ) + frameTypeFourText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTypeFourText:SetWidth( width ) + frameTypeFourText:SetJustifyH( "CENTER" ) + frame.TypeFourText = frameTypeFourText + left = left + spacing + -- Set the TypeFive font string. + local frameTypeFive = AJM.globalCurrencyFramePrefix.."TitleTypeFive" + local frameTypeFiveText = parentFrame:CreateFontString( frameTypeFive.."Text", "OVERLAY", "GameFontNormal" ) + frameTypeFiveText:SetText( L["CurrFive"] ) + frameTypeFiveText:SetTextColor( r, g, b, a ) + frameTypeFiveText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTypeFiveText:SetWidth( width ) + frameTypeFiveText:SetJustifyH( "CENTER" ) + frame.TypeFiveText = frameTypeFiveText + left = left + spacing + -- Set the TypeSix font string. + local frameTypeSix = AJM.globalCurrencyFramePrefix.."TitleTypeSix" + local frameTypeSixText = parentFrame:CreateFontString( frameTypeSix.."Text", "OVERLAY", "GameFontNormal" ) + frameTypeSixText:SetText( L["CurrSix"] ) + frameTypeSixText:SetTextColor( r, g, b, a ) + frameTypeSixText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTypeSixText:SetWidth( width ) + frameTypeSixText:SetJustifyH( "CENTER" ) + frame.TypeSixText = frameTypeSixText + left = left + spacing + -- Set the Total Gold font string. + left = 10 + top = -50 + local frameTotalGoldTitle = AJM.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 frameTotalGoldGuildTitle = AJM.globalCurrencyFramePrefix.."TitleTotalGoldGuild" + local frameTotalGoldGuildTitleText = parentFrame:CreateFontString( frameTotalGoldGuildTitle.."Text", "OVERLAY", "GameFontNormal" ) + frameTotalGoldGuildTitleText:SetText( L["Guild"] ) + frameTotalGoldGuildTitleText:SetTextColor( r, g, b, a ) + frameTotalGoldGuildTitleText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTotalGoldGuildTitleText:SetWidth( width ) + frameTotalGoldGuildTitleText:SetJustifyH( "LEFT" ) + frame.TotalGoldGuildTitleText = frameTotalGoldGuildTitleText + + local frameTotalGold = AJM.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 + + local frameTotalGoldGuild = AJM.globalCurrencyFramePrefix.."TotalGoldGuild" + local frameTotalGoldGuildText = parentFrame:CreateFontString( frameTotalGoldGuild.."Text", "OVERLAY", "GameFontNormal" ) + frameTotalGoldGuildText:SetText( "0" ) + frameTotalGoldGuildText:SetTextColor( r, g, b, a ) + frameTotalGoldGuildText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTotalGoldGuildText:SetWidth( width ) + frameTotalGoldGuildText:SetJustifyH( "RIGHT" ) + frame.TotalGoldGuildText = frameTotalGoldGuildText + + -- Set frame width. + frame:SetWidth( left + 10 ) + + -- Set transparency of the the frame (and all its children). + frame:SetAlpha( AJM.db.currencyFrameAlpha ) + + -- Set scale. + frame:SetScale( AJM.db.currencyScale ) + + -- Set the global frame reference for this frame. + JambaToonCurrencyListFrame = frame + + -- Close. + local closeButton = CreateFrame( "Button", AJM.globalCurrencyFramePrefix.."ButtonClose", frame, "UIPanelCloseButton" ) + closeButton:SetScript( "OnClick", function() JambaToonCurrencyListFrame:Hide() end ) + closeButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", 0, 0 ) + frame.closeButton = closeButton + + -- Update. + local updateButton = CreateFrame( "Button", AJM.globalCurrencyFramePrefix.."ButtonUpdate", frame, "UIPanelButtonTemplate" ) + updateButton:SetScript( "OnClick", function() AJM:JambaToonRequestCurrency() end ) + updateButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", -30, -4 ) + updateButton:SetHeight( 22 ) + updateButton:SetWidth( 55 ) + updateButton:SetText( L["Update"] ) + + frame.updateButton = updateButton + + AJM:SettingsUpdateBorderStyle() + AJM:CurrencyUpdateWindowLock() + AJM:SettingsUpdateFontStyle() + JambaToonCurrencyListFrame:Hide() + AJM.currencyListFrameCreated = true + AJM:UpdateHendingText() + AJM:CurrencyListSetHeight() +end + +function AJM:UpdateHendingText() + local parentFrame = JambaToonCurrencyListFrame + -- Type One + local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( AJM.db.CcurrTypeOne ) + local iconTextureString = strconcat(" |T"..icon..":20|t") + parentFrame.TypeOneText:SetText( iconTextureString ) + -- Type Two + local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( AJM.db.CcurrTypeTwo ) + local iconTextureString = strconcat(" |T"..icon..":20|t") + parentFrame.TypeTwoText:SetText( iconTextureString ) + -- Type Three + local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( AJM.db.CcurrTypeThree ) + local iconTextureString = strconcat(" |T"..icon..":20|t") + parentFrame.TypeThreeText:SetText( iconTextureString ) + -- Type Four + local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( AJM.db.CcurrTypeFour ) + local iconTextureString = strconcat(" |T"..icon..":20|t") + parentFrame.TypeFourText:SetText( iconTextureString ) + -- Type Five + local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( AJM.db.CcurrTypeFive ) + local iconTextureString = strconcat(" |T"..icon..":20|t") + parentFrame.TypeFiveText:SetText( iconTextureString ) + -- Type six + local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( AJM.db.CcurrTypeSix ) + local iconTextureString = strconcat(" |T"..icon..":20|t") + parentFrame.TypeSixText:SetText( iconTextureString ) +end + +function AJM:CurrencyUpdateWindowLock() + if AJM.db.currencyLockWindow == false then + JambaToonCurrencyListFrame:EnableMouse( true ) + else + JambaToonCurrencyListFrame:EnableMouse( false ) + end +end + +function AJM:SettingsUpdateBorderStyle() + local borderStyle = AJM.SharedMedia:Fetch( "border", AJM.db.currencyBorderStyle ) + local backgroundStyle = AJM.SharedMedia:Fetch( "background", AJM.db.currencyBackgroundStyle ) + local frame = JambaToonCurrencyListFrame + frame:SetBackdrop( { + bgFile = backgroundStyle, + edgeFile = borderStyle, + tile = true, tileSize = frame:GetWidth(), edgeSize = 10, + insets = { left = 3, right = 3, top = 3, bottom = 3 } + } ) + frame:SetBackdropColor( AJM.db.currencyFrameBackgroundColourR, AJM.db.currencyFrameBackgroundColourG, AJM.db.currencyFrameBackgroundColourB, AJM.db.currencyFrameBackgroundColourA ) + frame:SetBackdropBorderColor( AJM.db.currencyFrameBorderColourR, AJM.db.currencyFrameBorderColourG, AJM.db.currencyFrameBorderColourB, AJM.db.currencyFrameBorderColourA ) + frame:SetAlpha( AJM.db.currencyFrameAlpha ) +end + +function AJM:SettingsUpdateFontStyle() + local textFont = AJM.SharedMedia:Fetch( "font", AJM.db.currencyFontStyle ) + local textSize = AJM.db.currencyFontSize + local frame = JambaToonCurrencyListFrame + frame.titleName:SetFont( textFont , textSize , "OUTLINE") + frame.characterNameText:SetFont( textFont , textSize , "OUTLINE") + frame.GoldText:SetFont( textFont , textSize , "OUTLINE") + frame.TotalGoldGuildTitleText:SetFont( textFont , textSize , "OUTLINE") + frame.TotalGoldGuildText:SetFont( textFont , textSize , "OUTLINE") + frame.TotalGoldText:SetFont( textFont , textSize , "OUTLINE") + frame.TotalGoldTitleText:SetFont( textFont , textSize , "OUTLINE") + for characterName, currencyFrameCharacterInfo in pairs( AJM.currencyFrameCharacterInfo ) do + --AJM:Print("test", characterName) + --currencyFrameCharacterInfo.characterNameText:SetFont( textFont , textSize , "OUTLINE") + currencyFrameCharacterInfo.characterNameText:SetFont( textFont , textSize , "OUTLINE") + currencyFrameCharacterInfo.GoldText:SetFont( textFont , textSize , "OUTLINE") + currencyFrameCharacterInfo.TypeOneText:SetFont( textFont , textSize , "OUTLINE") + currencyFrameCharacterInfo.TypeTwoText:SetFont( textFont , textSize , "OUTLINE") + currencyFrameCharacterInfo.TypeThreeText:SetFont( textFont , textSize , "OUTLINE") + currencyFrameCharacterInfo.TypeFourText:SetFont( textFont , textSize , "OUTLINE") + currencyFrameCharacterInfo.TypeFiveText:SetFont( textFont , textSize , "OUTLINE") + currencyFrameCharacterInfo.TypeSixText:SetFont( textFont , textSize , "OUTLINE") + end +end + + +function AJM:CurrencyListSetHeight() + local additionalLines = 0 + local addHeight = 0 + if AJM.db.currGold == true then + if AJM.db.currGoldInGuildBank == true then + additionalLines = 2 + addHeight = 7 + else + additionalLines = 1 + addHeight = 5 + end + end + JambaToonCurrencyListFrame:SetHeight( 56 + (( JambaApi.GetTeamListMaximumOrderOnline() + additionalLines) * 15) + addHeight ) +end + +function AJM:CurrencyListSetColumnWidth() + local nameWidth = AJM.db.currencyNameWidth + local pointsWidth = AJM.db.currencyPointsWidth + local goldWidth = AJM.db.currencyGoldWidth + local spacingWidth = AJM.db.currencySpacingWidth + local frameHorizontalSpacing = 10 + local numberOfPointsColumns = 0 + local parentFrame = JambaToonCurrencyListFrame + 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 AJM.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 AJM.db.CcurrTypeOneName == "" then + parentFrame.TypeOneText:Hide() + else + parentFrame.TypeOneText:SetWidth( pointsWidth ) + parentFrame.TypeOneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) + left = left + pointsWidth + spacingWidth + numberOfPointsColumns = numberOfPointsColumns + 1 + parentFrame.TypeOneText:Show() + end + if AJM.db.CcurrTypeTwoName == "" then + parentFrame.TypeTwoText:Hide() + else + parentFrame.TypeTwoText:SetWidth( pointsWidth ) + parentFrame.TypeTwoText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) + left = left + pointsWidth + spacingWidth + numberOfPointsColumns = numberOfPointsColumns + 1 + parentFrame.TypeTwoText:Show() + end + if AJM.db.CcurrTypeThreeName == "" then + parentFrame.TypeThreeText:Hide() + else + parentFrame.TypeThreeText:SetWidth( pointsWidth ) + parentFrame.TypeThreeText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) + left = left + pointsWidth + spacingWidth + numberOfPointsColumns = numberOfPointsColumns + 1 + parentFrame.TypeThreeText:Show() + end + if AJM.db.CcurrTypeFourName == "" then + parentFrame.TypeFourText:Hide() + else + parentFrame.TypeFourText:SetWidth( pointsWidth ) + parentFrame.TypeFourText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) + left = left + pointsWidth + spacingWidth + numberOfPointsColumns = numberOfPointsColumns + 1 + parentFrame.TypeFourText:Show() + end + if AJM.db.CcurrTypeFiveName == "" then + parentFrame.TypeFiveText:Hide() + else + parentFrame.TypeFiveText:SetWidth( pointsWidth ) + parentFrame.TypeFiveText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) + left = left + pointsWidth + spacingWidth + numberOfPointsColumns = numberOfPointsColumns + 1 + parentFrame.TypeFiveText:Show() + end + if AJM.db.CcurrTypeSixName == "" then + parentFrame.TypeSixText:Hide() + else + parentFrame.TypeSixText:SetWidth( pointsWidth ) + parentFrame.TypeSixText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) + left = left + pointsWidth + spacingWidth + numberOfPointsColumns = numberOfPointsColumns + 1 + parentFrame.TypeSixText:Show() + end + -- Character rows. + for characterName, currencyFrameCharacterInfo in pairs( AJM.currencyFrameCharacterInfo ) do + if JambaPrivate.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 AJM.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 AJM.db.CcurrTypeOneName == "" then + currencyFrameCharacterInfo.TypeOneText:Hide() + else + currencyFrameCharacterInfo.TypeOneText:SetWidth( pointsWidth ) + currencyFrameCharacterInfo.TypeOneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) + left = left + pointsWidth + spacingWidth + currencyFrameCharacterInfo.TypeOneText:Show() + end + if AJM.db.CcurrTypeTwoName == "" then + currencyFrameCharacterInfo.TypeTwoText:Hide() + else + currencyFrameCharacterInfo.TypeTwoText:SetWidth( pointsWidth ) + currencyFrameCharacterInfo.TypeTwoText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) + left = left + pointsWidth + spacingWidth + currencyFrameCharacterInfo.TypeTwoText:Show() + end + if AJM.db.CcurrTypeThreeName == "" then + currencyFrameCharacterInfo.TypeThreeText:Hide() + else + currencyFrameCharacterInfo.TypeThreeText:SetWidth( pointsWidth ) + currencyFrameCharacterInfo.TypeThreeText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) + left = left + pointsWidth + spacingWidth + currencyFrameCharacterInfo.TypeThreeText:Show() + end + if AJM.db.CcurrTypeFourName == "" then + currencyFrameCharacterInfo.TypeFourText:Hide() + else + currencyFrameCharacterInfo.TypeFourText:SetWidth( pointsWidth ) + currencyFrameCharacterInfo.TypeFourText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) + left = left + pointsWidth + spacingWidth + currencyFrameCharacterInfo.TypeFourText:Show() + end + if AJM.db.CcurrTypeFiveName == "" then + currencyFrameCharacterInfo.TypeFiveText:Hide() + else + currencyFrameCharacterInfo.TypeFiveText:SetWidth( pointsWidth ) + currencyFrameCharacterInfo.TypeFiveText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) + left = left + pointsWidth + spacingWidth + currencyFrameCharacterInfo.TypeFiveText:Show() + + end + if AJM.db.CcurrTypeSixName == "" then + currencyFrameCharacterInfo.TypeSixText:Hide() + else + currencyFrameCharacterInfo.TypeSixText:SetWidth( pointsWidth ) + currencyFrameCharacterInfo.TypeSixText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) + left = left + pointsWidth + spacingWidth + currencyFrameCharacterInfo.TypeSixText:Show() + 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 AJM.db.currGold == true then + if numberOfPointsColumns > 1 then + parentFrame.titleName:SetText( L["Jamba 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["Jamba Currency"] ) + end + end + parentFrame:SetWidth( finalParentWidth ) + -- Total Gold. + local nameLeft = frameHorizontalSpacing + local goldLeft = frameHorizontalSpacing + nameWidth + spacingWidth + --local guildTop = -35 - ((JambaApi.GetTeamListMaximumOrder() + 1) * 15) - 5 + --local goldTop = -35 - ((JambaApi.GetTeamListMaximumOrder() + 1) * 15) - 7 + local guildTop = -35 - ((JambaApi.GetTeamListMaximumOrderOnline() + 1) * 15) - 5 + local goldTop = -35 - ((JambaApi.GetTeamListMaximumOrderOnline() + 1) * 15) - 7 + if AJM.db.currGold == true then + if AJM.db.currGoldInGuildBank == true then + parentFrame.TotalGoldGuildTitleText:SetWidth( nameWidth ) + parentFrame.TotalGoldGuildTitleText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", nameLeft, guildTop ) + parentFrame.TotalGoldGuildTitleText:Show() + parentFrame.TotalGoldGuildText:SetWidth( goldWidth ) + parentFrame.TotalGoldGuildText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", goldLeft, guildTop ) + parentFrame.TotalGoldGuildText:Show() + --goldTop = -35 - ((JambaApi.GetTeamListMaximumOrder() + 2) * 15) - 5 + goldTop = -35 - ((JambaApi.GetTeamListMaximumOrderOnline() + 2) * 15) - 5 + else + parentFrame.TotalGoldGuildTitleText:Hide() + parentFrame.TotalGoldGuildText:Hide() + end + 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() + parentFrame.TotalGoldGuildTitleText:Hide() + parentFrame.TotalGoldGuildText:Hide() + end +end + + + + +function AJM:CreateJambaCurrencyFrameInfo( characterName, parentFrame ) + --AJM.Print("makelist", characterName) + --if JambaPrivate.Team.GetCharacterOnlineStatus (characterName) == true then + local left = 10 + local spacing = 50 + local width = 50 + local top = 0 + --local top = -35 + (-15 * JambaApi.GetPositionForCharacterName( characterName )) + -- WHAT THE HELL IS GOING ON HERE! Ebony! + local height1 = -35 + ( -15 * JambaApi.GetPositionForCharacterName( characterName) ) + local height2 = -35 + ( -15 * JambaApi.GetPositionForCharacterNameOnline( characterName) ) + if height1 < height2 then + --AJM:Print("greater than ", characterName ) + top = height2 + elseif height1 > height2 then + top = height2 + else + top = height2 + end + --AJM:Print("Top", top) + -- Create the table to hold the status bars for this character. + AJM.currencyFrameCharacterInfo[characterName] = {} + -- Get the character info table. + local currencyFrameCharacterInfo = AJM.currencyFrameCharacterInfo[characterName] + currencyFrameCharacterInfo.characterRowTopPoint = top + -- Set the characters name font string. + local frameCharacterName = AJM.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 = AJM.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 TypeOne font string. + local frameTypeOne = AJM.globalCurrencyFramePrefix.."TypeOne" + local frameTypeOneText = parentFrame:CreateFontString( frameTypeOne.."Text", "OVERLAY", "GameFontNormal" ) + frameTypeOneText:SetText( "0" ) + frameTypeOneText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + frameTypeOneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTypeOneText:SetWidth( width ) + frameTypeOneText:SetJustifyH( "CENTER" ) + currencyFrameCharacterInfo.TypeOneText = frameTypeOneText + left = left + spacing + -- Set the TypeTwo font string. + local frameTypeTwo = AJM.globalCurrencyFramePrefix.."TypeTwo" + local frameTypeTwoText = parentFrame:CreateFontString( frameTypeTwo.."Text", "OVERLAY", "GameFontNormal" ) + frameTypeTwoText:SetText( "0" ) + frameTypeTwoText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + frameTypeTwoText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTypeTwoText:SetWidth( width ) + frameTypeTwoText:SetJustifyH( "CENTER" ) + currencyFrameCharacterInfo.TypeTwoText = frameTypeTwoText + left = left + spacing + -- Set the TypeThree font string. + local frameTypeThree = AJM.globalCurrencyFramePrefix.."TypeThree" + local frameTypeThreeText = parentFrame:CreateFontString( frameTypeThree.."Text", "OVERLAY", "GameFontNormal" ) + frameTypeThreeText:SetText( "0" ) + frameTypeThreeText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + frameTypeThreeText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTypeThreeText:SetWidth( width ) + frameTypeThreeText:SetJustifyH( "CENTER" ) + currencyFrameCharacterInfo.TypeThreeText = frameTypeThreeText + left = left + spacing + -- Set the TypeFour font string. + local frameTypeFour = AJM.globalCurrencyFramePrefix.."TypeFour" + local frameTypeFourText = parentFrame:CreateFontString( frameTypeFour.."Text", "OVERLAY", "GameFontNormal" ) + frameTypeFourText:SetText( "0" ) + frameTypeFourText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + frameTypeFourText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTypeFourText:SetWidth( width ) + frameTypeFourText:SetJustifyH( "CENTER" ) + currencyFrameCharacterInfo.TypeFourText = frameTypeFourText + left = left + spacing + -- Set the TypeFive font string. + local frameTypeFive = AJM.globalCurrencyFramePrefix.."TypeFive" + local frameTypeFiveText = parentFrame:CreateFontString( frameTypeFive.."Text", "OVERLAY", "GameFontNormal" ) + frameTypeFiveText:SetText( "0" ) + frameTypeFiveText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + frameTypeFiveText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTypeFiveText:SetWidth( width ) + frameTypeFiveText:SetJustifyH( "CENTER" ) + currencyFrameCharacterInfo.TypeFiveText = frameTypeFiveText + left = left + spacing + -- Set the TypeSix font string. + local frameTypeSix = AJM.globalCurrencyFramePrefix.."TypeSix" + local frameTypeSixText = parentFrame:CreateFontString( frameTypeSix.."Text", "OVERLAY", "GameFontNormal" ) + frameTypeSixText:SetText( "0" ) + frameTypeSixText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + frameTypeSixText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) + frameTypeSixText:SetWidth( width ) + frameTypeSixText:SetJustifyH( "CENTER" ) + currencyFrameCharacterInfo.TypeSixText = frameTypeSixText + left = left + spacing + + AJM:SettingsUpdateFontStyle() +end + +function AJM:JambaToonHideCurrency() + JambaToonCurrencyListFrame:Hide() +end + +function AJM:JambaToonRequestCurrency() + -- Colour red. + local r = 1.0 + local g = 0.0 + local b = 0.0 + local a = 0.6 + for characterName, currencyFrameCharacterInfo in pairs( AJM.currencyFrameCharacterInfo ) do + --AJM.Print("DoRequestCurrency", characterName) + -- Change Hight if a new member joins the team or leaves the team. + local height1 = currencyFrameCharacterInfo.characterRowTopPoint + local height2 = -35 + ( -15 * JambaApi.GetPositionForCharacterNameOnline( characterName) ) + if height1 < height2 then + currencyFrameCharacterInfo.characterRowTopPoint = height2 + elseif height1 > height2 then + currencyFrameCharacterInfo.characterRowTopPoint = height2 + end + if JambaApi.GetCharacterOnlineStatus ( characterName ) == false then + -- Hides currency for offline members. + --AJM.Print("offlineRemove", characterName ) + currencyFrameCharacterInfo.characterNameText:Hide() + currencyFrameCharacterInfo.GoldText:Hide() + currencyFrameCharacterInfo.TypeOneText:Hide() + currencyFrameCharacterInfo.TypeTwoText:Hide() + currencyFrameCharacterInfo.TypeThreeText:Hide() + currencyFrameCharacterInfo.TypeFourText:Hide() + currencyFrameCharacterInfo.TypeFiveText:Hide() + currencyFrameCharacterInfo.TypeSixText:Hide() + else + currencyFrameCharacterInfo.characterNameText:Show() + currencyFrameCharacterInfo.GoldText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.characterNameText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.TypeOneText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.TypeTwoText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.TypeThreeText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.TypeFourText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.TypeFiveText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.TypeSixText:SetTextColor( r, g, b, a ) + end + end + AJM.currencyTotalGold = 0 + if AJM.db.currGoldInGuildBank == true then + if IsInGuild() then + AJM.currencyTotalGold = GetGuildBankMoney() + end + end + AJM:JambaSendCommandToTeam( AJM.COMMAND_REQUEST_CURRENCY, "" ) + AJM.SettingsRefresh() +end + +function AJM:DoSendCurrency( characterName, dummyValue ) + --AJM:Print("Test2") + if JambaApi.GetCharacterOnlineStatus ( characterName ) == true then + table.wipe( AJM.currentCurrencyValues ) + AJM.currentCurrencyValues.currGold = GetMoney() + -- CurrencyValues + AJM.currentCurrencyValues.currTypeOne = select( 2, GetCurrencyInfo( AJM.db.CcurrTypeOne ) ) + AJM.currentCurrencyValues.currTypeTwo = select( 2, GetCurrencyInfo( AJM.db.CcurrTypeTwo ) ) + AJM.currentCurrencyValues.currTypeThree = select( 2, GetCurrencyInfo( AJM.db.CcurrTypeThree ) ) + AJM.currentCurrencyValues.currTypeFour = select( 2, GetCurrencyInfo( AJM.db.CcurrTypeFour ) ) + AJM.currentCurrencyValues.currTypeFive = select( 2, GetCurrencyInfo( AJM.db.CcurrTypeFive ) ) + AJM.currentCurrencyValues.currTypeSix = select( 2, GetCurrencyInfo( AJM.db.CcurrTypeSix ) ) + AJM:JambaSendCommandToToon( characterName, AJM.COMMAND_HERE_IS_CURRENCY, AJM.currentCurrencyValues ) + else + return + end +end + +function AJM:DoShowToonsCurrency( characterName, currencyValues ) + --AJM.Print("DoShowCurrency", characterName, currencyValues.currTypeOne ) + local parentFrame = JambaToonCurrencyListFrame + -- Get (or create and get) the character information. + local currencyFrameCharacterInfo = AJM.currencyFrameCharacterInfo[characterName] + --AJM.Print("Frame", characterName) + if currencyFrameCharacterInfo == nil then + AJM:CreateJambaCurrencyFrameInfo( characterName, parentFrame ) + currencyFrameCharacterInfo = AJM.currencyFrameCharacterInfo[characterName] + end + -- Colour white. + local r = 1.0 + local g = 1.0 + local b = 1.0 + local a = 1.0 + currencyFrameCharacterInfo.GoldText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.characterNameText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.TypeOneText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.TypeTwoText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.TypeThreeText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.TypeFourText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.TypeFiveText:SetTextColor( r, g, b, a ) + currencyFrameCharacterInfo.TypeSixText:SetTextColor( r, g, b, a ) + + --currencyFrameCharacterInfo.GoldText:SetText( JambaUtilities:FormatMoneyString( currencyValues.currGold ) ) + currencyFrameCharacterInfo.GoldText:SetText( GetCoinTextureString( currencyValues.currGold ) ) + currencyFrameCharacterInfo.TypeOneText:SetText( currencyValues.currTypeOne ) + currencyFrameCharacterInfo.TypeTwoText:SetText( currencyValues.currTypeTwo ) + currencyFrameCharacterInfo.TypeThreeText:SetText( currencyValues.currTypeThree ) + currencyFrameCharacterInfo.TypeFourText:SetText( currencyValues.currTypeFour ) + currencyFrameCharacterInfo.TypeFiveText:SetText( currencyValues.currTypeFive ) + currencyFrameCharacterInfo.TypeSixText:SetText( currencyValues.currTypeSix ) + -- Total gold. + AJM.currencyTotalGold = AJM.currencyTotalGold + currencyValues.currGold + --parentFrame.TotalGoldText:SetText( JambaUtilities:FormatMoneyString( AJM.currencyTotalGold ) ) + parentFrame.TotalGoldText:SetText( GetCoinTextureString( AJM.currencyTotalGold ) ) + if IsInGuild() then + --parentFrame.TotalGoldGuildText:SetText( JambaUtilities:FormatMoneyString( GetGuildBankMoney() ) ) + parentFrame.TotalGoldGuildText:SetText( GetCoinTextureString( GetGuildBankMoney() ) ) + end + -- Update width of currency list. + AJM:CurrencyListSetColumnWidth() + JambaToonCurrencyListFrame:Show() +end + +-- A Jamba command has been received. +function AJM:JambaOnCommandReceived( characterName, commandName, ... ) + if commandName == AJM.COMMAND_REQUEST_CURRENCY then + AJM:DoSendCurrency( characterName, ... ) + end + if commandName == AJM.COMMAND_HERE_IS_CURRENCY then + AJM:DoShowToonsCurrency( characterName, ... ) + end +end \ No newline at end of file diff --git a/Jamba-Curr/Locales/JambaCurr-Locale-enUS.lua b/Jamba-Curr/Locales/JambaCurr-Locale-enUS.lua new file mode 100644 index 0000000..08ae073 --- /dev/null +++ b/Jamba-Curr/Locales/JambaCurr-Locale-enUS.lua @@ -0,0 +1,78 @@ +--[[ +Jamba - Jafula's Awesome Multi-Boxer Assistant +Copyright 2008 - 2016 Michael "Jafula" Miller +License: The MIT License +]]-- + +local L = LibStub( "AceLocale-3.0" ):NewLocale( "Jamba-Curr", "enUS", true ) +L["Slash Commands"] = true +L["Toon: Warnings"] = true +L["Push Settings"] = true +L["Push the toon settings to all characters in the team."] = true +L["Settings received from A."] = function( characterName ) + return string.format( "Settings received from %s.", characterName ) +end +L["Toon"] = true +L[": "] = true +L["Currency"] = true +L["CurrencyName"] = true +L["CurrencyID"] = true +L["Currency One"] = true +L["Currency Two"] = true +L["Currency Three"] = true +L["Currency Four"] = true +L["Currency Five"] = true +L["Currency Six"] = true + +L["CurrOne"] = true +L["CurrTwo"] = true +L["CurrThree"] = true +L["CurrFour"] = true +L["CurrFive"] = true +L["CurrSix"] = true +L["Show Currency"] = true +L["Show the current toon the currency values for all members in the team."] = true +L["Blizzard Tooltip"] = true +L["Blizzard Dialog Background"] = true +L["Curr"] = true +L["Jamba Currency"] = true +L["Update"] = true +L["Gold"] = true +L["Include Gold In Guild Bank"] = true +L["Total"] = true +L["Guild"] = true +L[" ("] = true +L[")"] = true +L["Currency Selection"] = true +L["Scale"] = true +L["Transparency"] = true +L["Border Style"] = true +L["Border Colour"] = true +L["Background"] = true +L["Background Colour"] = true +L["Appearance & Layout"] = true +L["Arial Narrow"] = true +L["Font"] = true +L["Font Size"] = true +L["Space For Name"] = true +L["Space For Gold"] = true +L["Space For Points"] = true +L["Space Between Values"] = true +L["Lock Currency List"] = true +L["Open Currency List On Start Up"] = true +L["Hide Currency"] = true +L["Hide the currency values for all members in the team."] = true +L[" "] = true --space character + + + + +--Help Tooltips + +L["Shows the minions Gold"] = true +L["Show Gold In Guild Bank\n\nThis does not update unless you visit the guildbank."] = true +L["Shows Currency on The Currency display window."] = true +L["You can change the Currency ID here.\n\nFor a list of ID's\nhttp://www.wowhead.com/currencies"] = true +L["Show Currency Window"] = true +L["Open Currency List On Start Up.\n\nThe Master Minion Only)"] = true +L["Lock Currency List\n\n(Enables Mouse Click-Through)"] = true \ No newline at end of file diff --git a/Jamba-Curr/Locales/Locales.xml b/Jamba-Curr/Locales/Locales.xml new file mode 100644 index 0000000..28cbf06 --- /dev/null +++ b/Jamba-Curr/Locales/Locales.xml @@ -0,0 +1,9 @@ +<!-- +Jamba - Jafula's Awesome Multi-Boxer Assistant +Copyright 2008 - 2016 Michael "Jafula" Miller +License: The MIT License +--> + +<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd" xmlns="http://www.blizzard.com/wow/ui/"> + <Script file="JambaCurr-Locale-enUS.lua" /> +</Ui> \ No newline at end of file diff --git a/Jamba-DisplayTeam/Jamba-DisplayTeam.toc b/Jamba-DisplayTeam/Jamba-DisplayTeam.toc index d4b63de..3d82797 100644 --- a/Jamba-DisplayTeam/Jamba-DisplayTeam.toc +++ b/Jamba-DisplayTeam/Jamba-DisplayTeam.toc @@ -1,11 +1,12 @@ -## Interface: 60200 +## Interface: 70000 ## Title: Jamba-DisplayTeam ## Notes: Jamba-DisplayTeam ## Author: Ebony, Former Author: Jafula -## Version: 4.2.2 +## Version: 7.0.3-5.0 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba ## Dependencies: Jamba ## SavedVariables: JambaDisplayTeamProfileDB ## LoadOnDemand: 1 - Locales\Locales.xml JambaDisplayTeam.lua diff --git a/Jamba-DisplayTeam/JambaDisplayTeam.lua b/Jamba-DisplayTeam/JambaDisplayTeam.lua index 310510a..b22026a 100644 --- a/Jamba-DisplayTeam/JambaDisplayTeam.lua +++ b/Jamba-DisplayTeam/JambaDisplayTeam.lua @@ -38,62 +38,59 @@ AJM.settings = { statusBarTexture = L["Blizzard"], borderStyle = L["Blizzard Tooltip"], backgroundStyle = L["Blizzard Dialog Background"], + fontStyle = L["Arial Narrow"], + fontSize = 12, teamListScale = 1, teamListTitleHeight = 15, - teamListVerticalSpacing = 4, - teamListHorizontalSpacing = 4, + teamListVerticalSpacing = 3, + teamListHorizontalSpacing = 6, barVerticalSpacing = 2, barHorizontalSpacing = 2, - barsAreStackedVertically = false, - teamListHorizontal = false, - showListTitle = true, + charactersPerRow = 1, + --Old code kept for Legacy Purpose + barsAreStackedVertically = true, + teamListHorizontal = true, + showListTitle = false, showCharacterPortrait = true, - characterPortraitWidth = 20, + characterPortraitWidth = 80, showFollowStatus = true, - followStatusWidth = 80, - followStatusHeight = 20, + followStatusWidth = 100, + followStatusHeight = 15, followStatusShowName = true, - followStatusShowLevel = true, showExperienceStatus = true, - experienceStatusWidth = 80, - experienceStatusHeight = 20, + showXpStatus = true, + showArtifactStatus = false, + showHonorStatus = false, + showRepStatus = false, + experienceStatusWidth = 100, + experienceStatusHeight = 15, experienceStatusShowValues = false, - experienceStatusShowPercentage = true, - showReputationStatus = true, - showReputationName = true, - reputationStatusWidth = 80, - reputationStatusHeight = 20, - reputationStatusShowValues = false, - reputationStatusShowPercentage = true, - showHealthStatus = false, - healthStatusWidth = 80, - healthStatusHeight = 20, + experienceStatusShowPercentage = true, + showHealthStatus = true, + healthStatusWidth = 100, + healthStatusHeight = 30, healthStatusShowValues = true, healthStatusShowPercentage = true, - showPowerStatus = false, - powerStatusWidth = 80, - powerStatusHeight = 20, + showPowerStatus = true, + powerStatusWidth = 100, + powerStatusHeight = 15, powerStatusShowValues = true, powerStatusShowPercentage = true, showComboStatus = false, - comboStatusWidth = 80, - comboStatusHeight = 20, + comboStatusWidth = 100, + comboStatusHeight = 10, comboStatusShowValues = true, comboStatusShowPercentage = true, - showBagInformation = true, - showBagFreeSlotsOnly = true, - bagInformationWidth = 80, - bagInformationHeight = 25, - --EbonyTest - stackName = false, - showIlvlInformation = true, - ShowEquippedOnly = false, - --ilvlInformationWidth = 80, - --ilvlInformationHeight = 20, - framePoint = "CENTER", - frameRelativePoint = "CENTER", +-- showBagInformation = true, +-- showBagFreeSlotsOnly = true, +-- bagInformationWidth = 80, +-- bagInformationHeight = 25, + showToolTipInfo = true, +-- ShowEquippedOnly = false, + framePoint = "LEFT", + frameRelativePoint = "LEFT", frameXOffset = 0, - frameYOffset = 0, + frameYOffset = 80, frameAlpha = 1.0, frameBackgroundColourR = 1.0, frameBackgroundColourG = 1.0, @@ -103,7 +100,8 @@ AJM.settings = { frameBorderColourG = 1.0, frameBorderColourB = 1.0, frameBorderColourA = 1.0, - timerCount = 1 + timerCount = 1, + currGold = true }, } @@ -156,10 +154,11 @@ end AJM.COMMAND_FOLLOW_STATUS_UPDATE = "FlwStsUpd" AJM.COMMAND_EXPERIENCE_STATUS_UPDATE = "ExpStsUpd" -AJM.COMMAND_BAGINFORMATION_UPDATE = "BagInfoUpd" -AJM.COMMAND_ITEMLEVELINFORMATION_UPDATE = "IlvlInfoUpd" +--AJM.COMMAND_BAGINFORMATION_UPDATE = "BagInfoUpd" +AJM.COMMAND_TOONINFORMATION_UPDATE = "IlvlInfoUpd" AJM.COMMAND_REPUTATION_STATUS_UPDATE = "RepStsUpd" AJM.COMMAND_COMBO_STATUS_UPDATE = "CboStsUpd" +AJM.COMMAND_REQUEST_INFO = "SendInfo" ------------------------------------------------------------------------------------------------------------- -- Messages module sends. @@ -191,24 +190,18 @@ local function GetCharacterHeight() local heightPortrait = 0 local heightFollowStatus = 0 local heightExperienceStatus = 0 - local heightReputationStatus = 0 local heightHealthStatus = 0 local heightPowerStatus = 0 local heightComboStatus = 0 - local heightBagInformation = 0 - --local heightIlvlInformation = 0 +-- local heightBagInformation = 0 local heightAllBars = 0 if AJM.db.showCharacterPortrait == true then heightPortrait = AJM.db.characterPortraitWidth + AJM.db.teamListVerticalSpacing end - if AJM.db.showBagInformation == true then - heightBagInformation = AJM.db.bagInformationHeight + AJM.db.teamListVerticalSpacing - heightAllBars = heightAllBars + heightBagInformation - end - --if AJM.db.showIlvlInformation == true then - -- heightIlvlInformation = AJM.db.ilvlInformationHeight + AJM.db.teamListVerticalSpacing - -- heightAllBars = heightAllBars + heightIlvlInformation - --end +-- if AJM.db.showBagInformation == true then +-- heightBagInformation = AJM.db.bagInformationHeight + AJM.db.teamListVerticalSpacing +-- heightAllBars = heightAllBars + heightBagInformation +-- end if AJM.db.showFollowStatus == true then heightFollowStatus = AJM.db.followStatusHeight + AJM.db.barVerticalSpacing heightAllBars = heightAllBars + heightFollowStatus @@ -216,10 +209,6 @@ local function GetCharacterHeight() if AJM.db.showExperienceStatus == true then heightExperienceStatus = AJM.db.experienceStatusHeight + AJM.db.barVerticalSpacing heightAllBars = heightAllBars + heightExperienceStatus - end - if AJM.db.showReputationStatus == true then - heightReputationStatus = AJM.db.reputationStatusHeight + AJM.db.barVerticalSpacing - heightAllBars = heightAllBars + heightReputationStatus end if AJM.db.showHealthStatus == true then heightHealthStatus = AJM.db.healthStatusHeight + AJM.db.barVerticalSpacing @@ -235,8 +224,10 @@ local function GetCharacterHeight() end if AJM.db.barsAreStackedVertically == true then height = max( heightPortrait, heightAllBars ) + else - height = max( heightPortrait, heightBagInformation, heightFollowStatus, heightExperienceStatus, heightReputationStatus, heightHealthStatus, heightPowerStatus, heightComboStatus ) + height = max( heightPortrait, heightFollowStatus, heightExperienceStatus, heightHealthStatus, heightPowerStatus, heightComboStatus ) + --height = max( heightPortrait, heightBagInformation, heightFollowStatus, heightExperienceStatus, heightReputationStatus, heightHealthStatus, heightPowerStatus, heightComboStatus ) end return height end @@ -246,24 +237,17 @@ local function GetCharacterWidth() local widthPortrait = 0 local widthFollowStatus = 0 local widthExperienceStatus = 0 - local widthReputationStatus = 0 local widthHealthStatus = 0 local widthPowerStatus = 0 local widthComboStatus = 0 - local widthBagInformation = 0 - local widthIvlInformation = 0 local widthAllBars = 0 if AJM.db.showCharacterPortrait == true then widthPortrait = AJM.db.characterPortraitWidth + AJM.db.teamListHorizontalSpacing end - if AJM.db.showBagInformation == true then - widthBagInformation = AJM.db.bagInformationWidth + AJM.db.teamListHorizontalSpacing - widthAllBars = widthAllBars + widthBagInformation - end - --if AJM.db.showIlvlInformation == true then - -- widthIlvlInformation = AJM.db.ilvlInformationWidth + AJM.db.teamListHorizontalSpacing - -- widthAllBars = widthAllBars + widthIlvlInformation - --end +-- if AJM.db.showBagInformation == true then +-- widthBagInformation = AJM.db.bagInformationWidth + AJM.db.teamListHorizontalSpacing +-- widthAllBars = widthAllBars + widthBagInformation +-- end if AJM.db.showFollowStatus == true then widthFollowStatus = AJM.db.followStatusWidth + AJM.db.barHorizontalSpacing widthAllBars = widthAllBars + widthFollowStatus @@ -272,10 +256,6 @@ local function GetCharacterWidth() widthExperienceStatus = AJM.db.experienceStatusWidth + AJM.db.barHorizontalSpacing widthAllBars = widthAllBars + widthExperienceStatus end - if AJM.db.showReputationStatus == true then - widthReputationStatus = AJM.db.reputationStatusWidth + AJM.db.barHorizontalSpacing - widthAllBars = widthAllBars + widthReputationStatus - end if AJM.db.showHealthStatus == true then widthHealthStatus = AJM.db.healthStatusWidth + AJM.db.barHorizontalSpacing widthAllBars = widthAllBars + widthHealthStatus @@ -289,7 +269,8 @@ local function GetCharacterWidth() widthAllBars = widthAllBars + widthComboStatus end if AJM.db.barsAreStackedVertically == true then - width = widthPortrait + max( widthBagInformation, widthFollowStatus, widthExperienceStatus, widthReputationStatus, widthHealthStatus, widthPowerStatus, widthComboStatus ) + width = widthPortrait + max( widthFollowStatus, widthExperienceStatus, widthHealthStatus, widthPowerStatus, widthComboStatus ) + --width = widthPortrait + max( widthBagInformation, widthFollowStatus, widthExperienceStatus, widthReputationStatus, widthHealthStatus, widthPowerStatus, widthComboStatus ) else width = widthPortrait + widthAllBars end @@ -306,8 +287,9 @@ local function UpdateJambaTeamListDimensions() JambaDisplayTeamListFrame.titleName:SetText( "" ) end if AJM.db.teamListHorizontal == true then - frame:SetWidth( (AJM.db.teamListVerticalSpacing * 3) + (GetCharacterWidth() * AJM.totalMembersDisplayed) ) - frame:SetHeight( AJM.db.teamListTitleHeight + (AJM.db.teamListVerticalSpacing * 3) + GetCharacterHeight() ) + --Old code kept for Legacy Purpose + -- frame:SetWidth( (AJM.db.teamListVerticalSpacing * 3) + (GetCharacterWidth() * AJM.totalMembersDisplayed) ) + -- frame:SetHeight( AJM.db.teamListTitleHeight + (AJM.db.teamListVerticalSpacing * 3) + GetCharacterHeight() ) else frame:SetWidth( (AJM.db.teamListHorizontalSpacing * 3) + GetCharacterWidth() ) frame:SetHeight( AJM.db.teamListTitleHeight + (GetCharacterHeight() * AJM.totalMembersDisplayed) + (AJM.db.teamListVerticalSpacing * 3) ) @@ -367,14 +349,6 @@ local function CreateJambaTeamListFrame() AJM:SettingsUpdateBorderStyle() AJM.teamListCreated = true ---[[ - -- Draw the title. - if AJM.db.teamListStatusWidth >= 90 then - JambaDisplayTeamListFrame.titleName:SetText( L["Jamba Team"] ) - else - JambaDisplayTeamListFrame.titleName:SetText( L["Team"] ) - end -]]-- end local function CanDisplayTeamList() @@ -430,13 +404,13 @@ function AJM:RefreshTeamListControlsShow() AJM.refreshShowTeamListControlsPending = true return end - -- Iterate all the team members. + AJM.totalMembersDisplayed = 0 for index, characterName in JambaApi.TeamListOrdered() do characterName = JambaUtilities:AddRealmToNameIfMissing ( characterName ) -- Is the team member online? if JambaApi.GetCharacterOnlineStatus( characterName ) == true then - -- Yes, the team member is online, draw their status bars. + -- Yes, the team member is online, draw their status bars. AJM:UpdateJambaTeamStatusBar( characterName, AJM.totalMembersDisplayed ) AJM.totalMembersDisplayed = AJM.totalMembersDisplayed + 1 end @@ -458,6 +432,12 @@ function AJM: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["experienceHonorBar"]:SetStatusBarTexture( statusBarTexture ) + characterStatusBar["experienceHonorBar"]:GetStatusBarTexture():SetHorizTile( false ) + characterStatusBar["experienceHonorBar"]:GetStatusBarTexture():SetVertTile( false ) characterStatusBar["reputationBar"]:SetStatusBarTexture( statusBarTexture ) characterStatusBar["reputationBar"]:GetStatusBarTexture():SetHorizTile( false ) characterStatusBar["reputationBar"]:GetStatusBarTexture():SetVertTile( false ) @@ -473,6 +453,22 @@ function AJM:SettingsUpdateStatusBarTexture() end end +function AJM:SettingsUpdateFontStyle() + local textFont = AJM.SharedMedia:Fetch( "font", AJM.db.fontStyle ) + local textSize = AJM.db.fontSize + for characterName, characterStatusBar in pairs( AJM.characterStatusBar ) do + characterStatusBar["followBarText"]:SetFont( textFont , textSize , "OUTLINE") + characterStatusBar["experienceBarText"]:SetFont( textFont , textSize , "OUTLINE") + characterStatusBar["experienceArtBarText"]:SetFont( textFont , textSize , "OUTLINE") + characterStatusBar["experienceHonorBarText"]:SetFont( textFont , textSize , "OUTLINE") + characterStatusBar["reputationBarText"]:SetFont( textFont , textSize , "OUTLINE") + characterStatusBar["healthBarText"]:SetFont( textFont , textSize , "OUTLINE") + characterStatusBar["powerBarText"]:SetFont( textFont , textSize , "OUTLINE") + characterStatusBar["comboBarText"]:SetFont( textFont , textSize , "OUTLINE") + + end +end + function AJM:SettingsUpdateBorderStyle() local borderStyle = AJM.SharedMedia:Fetch( "border", AJM.db.borderStyle ) local backgroundStyle = AJM.SharedMedia:Fetch( "background", AJM.db.backgroundStyle ) @@ -489,6 +485,9 @@ end function AJM:CreateJambaTeamStatusBar( characterName, parentFrame ) local statusBarTexture = AJM.SharedMedia:Fetch( "statusbar", AJM.db.statusBarTexture ) + local textFont = AJM.SharedMedia:Fetch( "font", AJM.db.fontStyle ) + local textSize = AJM.db.fontSize + -- Create the table to hold the status bars for this character. AJM.characterStatusBar[characterName] = {} -- Get the status bars table. @@ -496,9 +495,6 @@ function AJM:CreateJambaTeamStatusBar( characterName, parentFrame ) -- Set the portrait. local portraitName = AJM.globalFramePrefix.."PortraitButton" local portraitButton = CreateFrame( "PlayerModel", portraitName, parentFrame ) - --portraitButton.Texture = portraitButton:CreateTexture( portraitName.."NormalTexture", "ARTWORK" ) - --SetPortraitTexture( portraitButton.Texture, characterName ) - --portraitButton.Texture:SetAllPoints() portraitButton:ClearModel() portraitButton:SetUnit( Ambiguate( characterName, "short" ) ) portraitButton:SetPortraitZoom( 1 ) @@ -508,6 +504,7 @@ function AJM:CreateJambaTeamStatusBar( characterName, parentFrame ) portraitButtonClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) ) characterStatusBar["portraitButton"] = portraitButton characterStatusBar["portraitButtonClick"] = portraitButtonClick +--[[ -- Set the bag information. local bagInformationFrameName = AJM.globalFramePrefix.."BagInformationFrame" local bagInformationFrame = CreateFrame( "Frame", bagInformationFrameName, parentFrame ) @@ -524,25 +521,12 @@ function AJM:CreateJambaTeamStatusBar( characterName, parentFrame ) --bagInformationFrame.durability = 100 characterStatusBar["bagInformationFrame"] = bagInformationFrame characterStatusBar["bagInformationFrameText"] = bagInformationFrameText - --set the ilevel Information. - local ilvlInformationFrameName = AJM.globalFramePrefix.."IlvlInformationFrame" - local ilvlInformationFrame = CreateFrame( "Frame", ilvlInformationFrameName, parentFrame ) - local ilvlInformationFrameText = ilvlInformationFrame:CreateFontString( ilvlInformationFrameName.."Text", "OVERLAY", "GameFontNormal" ) - ilvlInformationFrameText:SetText( "999/999" ) - ilvlInformationFrameText:SetAllPoints() - ilvlInformationFrameText:SetJustifyH( "CENTER" ) - ilvlInformationFrameText:SetJustifyV( "MIDDLE" ) - ilvlInformationFrameText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - ilvlInformationFrame.overall = 999 - ilvlInformationFrame.equipped = 999 - ilvlInformationFrame.characterLevel = 0 - characterStatusBar["ilvlInformationFrame"] = ilvlInformationFrame - characterStatusBar["ilvlInformationFrameText"] = ilvlInformationFrameText +--]] -- Set the follow bar. local followName = AJM.globalFramePrefix.."FollowBar" local followBar = CreateFrame( "StatusBar", followName, parentFrame, "TextStatusBar,SecureActionButtonTemplate" ) followBar.backgroundTexture = followBar:CreateTexture( followName.."BackgroundTexture", "ARTWORK" ) - followBar.backgroundTexture:SetTexture( 0.58, 0.0, 0.55, 0.15 ) + followBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 ) followBar:SetStatusBarTexture( statusBarTexture ) followBar:GetStatusBarTexture():SetHorizTile( false ) followBar:GetStatusBarTexture():SetVertTile( false ) @@ -559,14 +543,27 @@ function AJM:CreateJambaTeamStatusBar( characterName, parentFrame ) characterStatusBar["followBarClick"] = followBarClick local followBarText = followBar:CreateFontString( followName.."Text", "OVERLAY", "GameFontNormal" ) followBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + followBarText:SetFont( textFont , textSize, "OUTLINE") followBarText:SetAllPoints() characterStatusBar["followBarText"] = followBarText - AJM:SettingsUpdateFollowText( characterName, UnitLevel( Ambiguate( characterName, "none" ) ), nil, nil ) + AJM:SettingsUpdateFollowText( characterName ) --, UnitLevel( Ambiguate( characterName, "none" ) ), nil, nil ) + --ToolTip infomation + followBar.FreeBagSpace = 0 + followBar.TotalBagSpace = 8 + followBar.ArgIlvl = 1 + followBar.Durability = 000 + followBar.Gold = 0 + followBar.Mail = "nothing" + followBar.CurrText = "currNothing" + followBar.CharacterLevel = 1 + followBar.MaxCharacterLevel = 100 + followBarClick:SetScript("OnEnter", function(self) AJM:ShowFollowTooltip(followBarClick, followBar, characterName, true) end) + followBarClick:SetScript("OnLeave", function(self) GameTooltip:Hide() end) -- Set the experience bar. local experienceName = AJM.globalFramePrefix.."ExperienceBar" local experienceBar = CreateFrame( "StatusBar", experienceName, parentFrame, "TextStatusBar,SecureActionButtonTemplate" ) experienceBar.backgroundTexture = experienceBar:CreateTexture( experienceName.."BackgroundTexture", "ARTWORK" ) - experienceBar.backgroundTexture:SetTexture( 0.0, 0.39, 0.88, 0.15 ) + experienceBar.backgroundTexture:SetColorTexture( 0.0, 0.39, 0.88, 0.15 ) experienceBar:SetStatusBarTexture( statusBarTexture ) experienceBar:GetStatusBarTexture():SetHorizTile( false ) experienceBar:GetStatusBarTexture():SetVertTile( false ) @@ -580,24 +577,77 @@ function AJM:CreateJambaTeamStatusBar( characterName, parentFrame ) characterStatusBar["experienceBarClick"] = experienceBarClick local experienceBarText = experienceBar:CreateFontString( experienceName.."Text", "OVERLAY", "GameFontNormal" ) experienceBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + experienceBarText:SetFont( textFont , textSize, "OUTLINE") experienceBarText:SetAllPoints() experienceBarText.playerExperience = 100 experienceBarText.playerMaxExperience = 100 experienceBarText.exhaustionStateID = 1 characterStatusBar["experienceBarText"] = experienceBarText - AJM:UpdateExperienceStatus( characterName, nil, nil, nil ) + AJM:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil ) + -- Set the artifactXP bar. + local experienceArtName = AJM.globalFramePrefix.."ExperienceArtBar" + local experienceArtBar = CreateFrame( "StatusBar", experienceArtName, parentFrame, "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.artifactPointsAvailable = 0 + characterStatusBar["experienceArtBarText"] = experienceArtBarText + AJM:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil ) + -- Set the HonorXP bar. + local experienceHonorName = AJM.globalFramePrefix.."ExperienceHonorBar" + local experienceHonorBar = CreateFrame( "StatusBar", experienceHonorName, parentFrame, "TextStatusBar,SecureActionButtonTemplate" ) + experienceHonorBar.backgroundTexture = experienceArtBar:CreateTexture( experienceArtName.."BackgroundTexture", "ARTWORK" ) + experienceHonorBar.backgroundTexture:SetColorTexture( 1.0, 0.0, 0.0, 0.15 ) + experienceHonorBar:SetStatusBarTexture( statusBarTexture ) + experienceHonorBar:GetStatusBarTexture():SetHorizTile( false ) + experienceHonorBar:GetStatusBarTexture():SetVertTile( false ) + experienceHonorBar:SetMinMaxValues( 0, 100 ) + experienceHonorBar:SetValue( 100 ) + experienceHonorBar:SetFrameStrata( "LOW" ) + local experienceHonorBarClick = CreateFrame( "CheckButton", experienceHonorName.."Click", parentFrame, "SecureActionButtonTemplate" ) + experienceHonorBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) ) + experienceHonorBarClick:SetFrameStrata( "MEDIUM" ) + characterStatusBar["experienceHonorBar"] = experienceHonorBar + characterStatusBar["experienceHonorBarClick"] = experienceHonorBarClick + local experienceHonorBarText = experienceHonorBar:CreateFontString( experienceHonorName.."Text", "OVERLAY", "GameFontNormal" ) + experienceHonorBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + experienceHonorBarText:SetFont( textFont , textSize, "OUTLINE") + experienceHonorBarText:SetAllPoints() + experienceHonorBarText.honorLevel = 0 + experienceHonorBarText.honorXP = 0 + experienceHonorBarText.honorMax = 100 + experienceHonorBarText.honorExhaustionStateID = 1 + experienceHonorBarText.canPrestige = "N/A" + characterStatusBar["experienceHonorBarText"] = experienceHonorBarText + AJM:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil ) -- Set the reputation bar. local reputationName = AJM.globalFramePrefix.."ReputationBar" local reputationBar = CreateFrame( "StatusBar", reputationName, parentFrame, "TextStatusBar,SecureActionButtonTemplate" ) reputationBar.backgroundTexture = reputationBar:CreateTexture( reputationName.."BackgroundTexture", "ARTWORK" ) - reputationBar.backgroundTexture:SetTexture( 0.0, 0.39, 0.88, 0.15 ) + reputationBar.backgroundTexture:SetColorTexture( 0.0, 0.39, 0.88, 0.15 ) reputationBar:SetStatusBarTexture( statusBarTexture ) reputationBar:GetStatusBarTexture():SetHorizTile( false ) reputationBar:GetStatusBarTexture():SetVertTile( false ) reputationBar:SetMinMaxValues( 0, 100 ) reputationBar:SetValue( 100 ) reputationBar:SetFrameStrata( "LOW" ) - reputationBar:SetAlpha( 1 ) local reputationBarClick = CreateFrame( "CheckButton", reputationName.."Click", parentFrame, "SecureActionButtonTemplate" ) reputationBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) ) reputationBarClick:SetFrameStrata( "MEDIUM" ) @@ -605,6 +655,7 @@ function AJM:CreateJambaTeamStatusBar( characterName, parentFrame ) characterStatusBar["reputationBarClick"] = reputationBarClick local reputationBarText = reputationBar:CreateFontString( reputationName.."Text", "OVERLAY", "GameFontNormal" ) reputationBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + reputationBarText:SetFont( textFont , textSize, "OUTLINE") reputationBarText:SetAllPoints() reputationBarText.reputationName = "Faction" reputationBarText.reputationStandingID = 4 @@ -617,7 +668,7 @@ function AJM:CreateJambaTeamStatusBar( characterName, parentFrame ) local healthName = AJM.globalFramePrefix.."HealthBar" local healthBar = CreateFrame( "StatusBar", healthName, parentFrame, "TextStatusBar,SecureActionButtonTemplate" ) healthBar.backgroundTexture = healthBar:CreateTexture( healthName.."BackgroundTexture", "ARTWORK" ) - healthBar.backgroundTexture:SetTexture( 0.58, 0.0, 0.55, 0.15 ) + healthBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 ) healthBar:SetStatusBarTexture( statusBarTexture ) healthBar:GetStatusBarTexture():SetHorizTile( false ) healthBar:GetStatusBarTexture():SetVertTile( false ) @@ -632,6 +683,7 @@ function AJM:CreateJambaTeamStatusBar( characterName, parentFrame ) characterStatusBar["healthBarClick"] = healthBarClick local healthBarText = healthBar:CreateFontString( healthName.."Text", "OVERLAY", "GameFontNormal" ) healthBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + healthBarText:SetFont( textFont , textSize, "OUTLINE") healthBarText:SetAllPoints() healthBarText.playerHealth = 100 healthBarText.playerMaxHealth = 100 @@ -641,7 +693,7 @@ function AJM:CreateJambaTeamStatusBar( characterName, parentFrame ) local powerName = AJM.globalFramePrefix.."PowerBar" local powerBar = CreateFrame( "StatusBar", powerName, parentFrame, "TextStatusBar,SecureActionButtonTemplate" ) powerBar.backgroundTexture = powerBar:CreateTexture( powerName.."BackgroundTexture", "ARTWORK" ) - powerBar.backgroundTexture:SetTexture( 0.58, 0.0, 0.55, 0.15 ) + powerBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 ) powerBar:SetStatusBarTexture( statusBarTexture ) powerBar:GetStatusBarTexture():SetHorizTile( false ) powerBar:GetStatusBarTexture():SetVertTile( false ) @@ -656,6 +708,7 @@ function AJM:CreateJambaTeamStatusBar( characterName, parentFrame ) characterStatusBar["powerBarClick"] = powerBarClick local powerBarText = powerBar:CreateFontString( powerName.."Text", "OVERLAY", "GameFontNormal" ) powerBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) + powerBarText:SetFont( textFont , textSize, "OUTLINE") powerBarText:SetAllPoints() powerBarText.playerPower = 100 powerBarText.playerMaxPower = 100 @@ -665,7 +718,7 @@ function AJM:CreateJambaTeamStatusBar( characterName, parentFrame ) local comboName = AJM.globalFramePrefix.."ComboBar" local comboBar = CreateFrame( "StatusBar", comboName, parentFrame, "TextStatusBar,SecureActionButtonTemplate" ) comboBar.backgroundTexture = comboBar:CreateTexture( comboName.."BackgroundTexture", "ARTWORK" ) - comboBar.backgroundTexture:SetTexture( 0.58, 0.0, 0.55, 0.15 ) + comboBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 ) comboBar:SetStatusBarTexture( statusBarTexture ) comboBar:GetStatusBarTexture():SetHorizTile( false ) comboBar:GetStatusBarTexture():SetVertTile( false ) @@ -681,6 +734,7 @@ function AJM:CreateJambaTeamStatusBar( characterName, parentFrame ) characterStatusBar["comboBarClick"] = comboBarClick local comboBarText = comboBar:CreateFontString( comboName.."Text", "OVERLAY", "GameFontNormal" ) comboBarText:SetTextColor( 1.00, 1.00, 0.0, 1.00 ) + comboBarText:SetFont( textFont , textSize, "OUTLINE") comboBarText:SetAllPoints() comboBarText.playerCombo = 0 comboBarText.playerMaxCombo = 5 @@ -709,6 +763,60 @@ function AJM:CreateJambaTeamStatusBar( characterName, parentFrame ) end end + + +function AJM:ShowFollowTooltip( frame, followBar, characterName, canShow ) + --AJM:Print("test", frame, characterName, canShow) + AJM:JambaRequestUpdate() + --Tooltip + if canShow then + if AJM.db.showToolTipInfo == true then + local combat = UnitAffectingCombat("player") + if combat == false then + --AJM:Print("CanShow") + --followBarClick:SetScript("OnEnter", function(self) + GameTooltip:SetOwner(frame, "ANCHOR_TOP") + if AJM.db.followStatusShowName == true then + GameTooltip:AddLine(L["Toon Information"], 1, 0.82, 0, 1) + else + GameTooltip:AddLine(Ambiguate( characterName, "none" ), 1, 0.82, 0, 1) + end + --level of player if not max. + if followBar.CharacterLevel == followBar.MaxCharacterLevel then + GameTooltip:AddLine(L["Player Level:"]..L[" "]..L["("]..tostring (format("%.0f", followBar.CharacterLevel ))..L[")"],1,1,1,1) + end + -- Item Level of player + GameTooltip:AddLine(L["Item Level:"]..L[" "]..L["("]..tostring (format("%.0f", followBar.ArgIlvl ))..L[")"],1,1,1,1) + -- Bag Space + GameTooltip:AddLine(" ",1,1,1,1) + GameTooltip:AddLine(L["Bag Space:"]..L[" "]..L["("]..tostring(followBar.FreeBagSpace).."/"..tostring( followBar.TotalBagSpace)..L[")"],1,1,1,1) + -- Durability + GameTooltip:AddLine(L["Durability:"]..L[" "]..L["("]..tostring(gsub( followBar.Durability , "%.[^|]+", "") )..L["%"]..L[")"],1,1,1,1) + -- Gold + GameTooltip:AddLine(" ",1,1,1,1) + GameTooltip:AddLine(L["Gold:"]..L[" "]..GetCoinTextureString( followBar.Gold ),1,1,1,1) + --AJM:Print("mail", ilvlInformationFrame.toolText, "Curr", ilvlInformationFrame.currText) + -- Shows if has Ingame Mail + if not (followBar.Mail == "nothing") then + GameTooltip:AddLine(" ",1,1,1,1) + GameTooltip:AddLine(L["Has New Mail From:"], 1, 0.82, 0, 1) + GameTooltip:AddLine( followBar.Mail,1,1,1,1) + end + GameTooltip:Show() + else + GameTooltip:Hide() + end + end + else + GameTooltip:Hide() + end +end + + + + + + function AJM:HideJambaTeamStatusBar( characterName ) local parentFrame = JambaDisplayTeamListFrame -- Get (or create and get) the character status bar information. @@ -720,12 +828,15 @@ function AJM:HideJambaTeamStatusBar( characterName ) -- Hide the bars. characterStatusBar["portraitButton"]:Hide() characterStatusBar["portraitButtonClick"]:Hide() - characterStatusBar["bagInformationFrame"]:Hide() - characterStatusBar["ilvlInformationFrame"]:Hide() +-- characterStatusBar["bagInformationFrame"]:Hide() characterStatusBar["followBar"]:Hide() characterStatusBar["followBarClick"]:Hide() characterStatusBar["experienceBar"]:Hide() characterStatusBar["experienceBarClick"]:Hide() + characterStatusBar["experienceArtBar"]:Hide() + characterStatusBar["experienceArtBarClick"]:Hide() + characterStatusBar["experienceHonorBar"]:Hide() + characterStatusBar["experienceHonorBarClick"]:Hide() characterStatusBar["reputationBar"]:Hide() characterStatusBar["reputationBarClick"]:Hide() characterStatusBar["healthBar"]:Hide() @@ -734,7 +845,8 @@ function AJM:HideJambaTeamStatusBar( characterName ) characterStatusBar["powerBarClick"]:Hide() characterStatusBar["comboBar"]:Hide() characterStatusBar["comboBarClick"]:Hide() -end +end + function AJM:UpdateJambaTeamStatusBar( characterName, characterPosition ) local parentFrame = JambaDisplayTeamListFrame @@ -749,8 +861,62 @@ function AJM:UpdateJambaTeamStatusBar( characterName, characterPosition ) local characterWidth = GetCharacterWidth() local positionLeft = 0 local positionTop = -AJM.db.teamListTitleHeight - (AJM.db.teamListVerticalSpacing * 2) + local charactersPerRow = AJM.db.charactersPerRow if AJM.db.teamListHorizontal == true then - positionLeft = -6 + (characterPosition * characterWidth) + (AJM.db.teamListHorizontalSpacing * 3) + if characterPosition < charactersPerRow then + positionLeft = -6 + (characterPosition * characterWidth) + (AJM.db.teamListHorizontalSpacing * 3) + parentFrame:SetWidth( (AJM.db.teamListVerticalSpacing * 3) + (GetCharacterWidth() ) + ( positionLeft ) ) + parentFrame:SetHeight( AJM.db.teamListTitleHeight + (AJM.db.teamListVerticalSpacing * 3) + GetCharacterHeight() ) + -- Row 2 + elseif characterPosition < ( charactersPerRow * 2 ) then + positionLeft = -6 + (characterPosition - charactersPerRow ) * ( characterWidth ) + (AJM.db.teamListHorizontalSpacing * 3) + positionTop = (positionTop - characterHeight) + parentFrame:SetHeight( AJM.db.teamListTitleHeight + (AJM.db.teamListVerticalSpacing * 3) + ( GetCharacterHeight() ) * 2 ) + -- Row 3 + elseif characterPosition < ( charactersPerRow * 3 ) then + positionLeft = -6 + (characterPosition - charactersPerRow * 2 ) * ( characterWidth ) + (AJM.db.teamListHorizontalSpacing * 3) + positionTop = (positionTop - characterHeight * 2 ) + parentFrame:SetHeight( AJM.db.teamListTitleHeight + (AJM.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 3 ) + -- Row 4 + elseif characterPosition < ( charactersPerRow * 4 ) then + positionLeft = -6 + (characterPosition - charactersPerRow * 3 ) * ( characterWidth ) + (AJM.db.teamListHorizontalSpacing * 3) + positionTop = (positionTop - characterHeight * 3 ) + parentFrame:SetHeight( AJM.db.teamListTitleHeight + (AJM.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 4 ) + -- Row 5 + elseif characterPosition < ( charactersPerRow * 5 ) then + positionLeft = -6 + (characterPosition - charactersPerRow * 4 ) * ( characterWidth ) + (AJM.db.teamListHorizontalSpacing * 3) + positionTop = (positionTop - characterHeight * 4 ) + parentFrame:SetHeight( AJM.db.teamListTitleHeight + (AJM.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 5) + -- Row 6 + elseif characterPosition < ( charactersPerRow * 6 ) then + positionLeft = -6 + (characterPosition - charactersPerRow * 5 ) * ( characterWidth ) + (AJM.db.teamListHorizontalSpacing * 3) + positionTop = (positionTop - characterHeight * 5 ) + parentFrame:SetHeight( AJM.db.teamListTitleHeight + (AJM.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 6 ) + --Row 7 + elseif characterPosition < ( charactersPerRow * 7 ) then + positionLeft = -6 + (characterPosition - charactersPerRow * 6 ) * ( characterWidth ) + (AJM.db.teamListHorizontalSpacing * 3) + positionTop = (positionTop - characterHeight * 6 ) + parentFrame:SetHeight( AJM.db.teamListTitleHeight + (AJM.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 7 ) + --Row 8 + elseif characterPosition < ( charactersPerRow * 8 ) then + positionLeft = -6 + (characterPosition - charactersPerRow * 7 ) * ( characterWidth ) + (AJM.db.teamListHorizontalSpacing * 3) + positionTop = (positionTop - characterHeight * 7 ) + parentFrame:SetHeight( AJM.db.teamListTitleHeight + (AJM.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 8 ) + --Row 9 + elseif characterPosition < ( charactersPerRow * 9 ) then + positionLeft = -6 + (characterPosition - charactersPerRow * 8 ) * ( characterWidth ) + (AJM.db.teamListHorizontalSpacing * 3) + positionTop = (positionTop - characterHeight * 8 ) + parentFrame:SetHeight( AJM.db.teamListTitleHeight + (AJM.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 9 ) + --Row 10 + elseif characterPosition < ( charactersPerRow * 10 ) then + positionLeft = -6 + (characterPosition - charactersPerRow * 9 ) * ( characterWidth ) + (AJM.db.teamListHorizontalSpacing * 3) + positionTop = (positionTop - characterHeight * 9 ) + parentFrame:SetHeight( AJM.db.teamListTitleHeight + (AJM.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 10 ) + else + return + end + --Old code kept for Legacy Purpose + --positionLeft = -6 + (characterPosition * characterWidth) + (AJM.db.teamListHorizontalSpacing * 3) else positionLeft = 6 positionTop = positionTop - (characterPosition * characterHeight) @@ -803,47 +969,164 @@ function AJM:UpdateJambaTeamStatusBar( characterName, characterPosition ) end -- Display the experience bar. local experienceBar = characterStatusBar["experienceBar"] - local experienceBarClick = characterStatusBar["experienceBarClick"] + local experienceBarClick = characterStatusBar["experienceBarClick"] + local experienceArtBar = characterStatusBar["experienceArtBar"] + local experienceArtBarClick = characterStatusBar["experienceArtBarClick"] + local experienceHonorBar = characterStatusBar["experienceHonorBar"] + local experienceHonorBarClick = characterStatusBar["experienceHonorBarClick"] + local reputationBar = characterStatusBar["reputationBar"] + local reputationBarClick = characterStatusBar["reputationBarClick"] if AJM.db.showExperienceStatus == true then - experienceBar.backgroundTexture:SetAllPoints() - experienceBar:SetWidth( AJM.db.experienceStatusWidth ) - experienceBar:SetHeight( AJM.db.experienceStatusHeight ) - experienceBar:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop ) - experienceBarClick:SetWidth( AJM.db.experienceStatusWidth ) - experienceBarClick:SetHeight( AJM.db.experienceStatusHeight ) - experienceBarClick:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop ) - experienceBar:Show() - experienceBarClick:Show() + --AJM:Print("TestLevel", characterName, level, maxLevel, xpDisabled, showXP, showArtifact ) + local showBarCount = 0 + if AJM.db.showXpStatus == true then + showBarCount = showBarCount + 1 + showBeforeBar = parentFrame + showXP = true + end + if AJM.db.showArtifactStatus == true then + --AJM:Print("ShowArtifact") + showBarCount = showBarCount + 1 + if AJM.db.showXpStatus == true then + showArtBeforeBar = experienceBar + setArtPoint = "BOTTOMLEFT" + setArtLeft = 0 + setArtTop = -1 + else + showArtBeforeBar = parentFrame + setArtPoint = "TOPLEFT" + setArtLeft = positionLeft + setArtTop = positionTop + end + end + if AJM.db.showHonorStatus == true then + --AJM:Print("ShowHonorXP") + showBarCount = showBarCount + 1 + if AJM.db.showXpStatus == true and AJM.db.showArtifactStatus == false then + showHonorBeforeBar = experienceBar + setHonorPoint = "BOTTOMLEFT" + setHonorLeft = 0 + setHonorTop = -1 + elseif AJM.db.showArtifactStatus == true then + showHonorBeforeBar = experienceArtBar + setHonorPoint = "BOTTOMLEFT" + setHonorLeft = 0 + setHonorTop = -1 + else + showHonorBeforeBar = parentFrame + setHonorPoint = "TOPLEFT" + setHonorLeft = positionLeft + setHonorTop = positionTop + end + end + if AJM.db.showRepStatus == true then + --AJM:Print("Show Reputation") + showBarCount = showBarCount + 1 + if AJM.db.showXpStatus == true and AJM.db.showArtifactStatus == false and AJM.db.showHonorStatus == false then + --AJM:Print("Show Reputation 1") + showRepBeforeBar = experienceBar + setRepPoint = "BOTTOMLEFT" + setRepLeft = 0 + setRepTop = -1 + elseif AJM.db.showArtifactStatus == true and AJM.db.showHonorStatus == false then + --AJM:Print("Show Reputation 2") + showRepBeforeBar = experienceArtBar + setRepPoint = "BOTTOMLEFT" + setRepLeft = 0 + setRepTop = -1 + elseif AJM.db.showHonorStatus == true then + --AJM:Print("Show Reputation 3") + showRepBeforeBar = experienceHonorBar + setRepPoint = "BOTTOMLEFT" + setRepLeft = 0 + setRepTop = -1 + + else + --AJM:Print("Show Reputation 4") + showRepBeforeBar = parentFrame + setRepPoint = "TOPLEFT" + setRepLeft = positionLeft + setRepTop = positionTop + end + end + if showBarCount < 1 then + showBarCount = showBarCount + 1 + end + --AJM:Print("showBarCountTest", showBarCount) + --Xp Bar + experienceBar.backgroundTexture:SetAllPoints() + experienceBar:SetWidth( AJM.db.experienceStatusWidth ) + experienceBar:SetHeight( AJM.db.experienceStatusHeight / showBarCount ) + experienceBar:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft , positionTop ) + experienceBarClick:SetWidth( AJM.db.experienceStatusWidth ) + experienceBarClick:SetHeight( AJM.db.experienceStatusHeight / showBarCount ) + experienceBarClick:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop ) + if AJM.db.showXpStatus == true then + experienceBar:Show() + experienceBarClick:Show() + else + experienceBar:Hide() + experienceBarClick:Hide() + end + --Artifact Bar + experienceArtBar.backgroundTexture:SetAllPoints() + experienceArtBar:SetWidth( AJM.db.experienceStatusWidth ) + experienceArtBar:SetHeight( AJM.db.experienceStatusHeight / showBarCount ) + experienceArtBar:SetPoint( "TOPLEFT", showArtBeforeBar, setArtPoint, setArtLeft , setArtTop ) + experienceArtBarClick:SetPoint( "TOPLEFT", showArtBeforeBar, setArtPoint, setArtLeft , setArtTop ) + experienceArtBarClick:SetWidth( AJM.db.experienceStatusWidth ) + experienceArtBarClick:SetHeight( AJM.db.experienceStatusHeight / showBarCount ) + if AJM.db.showArtifactStatus == true then + experienceArtBar:Show() + experienceArtBarClick:Show() + else + experienceArtBar:Hide() + experienceArtBarClick:Hide() + end + -- Honor + experienceHonorBar.backgroundTexture:SetAllPoints() + experienceHonorBar:SetWidth( AJM.db.experienceStatusWidth ) + experienceHonorBar:SetHeight( AJM.db.experienceStatusHeight / showBarCount ) + experienceHonorBar:SetPoint( "TOPLEFT", showHonorBeforeBar , setHonorPoint, setHonorLeft, setHonorTop ) + experienceHonorBarClick:SetPoint( "TOPLEFT", showHonorBeforeBar , setHonorPoint, setHonorLeft, setHonorTop ) + experienceHonorBarClick:SetWidth( AJM.db.experienceStatusWidth ) + experienceHonorBarClick:SetHeight( AJM.db.experienceStatusHeight / showBarCount ) + if AJM.db.showHonorStatus == true then + experienceHonorBar:Show() + experienceHonorBarClick:Show() + else + experienceHonorBar:Hide() + experienceHonorBarClick:Hide() + end + --rep + reputationBar.backgroundTexture:SetAllPoints() + reputationBar:SetWidth( AJM.db.experienceStatusWidth ) + reputationBar:SetHeight( AJM.db.experienceStatusHeight / showBarCount ) + reputationBar:SetPoint( "TOPLEFT", showRepBeforeBar , setRepPoint, setRepLeft, setRepTop ) + reputationBarClick:SetPoint( "TOPLEFT", showRepBeforeBar , setRepPoint, setRepLeft, setRepTop ) + reputationBarClick:SetWidth( AJM.db.experienceStatusWidth ) + reputationBarClick:SetHeight( AJM.db.experienceStatusHeight / showBarCount ) + if AJM.db.showRepStatus == true then + reputationBar:Show() + reputationBarClick:Show() + else + reputationBar:Hide() + reputationBarClick:Hide() + end + if AJM.db.barsAreStackedVertically == true then positionTop = positionTop - AJM.db.experienceStatusHeight - AJM.db.barVerticalSpacing else positionLeft = positionLeft + AJM.db.experienceStatusWidth + AJM.db.teamListHorizontalSpacing end + else experienceBar:Hide() experienceBarClick:Hide() - end - -- Display the reputation bar. - local reputationBar = characterStatusBar["reputationBar"] - local reputationBarClick = characterStatusBar["reputationBarClick"] - if AJM.db.showReputationStatus == true then - reputationBar.backgroundTexture:SetAllPoints() - reputationBar:SetWidth( AJM.db.reputationStatusWidth ) - reputationBar:SetHeight( AJM.db.reputationStatusHeight ) - reputationBar:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop ) - reputationBarClick:SetWidth( AJM.db.reputationStatusWidth ) - reputationBarClick:SetHeight( AJM.db.reputationStatusHeight ) - reputationBarClick:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop ) - reputationBar:Show() - reputationBarClick:Show() - if AJM.db.barsAreStackedVertically == true then - positionTop = positionTop - AJM.db.reputationStatusHeight - AJM.db.barVerticalSpacing - else - positionLeft = positionLeft + AJM.db.reputationStatusWidth + AJM.db.teamListHorizontalSpacing - end - else - reputationBar:Hide() - reputationBarClick:Hide() + experienceArtBar:Hide() + experienceArtBarClick:Hide() + experienceHonorBar:Hide() + experienceHonorBarClick:Hide() end -- Display the health bar. local healthBar = characterStatusBar["healthBar"] @@ -911,40 +1194,6 @@ function AJM:UpdateJambaTeamStatusBar( characterName, characterPosition ) comboBar:Hide() comboBarClick:Hide() end - -- Display the bag information - local bagInformationFrame = characterStatusBar["bagInformationFrame"] - local bagInformationFrameText = characterStatusBar["bagInformationFrameText"] - if AJM.db.showBagInformation == true then - bagInformationFrame:SetWidth( AJM.db.bagInformationWidth ) - bagInformationFrame:SetHeight( AJM.db.bagInformationHeight ) - bagInformationFrame:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop ) - bagInformationFrame:Show() - if AJM.db.barsAreStackedVertically == true then - positionTop = positionTop - AJM.db.bagInformationHeight - AJM.db.barVerticalSpacing - else - positionLeft = positionLeft + AJM.db.bagInformationWidth + AJM.db.teamListHorizontalSpacing - end - else - bagInformationFrame:Hide() - end - --[[ - -- Display the ilevel information - local ilvlInformationFrame = characterStatusBar["ilvlInformationFrame"] - local ilvlInformationFrameText = characterStatusBar["ilvlInformationFrameText"] - if AJM.db.showIlvlInformation == true then - ilvlInformationFrame:SetWidth( AJM.db.ilvlInformationWidth ) - ilvlInformationFrame:SetHeight( AJM.db.ilvlInformationHeight ) - ilvlInformationFrame:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop ) - ilvlInformationFrame:Show() - if AJM.db.barsAreStackedVertically == true then - positionTop = positionTop - AJM.db.ilvlInformationHeight - AJM.db.barVerticalSpacing - else - positionLeft = positionLeft + AJM.db.ilvlInformationWidth + AJM.db.teamListHorizontalSpacing - end - else - ilvlInformationFrame:Hide() - end - --]] end ------------------------------------------------------------------------------------------------------------- @@ -978,7 +1227,8 @@ local function SettingsCreateDisplayOptions( top ) left, movingTop, L["Show Team List"], - AJM.SettingsToggleShowTeamList + AJM.SettingsToggleShowTeamList, + L["Show Jamba Team or Unit Frame List"] ) movingTop = movingTop - checkBoxHeight - verticalSpacing AJM.settingsControl.displayOptionsCheckBoxShowTeamListOnlyOnMaster = JambaHelperSettings:CreateCheckBox( @@ -987,7 +1237,8 @@ local function SettingsCreateDisplayOptions( top ) left, movingTop, L["Only On Master"], - AJM.SettingsToggleShowTeamListOnMasterOnly + AJM.SettingsToggleShowTeamListOnMasterOnly, + L["Only Show on Master Character"] ) movingTop = movingTop - checkBoxHeight - verticalSpacing AJM.settingsControl.displayOptionsCheckBoxHideTeamListInCombat = JambaHelperSettings:CreateCheckBox( @@ -996,7 +1247,8 @@ local function SettingsCreateDisplayOptions( top ) left, movingTop, L["Hide Team List In Combat"], - AJM.SettingsToggleHideTeamListInCombat + AJM.SettingsToggleHideTeamListInCombat, + L["Olny Show The Team List out of Combat"] ) movingTop = movingTop - checkBoxHeight - verticalSpacing AJM.settingsControl.displayOptionsCheckBoxEnableClique = JambaHelperSettings:CreateCheckBox( @@ -1004,44 +1256,62 @@ local function SettingsCreateDisplayOptions( top ) headingWidth, left, movingTop, - L["Enable Clique Support - **reload UI to take effect**"], - AJM.SettingsToggleEnableClique + L["Enable Clique Support"], + AJM.SettingsToggleEnableClique, + L["Enable Clique Support\n\n**reload UI to take effect**"] ) movingTop = movingTop - checkBoxHeight - verticalSpacing -- Create appearance & layout. JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Appearance & Layout"], movingTop, true ) movingTop = movingTop - headingHeight - AJM.settingsControl.displayOptionsCheckBoxStackVertically = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl.displayOptionsCheckBoxShowListTitle = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, - headingWidth, + halfWidthSlider, left, movingTop, - L["Stack Bars Vertically"], - AJM.SettingsToggleStackVertically + L["Show Title"], + AJM.SettingsToggleShowTeamListTitle, + L["Show Team List Title"] ) movingTop = movingTop - checkBoxHeight - verticalSpacing - AJM.settingsControl.displayOptionsCheckBoxTeamHorizontal = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl.displayOptionsCharactersPerBar = JambaHelperSettings:CreateSlider( + AJM.settingsControl, + halfWidthSlider, + left, + movingTop, + L["Characters Per Bar"] + ) + AJM.settingsControl.displayOptionsCharactersPerBar:SetSliderValues( 1, 10, 1 ) + AJM.settingsControl.displayOptionsCharactersPerBar:SetCallback( "OnValueChanged", AJM.SettingsChangeCharactersPerBar ) + --movingTop = movingTop - sliderHeight - sectionSpacing + +--[[ AJM.settingsControl.displayOptionsCheckBoxStackVertically = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, headingWidth, left, movingTop, - L["Display Team List Horizontally"], - AJM.SettingsToggleTeamHorizontal + L["Stack Bars Vertically"], + AJM.SettingsToggleStackVertically, + L["Stack Bars Vertically"] ) movingTop = movingTop - checkBoxHeight - verticalSpacing - AJM.settingsControl.displayOptionsCheckBoxShowListTitle = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl.displayOptionsCheckBoxTeamHorizontal = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, headingWidth, left, movingTop, - L["Show Team List Title"], - AJM.SettingsToggleShowTeamListTitle + L["Display Team List Horizontally"], + AJM.SettingsToggleTeamHorizontal, + L["Display Team List Horizontally"] ) movingTop = movingTop - checkBoxHeight - verticalSpacing +]] + + --movingTop = movingTop - checkBoxHeight - verticalSpacing AJM.settingsControl.displayOptionsTeamListScaleSlider = JambaHelperSettings:CreateSlider( AJM.settingsControl, - headingWidth, - left, + halfWidthSlider, + column2left, movingTop, L["Scale"] ) @@ -1050,7 +1320,7 @@ local function SettingsCreateDisplayOptions( top ) movingTop = movingTop - sliderHeight - verticalSpacing AJM.settingsControl.displayOptionsTeamListTransparencySlider = JambaHelperSettings:CreateSlider( AJM.settingsControl, - headingWidth, + halfWidthSlider, left, movingTop, L["Transparency"] @@ -1102,6 +1372,25 @@ local function SettingsCreateDisplayOptions( top ) ) AJM.settingsControl.displayOptionsBackgroundColourPicker:SetHasAlpha( true ) AJM.settingsControl.displayOptionsBackgroundColourPicker:SetCallback( "OnValueConfirmed", AJM.SettingsBackgroundColourPickerChanged ) + --Set the font + movingTop = movingTop - mediaHeight - verticalSpacing + AJM.settingsControl.displayOptionsTeamListMediaFont = JambaHelperSettings:CreateMediaFont( + AJM.settingsControl, + halfWidthSlider, + left, + movingTop, + L["Font"] + ) + AJM.settingsControl.displayOptionsTeamListMediaFont:SetCallback( "OnValueChanged", AJM.SettingsChangeFontStyle ) + AJM.settingsControl.displayOptionsSetFontSize = JambaHelperSettings:CreateSlider( + AJM.settingsControl, + halfWidthSlider, + column2left, + movingTop, + L["Font Size"] + ) + AJM.settingsControl.displayOptionsSetFontSize:SetSliderValues( 8, 20 , 1 ) + AJM.settingsControl.displayOptionsSetFontSize:SetCallback( "OnValueChanged", AJM.SettingsChangeFontSize ) movingTop = movingTop - mediaHeight - sectionSpacing -- Create portrait. JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Portrait"], movingTop, true ) @@ -1112,7 +1401,8 @@ local function SettingsCreateDisplayOptions( top ) left, movingTop, L["Show"], - AJM.SettingsToggleShowPortrait + AJM.SettingsToggleShowPortrait, + L["Show the Character Portrait"] ) movingTop = movingTop - checkBoxHeight - verticalSpacing AJM.settingsControl.displayOptionsPortraitWidthSlider = JambaHelperSettings:CreateSlider( @@ -1122,7 +1412,7 @@ local function SettingsCreateDisplayOptions( top ) movingTop, L["Width"] ) - AJM.settingsControl.displayOptionsPortraitWidthSlider:SetSliderValues( 5, 200, 1 ) + AJM.settingsControl.displayOptionsPortraitWidthSlider:SetSliderValues( 15, 300, 1 ) AJM.settingsControl.displayOptionsPortraitWidthSlider:SetCallback( "OnValueChanged", AJM.SettingsChangePortraitWidth ) movingTop = movingTop - sliderHeight - sectionSpacing -- Create follow status. @@ -1134,7 +1424,8 @@ local function SettingsCreateDisplayOptions( top ) left, movingTop, L["Show"], - AJM.SettingsToggleShowFollowStatus + AJM.SettingsToggleShowFollowStatus, + L["Show the Follow Bar and Character Name\n\nHover Over for Character Infomation"] ) AJM.settingsControl.displayOptionsCheckBoxShowFollowStatusName = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -1142,41 +1433,30 @@ local function SettingsCreateDisplayOptions( top ) left2, movingTop, L["Name"], - AJM.SettingsToggleShowFollowStatusName + AJM.SettingsToggleShowFollowStatusName, + L["Show Character Name"] ) - AJM.settingsControl.displayOptionsCheckBoxstackName = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl.displayOptionsCheckBoxShowToolTipInfo = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, thirdWidth, left3, movingTop, - L["Stack Text"], - AJM.SettingsTogglestackName - ) + L["Show ToolTip"], + AJM.SettingsToggleShowToolTipInfo, + L["Show ToolTip Information"] + ) +--[[ movingTop = movingTop - checkBoxHeight - verticalSpacing - AJM.settingsControl.displayOptionsCheckBoxShowFollowStatusLevel = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl.displayOptionsCheckBoxShowEquippedOnly = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, thirdWidth, left, movingTop, - L["Level"], - AJM.SettingsToggleShowFollowStatusLevel - ) - AJM.settingsControl.displayOptionsCheckBoxShowIlvlInformation = JambaHelperSettings:CreateCheckBox( - AJM.settingsControl, - thirdWidth, - left2, - movingTop, - L["Show Item Level"], - AJM.SettingsToggleShowIlvlInformation - ) - AJM.settingsControl.displayOptionsCheckBoxShowEquippedOnly = JambaHelperSettings:CreateCheckBox( - AJM.settingsControl, - thirdWidth + thirdWidth, - left3, - movingTop, L["Equipped iLvl Only"], - AJM.SettingsToggleShowEquippedOnly + AJM.SettingsToggleShowEquippedOnly, + L["Olny shows Equipped item Level"] ) +--]] movingTop = movingTop - checkBoxHeight - verticalSpacing AJM.settingsControl.displayOptionsFollowStatusWidthSlider = JambaHelperSettings:CreateSlider( AJM.settingsControl, @@ -1185,7 +1465,7 @@ local function SettingsCreateDisplayOptions( top ) movingTop, L["Width"] ) - AJM.settingsControl.displayOptionsFollowStatusWidthSlider:SetSliderValues( 5, 200, 1 ) + AJM.settingsControl.displayOptionsFollowStatusWidthSlider:SetSliderValues( 15, 300, 1 ) AJM.settingsControl.displayOptionsFollowStatusWidthSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeFollowStatusWidth ) AJM.settingsControl.displayOptionsFollowStatusHeightSlider = JambaHelperSettings:CreateSlider( AJM.settingsControl, @@ -1194,11 +1474,11 @@ local function SettingsCreateDisplayOptions( top ) movingTop, L["Height"] ) - AJM.settingsControl.displayOptionsFollowStatusHeightSlider:SetSliderValues( 5, 50, 1 ) + AJM.settingsControl.displayOptionsFollowStatusHeightSlider:SetSliderValues( 15, 100, 1 ) AJM.settingsControl.displayOptionsFollowStatusHeightSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeFollowStatusHeight ) movingTop = movingTop - sliderHeight - sectionSpacing -- Create experience status. - JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Experience Bar"], movingTop, true ) + JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Experience Bars"], movingTop, true ) movingTop = movingTop - headingHeight AJM.settingsControl.displayOptionsCheckBoxShowExperienceStatus = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -1206,7 +1486,8 @@ local function SettingsCreateDisplayOptions( top ) left, movingTop, L["Show"], - AJM.SettingsToggleShowExperienceStatus + AJM.SettingsToggleShowExperienceStatus, + L["Show the Team Experience bar\n\nAnd Artifact XP Bar\nAnd Honor XP Bar\nAnd Reputation Bar\n \nHover Over Bar With Mouse and Shift to Show More Infomation."] ) AJM.settingsControl.displayOptionsCheckBoxShowExperienceStatusValues = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -1214,7 +1495,8 @@ local function SettingsCreateDisplayOptions( top ) left2, movingTop, L["Values"], - AJM.SettingsToggleShowExperienceStatusValues + AJM.SettingsToggleShowExperienceStatusValues, + L["Show Values"] ) AJM.settingsControl.displayOptionsCheckBoxShowExperienceStatusPercentage = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -1222,83 +1504,66 @@ local function SettingsCreateDisplayOptions( top ) left3, movingTop, L["Percentage"], - AJM.SettingsToggleShowExperienceStatusPercentage + AJM.SettingsToggleShowExperienceStatusPercentage, + L["Show Percentage"] ) movingTop = movingTop - checkBoxHeight - verticalSpacing - AJM.settingsControl.displayOptionsExperienceStatusWidthSlider = JambaHelperSettings:CreateSlider( - AJM.settingsControl, - halfWidthSlider, - left, - movingTop, - L["Width"] - ) - AJM.settingsControl.displayOptionsExperienceStatusWidthSlider:SetSliderValues( 5, 200, 1 ) - AJM.settingsControl.displayOptionsExperienceStatusWidthSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeExperienceStatusWidth ) - AJM.settingsControl.displayOptionsExperienceStatusHeightSlider = JambaHelperSettings:CreateSlider( - AJM.settingsControl, - halfWidthSlider, - column2left, - movingTop, - L["Height"] - ) - AJM.settingsControl.displayOptionsExperienceStatusHeightSlider:SetSliderValues( 5, 50, 1 ) - AJM.settingsControl.displayOptionsExperienceStatusHeightSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeExperienceStatusHeight ) - movingTop = movingTop - sliderHeight - sectionSpacing - -- Create reputation status. - JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Reputation Bar"], movingTop, true ) - movingTop = movingTop - headingHeight - AJM.settingsControl.displayOptionsCheckBoxShowReputationStatus = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl.displayOptionsCheckBoxShowXpStatus = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, thirdWidth, left, movingTop, - L["Show"], - AJM.SettingsToggleShowReputationStatus + L["ShowXP"], + AJM.SettingsToggleShowXpStatus, + L["Show the Team Experience bar"] ) - AJM.settingsControl.displayOptionsCheckBoxShowReputationStatusValues = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl.displayOptionsCheckBoxShowArtifactStatus = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, thirdWidth, left2, movingTop, - L["Values"], - AJM.SettingsToggleShowReputationStatusValues - ) - AJM.settingsControl.displayOptionsCheckBoxShowReputationStatusPercentage = JambaHelperSettings:CreateCheckBox( + L["ShowArtifactXP"], + AJM.SettingsToggleShowArtifactStatus, + L["Show the Team Artifact XP bar"] + ) + AJM.settingsControl.displayOptionsCheckBoxShowHonorStatus = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, thirdWidth, left3, movingTop, - L["Percentage"], - AJM.SettingsToggleShowReputationStatusPercentage - ) - movingTop = movingTop - checkBoxHeight - verticalSpacing - AJM.settingsControl.displayOptionsCheckBoxShowReputationName = JambaHelperSettings:CreateCheckBox( + L["ShowHonorXP"], + AJM.SettingsToggleShowHonorStatus, + L["Show the Team Honor XP Bar"] + ) + movingTop = movingTop - checkBoxHeight - verticalSpacing + AJM.settingsControl.displayOptionsCheckBoxShowRepStatus = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, - thirdWidth + thirdWidth, + thirdWidth, left, movingTop, - L["Show Faction Name"], - AJM.SettingsToggleShowReputationName - ) + L["ShowReputation"], + AJM.SettingsToggleShowRepStatus, + L["Show the Team Reputation Bar"] + ) movingTop = movingTop - checkBoxHeight - verticalSpacing - AJM.settingsControl.displayOptionsReputationStatusWidthSlider = JambaHelperSettings:CreateSlider( + AJM.settingsControl.displayOptionsExperienceStatusWidthSlider = JambaHelperSettings:CreateSlider( AJM.settingsControl, halfWidthSlider, left, movingTop, L["Width"] ) - AJM.settingsControl.displayOptionsReputationStatusWidthSlider:SetSliderValues( 5, 400, 1 ) - AJM.settingsControl.displayOptionsReputationStatusWidthSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeReputationStatusWidth ) - AJM.settingsControl.displayOptionsReputationStatusHeightSlider = JambaHelperSettings:CreateSlider( + AJM.settingsControl.displayOptionsExperienceStatusWidthSlider:SetSliderValues( 15, 300, 1 ) + AJM.settingsControl.displayOptionsExperienceStatusWidthSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeExperienceStatusWidth ) + AJM.settingsControl.displayOptionsExperienceStatusHeightSlider = JambaHelperSettings:CreateSlider( AJM.settingsControl, halfWidthSlider, column2left, movingTop, L["Height"] ) - AJM.settingsControl.displayOptionsReputationStatusHeightSlider:SetSliderValues( 5, 50, 1 ) - AJM.settingsControl.displayOptionsReputationStatusHeightSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeReputationStatusHeight ) + AJM.settingsControl.displayOptionsExperienceStatusHeightSlider:SetSliderValues( 15, 100, 1 ) + AJM.settingsControl.displayOptionsExperienceStatusHeightSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeExperienceStatusHeight ) movingTop = movingTop - sliderHeight - sectionSpacing -- Create health status. JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Health Bar"], movingTop, true ) @@ -1309,7 +1574,8 @@ local function SettingsCreateDisplayOptions( top ) left, movingTop, L["Show"], - AJM.SettingsToggleShowHealthStatus + AJM.SettingsToggleShowHealthStatus, + L["Show the Teams Health Bars"] ) AJM.settingsControl.displayOptionsCheckBoxShowHealthStatusValues = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -1317,7 +1583,8 @@ local function SettingsCreateDisplayOptions( top ) left2, movingTop, L["Values"], - AJM.SettingsToggleShowHealthStatusValues + AJM.SettingsToggleShowHealthStatusValues, + L["Show Values"] ) AJM.settingsControl.displayOptionsCheckBoxShowHealthStatusPercentage = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -1325,7 +1592,8 @@ local function SettingsCreateDisplayOptions( top ) left3, movingTop, L["Percentage"], - AJM.SettingsToggleShowHealthStatusPercentage + AJM.SettingsToggleShowHealthStatusPercentage, + L["Show Percentage"] ) movingTop = movingTop - checkBoxHeight - verticalSpacing AJM.settingsControl.displayOptionsHealthStatusWidthSlider = JambaHelperSettings:CreateSlider( @@ -1335,7 +1603,7 @@ local function SettingsCreateDisplayOptions( top ) movingTop, L["Width"] ) - AJM.settingsControl.displayOptionsHealthStatusWidthSlider:SetSliderValues( 5, 200, 1 ) + AJM.settingsControl.displayOptionsHealthStatusWidthSlider:SetSliderValues( 15, 300, 1 ) AJM.settingsControl.displayOptionsHealthStatusWidthSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeHealthStatusWidth ) AJM.settingsControl.displayOptionsHealthStatusHeightSlider = JambaHelperSettings:CreateSlider( AJM.settingsControl, @@ -1344,7 +1612,7 @@ local function SettingsCreateDisplayOptions( top ) movingTop, L["Height"] ) - AJM.settingsControl.displayOptionsHealthStatusHeightSlider:SetSliderValues( 5, 50, 1 ) + AJM.settingsControl.displayOptionsHealthStatusHeightSlider:SetSliderValues( 15, 100, 1 ) AJM.settingsControl.displayOptionsHealthStatusHeightSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeHealthStatusHeight ) movingTop = movingTop - sliderHeight - sectionSpacing -- Create power status. @@ -1356,7 +1624,8 @@ local function SettingsCreateDisplayOptions( top ) left, movingTop, L["Show"], - AJM.SettingsToggleShowPowerStatus + AJM.SettingsToggleShowPowerStatus, + L["Show the Team Power Bar\n\nMana, Rage, Etc..."] ) AJM.settingsControl.displayOptionsCheckBoxShowPowerStatusValues = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -1364,7 +1633,8 @@ local function SettingsCreateDisplayOptions( top ) left2, movingTop, L["Values"], - AJM.SettingsToggleShowPowerStatusValues + AJM.SettingsToggleShowPowerStatusValues, + L["Show Values"] ) AJM.settingsControl.displayOptionsCheckBoxShowPowerStatusPercentage = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -1372,7 +1642,8 @@ local function SettingsCreateDisplayOptions( top ) left3, movingTop, L["Percentage"], - AJM.SettingsToggleShowPowerStatusPercentage + AJM.SettingsToggleShowPowerStatusPercentage, + L["Show Percentage"] ) movingTop = movingTop - checkBoxHeight - verticalSpacing AJM.settingsControl.displayOptionsPowerStatusWidthSlider = JambaHelperSettings:CreateSlider( @@ -1382,7 +1653,7 @@ local function SettingsCreateDisplayOptions( top ) movingTop, L["Width"] ) - AJM.settingsControl.displayOptionsPowerStatusWidthSlider:SetSliderValues( 5, 200, 1 ) + AJM.settingsControl.displayOptionsPowerStatusWidthSlider:SetSliderValues( 15, 300, 1 ) AJM.settingsControl.displayOptionsPowerStatusWidthSlider:SetCallback( "OnValueChanged", AJM.SettingsChangePowerStatusWidth ) AJM.settingsControl.displayOptionsPowerStatusHeightSlider = JambaHelperSettings:CreateSlider( AJM.settingsControl, @@ -1391,11 +1662,11 @@ local function SettingsCreateDisplayOptions( top ) movingTop, L["Height"] ) - AJM.settingsControl.displayOptionsPowerStatusHeightSlider:SetSliderValues( 5, 50, 1 ) + AJM.settingsControl.displayOptionsPowerStatusHeightSlider:SetSliderValues( 10, 100, 1 ) AJM.settingsControl.displayOptionsPowerStatusHeightSlider:SetCallback( "OnValueChanged", AJM.SettingsChangePowerStatusHeight ) movingTop = movingTop - sliderHeight - sectionSpacing -- Create Combo Point status. - JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Combo Point Bar"], movingTop, true ) + JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Class Power Bar"], movingTop, true ) movingTop = movingTop - headingHeight AJM.settingsControl.displayOptionsCheckBoxShowComboStatus = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -1403,7 +1674,8 @@ local function SettingsCreateDisplayOptions( top ) left, movingTop, L["Show"], - AJM.SettingsToggleShowComboStatus + AJM.SettingsToggleShowComboStatus, + L["Show the Teams Class Power Bar\n\nComboPoints\nSoulShards\nHoly Power\nRunes\nArcane Charges\nCHI"] ) AJM.settingsControl.displayOptionsCheckBoxShowComboStatusValues = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -1411,7 +1683,8 @@ local function SettingsCreateDisplayOptions( top ) left2, movingTop, L["Values"], - AJM.SettingsToggleShowComboStatusValues + AJM.SettingsToggleShowComboStatusValues, + L["Show Values"] ) AJM.settingsControl.displayOptionsCheckBoxShowComboStatusPercentage = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -1419,7 +1692,8 @@ local function SettingsCreateDisplayOptions( top ) left3, movingTop, L["Percentage"], - AJM.SettingsToggleShowComboStatusPercentage + AJM.SettingsToggleShowComboStatusPercentage, + L["Show Percentage"] ) movingTop = movingTop - checkBoxHeight - verticalSpacing AJM.settingsControl.displayOptionsComboStatusWidthSlider = JambaHelperSettings:CreateSlider( @@ -1429,7 +1703,7 @@ local function SettingsCreateDisplayOptions( top ) movingTop, L["Width"] ) - AJM.settingsControl.displayOptionsComboStatusWidthSlider:SetSliderValues( 5, 200, 1 ) + AJM.settingsControl.displayOptionsComboStatusWidthSlider:SetSliderValues( 15, 300, 1 ) AJM.settingsControl.displayOptionsComboStatusWidthSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeComboStatusWidth ) AJM.settingsControl.displayOptionsComboStatusHeightSlider = JambaHelperSettings:CreateSlider( AJM.settingsControl, @@ -1438,9 +1712,10 @@ local function SettingsCreateDisplayOptions( top ) movingTop, L["Height"] ) - AJM.settingsControl.displayOptionsComboStatusHeightSlider:SetSliderValues( 5, 50, 1 ) + AJM.settingsControl.displayOptionsComboStatusHeightSlider:SetSliderValues( 10, 100, 1 ) AJM.settingsControl.displayOptionsComboStatusHeightSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeComboStatusHeight ) movingTop = movingTop - sliderHeight - sectionSpacing +--[[ -- Create bag information status. JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Bag Information"], movingTop, true ) movingTop = movingTop - headingHeight @@ -1468,7 +1743,7 @@ local function SettingsCreateDisplayOptions( top ) movingTop, L["Width"] ) - AJM.settingsControl.displayOptionsBagInformationWidthSlider:SetSliderValues( 5, 200, 1 ) + AJM.settingsControl.displayOptionsBagInformationWidthSlider:SetSliderValues( 15, 300, 1 ) AJM.settingsControl.displayOptionsBagInformationWidthSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeBagInformationWidth ) AJM.settingsControl.displayOptionsBagInformationHeightSlider = JambaHelperSettings:CreateSlider( AJM.settingsControl, @@ -1477,50 +1752,10 @@ local function SettingsCreateDisplayOptions( top ) movingTop, L["Height"] ) - AJM.settingsControl.displayOptionsBagInformationHeightSlider:SetSliderValues( 5, 50, 1 ) + AJM.settingsControl.displayOptionsBagInformationHeightSlider:SetSliderValues( 15, 100, 1 ) AJM.settingsControl.displayOptionsBagInformationHeightSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeBagInformationHeight ) movingTop = movingTop - sliderHeight - verticalSpacing - --[[ - -- Create Ilvl information status. - JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Players Item Level Information"], movingTop, true ) - movingTop = movingTop - headingHeight - AJM.settingsControl.displayOptionsCheckBoxShowIlvlInformation = JambaHelperSettings:CreateCheckBox( - AJM.settingsControl, - thirdWidth, - left, - movingTop, - L["Show"], - AJM.SettingsToggleShowIlvlInformation - ) - AJM.settingsControl.displayOptionsCheckBoxShowEquippedOnly = JambaHelperSettings:CreateCheckBox( - AJM.settingsControl, - thirdWidth + thirdWidth, - left2, - movingTop, - L["Only Show Equipped Item Level Only"], - AJM.SettingsToggleShowEquippedOnly - ) - movingTop = movingTop - checkBoxHeight - verticalSpacing - AJM.settingsControl.displayOptionsIlvlInformationWidthSlider = JambaHelperSettings:CreateSlider( - AJM.settingsControl, - halfWidthSlider, - left, - movingTop, - L["Width"] - ) - AJM.settingsControl.displayOptionsIlvlInformationWidthSlider:SetSliderValues( 5, 200, 1 ) - AJM.settingsControl.displayOptionsIlvlInformationWidthSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeIlvlInformationWidth ) - AJM.settingsControl.displayOptionsIlvlInformationHeightSlider = JambaHelperSettings:CreateSlider( - AJM.settingsControl, - halfWidthSlider, - column2left, - movingTop, - L["Height"] - ) - AJM.settingsControl.displayOptionsIlvlInformationHeightSlider:SetSliderValues( 5, 50, 1 ) - AJM.settingsControl.displayOptionsIlvlInformationHeightSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeIlvlInformationHeight ) - movingTop = movingTop - sliderHeight - verticalSpacing - --]] +--]] return movingTop end @@ -1557,32 +1792,35 @@ function AJM:SettingsRefresh() AJM.settingsControl.displayOptionsCheckBoxShowTeamListOnlyOnMaster:SetValue( AJM.db.showTeamListOnMasterOnly ) AJM.settingsControl.displayOptionsCheckBoxHideTeamListInCombat:SetValue( AJM.db.hideTeamListInCombat ) AJM.settingsControl.displayOptionsCheckBoxEnableClique:SetValue( AJM.db.enableClique ) - AJM.settingsControl.displayOptionsCheckBoxStackVertically:SetValue( AJM.db.barsAreStackedVertically ) - AJM.settingsControl.displayOptionsCheckBoxTeamHorizontal:SetValue( AJM.db.teamListHorizontal ) + AJM.settingsControl.displayOptionsCharactersPerBar:SetValue( AJM.db.charactersPerRow ) +-- AJM.settingsControl.displayOptionsCheckBoxStackVertically:SetValue( AJM.db.barsAreStackedVertically ) +-- AJM.settingsControl.displayOptionsCheckBoxTeamHorizontal:SetValue( AJM.db.teamListHorizontal ) AJM.settingsControl.displayOptionsCheckBoxShowListTitle:SetValue( AJM.db.showListTitle ) AJM.settingsControl.displayOptionsTeamListTransparencySlider:SetValue( AJM.db.frameAlpha ) AJM.settingsControl.displayOptionsTeamListScaleSlider:SetValue( AJM.db.teamListScale ) - AJM.settingsControl.displayOptionsTeamListMediaStatus:SetValue( AJM.db.statusBarTexture ) + AJM.settingsControl.displayOptionsTeamListMediaStatus:SetValue( AJM.db.statusBarTexture ) AJM.settingsControl.displayOptionsTeamListMediaBorder:SetValue( AJM.db.borderStyle ) AJM.settingsControl.displayOptionsTeamListMediaBackground:SetValue( AJM.db.backgroundStyle ) + AJM.settingsControl.displayOptionsTeamListMediaFont:SetValue( AJM.db.fontStyle ) + AJM.settingsControl.displayOptionsSetFontSize:SetValue( AJM.db.fontSize ) + AJM.settingsControl.displayOptionsCheckBoxShowPortrait:SetValue( AJM.db.showCharacterPortrait ) AJM.settingsControl.displayOptionsPortraitWidthSlider:SetValue( AJM.db.characterPortraitWidth ) AJM.settingsControl.displayOptionsCheckBoxShowFollowStatus:SetValue( AJM.db.showFollowStatus ) AJM.settingsControl.displayOptionsCheckBoxShowFollowStatusName:SetValue( AJM.db.followStatusShowName ) - AJM.settingsControl.displayOptionsCheckBoxShowFollowStatusLevel:SetValue( AJM.db.followStatusShowLevel ) + AJM.settingsControl.displayOptionsCheckBoxShowToolTipInfo:SetValue( AJM.db.showToolTipInfo ) +-- AJM.settingsControl.displayOptionsCheckBoxShowFollowStatusLevel:SetValue( AJM.db.followStatusShowLevel ) AJM.settingsControl.displayOptionsFollowStatusWidthSlider:SetValue( AJM.db.followStatusWidth ) AJM.settingsControl.displayOptionsFollowStatusHeightSlider:SetValue( AJM.db.followStatusHeight ) AJM.settingsControl.displayOptionsCheckBoxShowExperienceStatus:SetValue( AJM.db.showExperienceStatus ) + AJM.settingsControl.displayOptionsCheckBoxShowXpStatus:SetValue( AJM.db.showXpStatus ) + AJM.settingsControl.displayOptionsCheckBoxShowArtifactStatus:SetValue( AJM.db.showArtifactStatus ) + AJM.settingsControl.displayOptionsCheckBoxShowHonorStatus:SetValue( AJM.db.showHonorStatus ) + AJM.settingsControl.displayOptionsCheckBoxShowRepStatus:SetValue( AJM.db.showRepStatus ) AJM.settingsControl.displayOptionsCheckBoxShowExperienceStatusValues:SetValue( AJM.db.experienceStatusShowValues ) AJM.settingsControl.displayOptionsCheckBoxShowExperienceStatusPercentage:SetValue( AJM.db.experienceStatusShowPercentage ) AJM.settingsControl.displayOptionsExperienceStatusWidthSlider:SetValue( AJM.db.experienceStatusWidth ) AJM.settingsControl.displayOptionsExperienceStatusHeightSlider:SetValue( AJM.db.experienceStatusHeight ) - AJM.settingsControl.displayOptionsCheckBoxShowReputationStatus:SetValue( AJM.db.showReputationStatus ) - AJM.settingsControl.displayOptionsCheckBoxShowReputationName:SetValue( AJM.db.showReputationName ) - AJM.settingsControl.displayOptionsCheckBoxShowReputationStatusValues:SetValue( AJM.db.reputationStatusShowValues ) - AJM.settingsControl.displayOptionsCheckBoxShowReputationStatusPercentage:SetValue( AJM.db.reputationStatusShowPercentage ) - AJM.settingsControl.displayOptionsReputationStatusWidthSlider:SetValue( AJM.db.reputationStatusWidth ) - AJM.settingsControl.displayOptionsReputationStatusHeightSlider:SetValue( AJM.db.reputationStatusHeight ) AJM.settingsControl.displayOptionsCheckBoxShowHealthStatus:SetValue( AJM.db.showHealthStatus ) AJM.settingsControl.displayOptionsCheckBoxShowHealthStatusValues:SetValue( AJM.db.healthStatusShowValues ) AJM.settingsControl.displayOptionsCheckBoxShowHealthStatusPercentage:SetValue( AJM.db.healthStatusShowPercentage ) @@ -1600,16 +1838,11 @@ function AJM:SettingsRefresh() AJM.settingsControl.displayOptionsComboStatusHeightSlider:SetValue( AJM.db.comboStatusHeight ) AJM.settingsControl.displayOptionsBackgroundColourPicker:SetColor( AJM.db.frameBackgroundColourR, AJM.db.frameBackgroundColourG, AJM.db.frameBackgroundColourB, AJM.db.frameBackgroundColourA ) AJM.settingsControl.displayOptionsBorderColourPicker:SetColor( AJM.db.frameBorderColourR, AJM.db.frameBorderColourG, AJM.db.frameBorderColourB, AJM.db.frameBorderColourA ) - AJM.settingsControl.displayOptionsCheckBoxShowBagInformation:SetValue( AJM.db.showBagInformation ) - AJM.settingsControl.displayOptionsCheckBoxShowFreeBagSlotsOnly:SetValue( AJM.db.showBagFreeSlotsOnly ) - AJM.settingsControl.displayOptionsBagInformationWidthSlider:SetValue( AJM.db.bagInformationWidth ) - AJM.settingsControl.displayOptionsBagInformationHeightSlider:SetValue( AJM.db.bagInformationHeight ) - --Ebony - AJM.settingsControl.displayOptionsCheckBoxShowIlvlInformation:SetValue( AJM.db.showIlvlInformation ) - AJM.settingsControl.displayOptionsCheckBoxShowEquippedOnly:SetValue( AJM.db.ShowEquippedOnly ) - AJM.settingsControl.displayOptionsCheckBoxstackName:SetValue( AJM.db.stackName ) - --AJM.settingsControl.displayOptionsIlvlInformationWidthSlider:SetValue( AJM.db.ilvlInformationWidth ) - --AJM.settingsControl.displayOptionsIlvlInformationHeightSlider:SetValue( AJM.db.ilvlInformationHeight ) +-- AJM.settingsControl.displayOptionsCheckBoxShowBagInformation:SetValue( AJM.db.showBagInformation ) +-- AJM.settingsControl.displayOptionsCheckBoxShowFreeBagSlotsOnly:SetValue( AJM.db.showBagFreeSlotsOnly ) +-- AJM.settingsControl.displayOptionsBagInformationWidthSlider:SetValue( AJM.db.bagInformationWidth ) +-- AJM.settingsControl.displayOptionsBagInformationHeightSlider:SetValue( AJM.db.bagInformationHeight ) +-- AJM.settingsControl.displayOptionsCheckBoxShowEquippedOnly:SetValue( AJM.db.ShowEquippedOnly ) -- State. -- Trying to change state in combat lockdown causes taint. Let's not do that. Eventually it would be nice to have a "proper state driven team display", -- but this workaround is enough for now. @@ -1617,62 +1850,63 @@ function AJM:SettingsRefresh() AJM.settingsControl.displayOptionsCheckBoxShowTeamListOnlyOnMaster:SetDisabled( not AJM.db.showTeamList ) AJM.settingsControl.displayOptionsCheckBoxHideTeamListInCombat:SetDisabled( not AJM.db.showTeamList ) AJM.settingsControl.displayOptionsCheckBoxEnableClique:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxStackVertically:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxTeamHorizontal:SetDisabled( not AJM.db.showTeamList ) + AJM.settingsControl.displayOptionsCharactersPerBar:SetDisabled(not AJM.db.showTeamList ) + --AJM.settingsControl.displayOptionsCheckBoxStackVertically:SetDisabled( not AJM.db.showTeamList ) + --AJM.settingsControl.displayOptionsCheckBoxTeamHorizontal:SetDisabled( not AJM.db.showTeamList ) AJM.settingsControl.displayOptionsCheckBoxShowListTitle:SetDisabled( not AJM.db.showTeamList ) AJM.settingsControl.displayOptionsTeamListScaleSlider:SetDisabled( not AJM.db.showTeamList ) AJM.settingsControl.displayOptionsTeamListTransparencySlider:SetDisabled( not AJM.db.showTeamList ) AJM.settingsControl.displayOptionsTeamListMediaStatus:SetDisabled( not AJM.db.showTeamList ) AJM.settingsControl.displayOptionsTeamListMediaBorder:SetDisabled( not AJM.db.showTeamList ) AJM.settingsControl.displayOptionsTeamListMediaBackground:SetDisabled( not AJM.db.showTeamList ) + AJM.settingsControl.displayOptionsTeamListMediaFont:SetDisabled( not AJM.db.showTeamList ) + AJM.settingsControl.displayOptionsSetFontSize:SetDisabled( not AJM.db.showTeamList ) + + AJM.settingsControl.displayOptionsCheckBoxShowPortrait:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsPortraitWidthSlider:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowFollowStatus:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowFollowStatusName:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowFollowStatusLevel:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsFollowStatusWidthSlider:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsFollowStatusHeightSlider:SetDisabled( not AJM.db.showTeamList ) + AJM.settingsControl.displayOptionsPortraitWidthSlider:SetDisabled( not AJM.db.showTeamList or not AJM.db.showCharacterPortrait ) + AJM.settingsControl.displayOptionsCheckBoxShowFollowStatus:SetDisabled( not AJM.db.showTeamList) + AJM.settingsControl.displayOptionsCheckBoxShowFollowStatusName:SetDisabled( not AJM.db.showTeamList or not AJM.db.showFollowStatus ) +-- AJM.settingsControl.displayOptionsCheckBoxShowFollowStatusLevel:SetDisabled( not AJM.db.showTeamList or not AJM.db.showFollowStatus ) + AJM.settingsControl.displayOptionsFollowStatusWidthSlider:SetDisabled( not AJM.db.showTeamList or not AJM.db.showFollowStatus ) + AJM.settingsControl.displayOptionsFollowStatusHeightSlider:SetDisabled( not AJM.db.showTeamList or not AJM.db.showFollowStatus) AJM.settingsControl.displayOptionsCheckBoxShowExperienceStatus:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowExperienceStatusValues:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowExperienceStatusPercentage:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsExperienceStatusWidthSlider:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsExperienceStatusHeightSlider:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowReputationStatus:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowReputationName:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowReputationStatusValues:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowReputationStatusPercentage:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsReputationStatusWidthSlider:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsReputationStatusHeightSlider:SetDisabled( not AJM.db.showTeamList ) + AJM.settingsControl.displayOptionsCheckBoxShowXpStatus:SetDisabled( not AJM.db.showTeamList or not AJM.db.showExperienceStatus) + AJM.settingsControl.displayOptionsCheckBoxShowArtifactStatus:SetDisabled( not AJM.db.showTeamList or not AJM.db.showExperienceStatus) + AJM.settingsControl.displayOptionsCheckBoxShowHonorStatus:SetDisabled( not AJM.db.showTeamList or not AJM.db.showExperienceStatus) + AJM.settingsControl.displayOptionsCheckBoxShowRepStatus:SetDisabled( not AJM.db.showTeamList or not AJM.db.showExperienceStatus ) + AJM.settingsControl.displayOptionsCheckBoxShowExperienceStatusValues:SetDisabled( not AJM.db.showTeamList or not AJM.db.showExperienceStatus ) + AJM.settingsControl.displayOptionsCheckBoxShowExperienceStatusPercentage:SetDisabled( not AJM.db.showTeamList or not AJM.db.showExperienceStatus ) + AJM.settingsControl.displayOptionsExperienceStatusWidthSlider:SetDisabled( not AJM.db.showTeamList or not AJM.db.showExperienceStatus) + AJM.settingsControl.displayOptionsExperienceStatusHeightSlider:SetDisabled( not AJM.db.showTeamList or not AJM.db.showExperienceStatus ) AJM.settingsControl.displayOptionsCheckBoxShowHealthStatus:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowHealthStatusValues:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowHealthStatusPercentage:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsHealthStatusWidthSlider:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsHealthStatusHeightSlider:SetDisabled( not AJM.db.showTeamList ) + AJM.settingsControl.displayOptionsCheckBoxShowHealthStatusValues:SetDisabled( not AJM.db.showTeamList or not AJM.db.showHealthStatus ) + AJM.settingsControl.displayOptionsCheckBoxShowHealthStatusPercentage:SetDisabled( not AJM.db.showTeamList or not AJM.db.showHealthStatus ) + AJM.settingsControl.displayOptionsHealthStatusWidthSlider:SetDisabled( not AJM.db.showTeamList or not AJM.db.showHealthStatus ) + AJM.settingsControl.displayOptionsHealthStatusHeightSlider:SetDisabled( not AJM.db.showTeamList or not AJM.db.showHealthStatus ) AJM.settingsControl.displayOptionsCheckBoxShowPowerStatus:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowPowerStatusValues:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowPowerStatusPercentage:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsPowerStatusWidthSlider:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsPowerStatusHeightSlider:SetDisabled( not AJM.db.showTeamList ) + AJM.settingsControl.displayOptionsCheckBoxShowPowerStatusValues:SetDisabled( not AJM.db.showTeamList or not AJM.db.showPowerStatus ) + AJM.settingsControl.displayOptionsCheckBoxShowPowerStatusPercentage:SetDisabled( not AJM.db.showTeamList or not AJM.db.showPowerStatus ) + AJM.settingsControl.displayOptionsPowerStatusWidthSlider:SetDisabled( not AJM.db.showTeamList or not AJM.db.showPowerStatus ) + AJM.settingsControl.displayOptionsPowerStatusHeightSlider:SetDisabled( not AJM.db.showTeamList or not AJM.db.showPowerStatus ) AJM.settingsControl.displayOptionsCheckBoxShowComboStatus:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowComboStatusValues:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowComboStatusPercentage:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsComboStatusWidthSlider:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsComboStatusHeightSlider:SetDisabled( not AJM.db.showTeamList ) + AJM.settingsControl.displayOptionsCheckBoxShowComboStatusValues:SetDisabled( not AJM.db.showTeamList or not AJM.db.showComboStatus ) + AJM.settingsControl.displayOptionsCheckBoxShowComboStatusPercentage:SetDisabled( not AJM.db.showTeamList or not AJM.db.showComboStatus) + AJM.settingsControl.displayOptionsComboStatusWidthSlider:SetDisabled( not AJM.db.showTeamList or not AJM.db.showComboStatus) + AJM.settingsControl.displayOptionsComboStatusHeightSlider:SetDisabled( not AJM.db.showTeamList or not AJM.db.showComboStatus) AJM.settingsControl.displayOptionsBackgroundColourPicker:SetDisabled( not AJM.db.showTeamList ) AJM.settingsControl.displayOptionsBorderColourPicker:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowBagInformation:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowFreeBagSlotsOnly:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsBagInformationWidthSlider:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsBagInformationHeightSlider:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowIlvlInformation:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxShowEquippedOnly:SetDisabled( not AJM.db.showTeamList ) - AJM.settingsControl.displayOptionsCheckBoxstackName:SetDisabled( not AJM.db.showTeamList ) - --AJM.settingsControl.displayOptionsIlvlInformationWidthSlider:SetDisabled( not AJM.db.showTeamList ) - --AJM.settingsControl.displayOptionsIlvlInformationHeightSlider:SetDisabled( not AJM.db.showTeamList ) +-- AJM.settingsControl.displayOptionsCheckBoxShowBagInformation:SetDisabled( not AJM.db.showTeamList ) +-- AJM.settingsControl.displayOptionsCheckBoxShowFreeBagSlotsOnly:SetDisabled( not AJM.db.showTeamList or not AJM.db.ShowBagInformationn) +-- AJM.settingsControl.displayOptionsBagInformationWidthSlider:SetDisabled( not AJM.db.showTeamList or not AJM.db.ShowBagInformation) +-- AJM.settingsControl.displayOptionsBagInformationHeightSlider:SetDisabled( not AJM.db.showTeamList or not AJM.db.ShowBagInformation) + AJM.settingsControl.displayOptionsCheckBoxShowToolTipInfo:SetDisabled( not AJM.db.showTeamList or not AJM.db.showFollowStatus ) +-- AJM.settingsControl.displayOptionsCheckBoxShowEquippedOnly:SetDisabled( not AJM.db.showTeamList or not AJM.db.showFollowStatus ) if AJM.teamListCreated == true then AJM:RefreshTeamListControls() AJM:SettingsUpdateBorderStyle() AJM:SettingsUpdateStatusBarTexture() + AJM:SettingsUpdateFontStyle() AJM:SetTeamListVisibility() AJM:SettingsUpdateFollowTextAll() AJM:SettingsUpdateExperienceAll() @@ -1680,7 +1914,7 @@ function AJM:SettingsRefresh() AJM:SettingsUpdateHealthAll() AJM:SettingsUpdatePowerAll() AJM:SettingsUpdateComboAll() - AJM:SettingsUpdateBagInformationAll() + --AJM:SettingsUpdateBagInformationAll() --AJM:SettingsUpdateIlvlInformationAll() end else @@ -1696,31 +1930,33 @@ function AJM:JambaOnSettingsReceived( characterName, settings ) AJM.db.showTeamListOnMasterOnly = settings.showTeamListOnMasterOnly AJM.db.hideTeamListInCombat = settings.hideTeamListInCombat AJM.db.enableClique = settings.enableClique - AJM.db.barsAreStackedVertically = settings.barsAreStackedVertically - AJM.db.teamListHorizontal = settings.teamListHorizontal + AJM.db.charactersPerRow = settings.charactersPerRow + --AJM.db.barsAreStackedVertically = settings.barsAreStackedVertically + --AJM.db.teamListHorizontal = settings.teamListHorizontal AJM.db.showListTitle = settings.showListTitle AJM.db.teamListScale = settings.teamListScale AJM.db.statusBarTexture = settings.statusBarTexture AJM.db.borderStyle = settings.borderStyle AJM.db.backgroundStyle = settings.backgroundStyle + AJM.db.fontStyle = settings.fontStyle + AJM.db.showCharacterPortrait = settings.showCharacterPortrait AJM.db.characterPortraitWidth = settings.characterPortraitWidth AJM.db.showFollowStatus = settings.showFollowStatus AJM.db.followStatusWidth = settings.followStatusWidth AJM.db.followStatusHeight = settings.followStatusHeight AJM.db.followStatusShowName = settings.followStatusShowName - AJM.db.followStatusShowLevel = settings.followStatusShowLevel + AJM.db.showToolTipInfo = settings.showToolTipInfo +-- AJM.db.followStatusShowLevel = settings.followStatusShowLevel AJM.db.showExperienceStatus = settings.showExperienceStatus + AJM.db.showXpStatus = settings.showXpStatus + AJM.db.showArtifactStatus = settings.showArtifactStatus + AJM.db.showHonorStatus = settings.showHonorStatus + AJM.db.showRepStatus = settings.showRepStatus AJM.db.experienceStatusWidth = settings.experienceStatusWidth AJM.db.experienceStatusHeight = settings.experienceStatusHeight AJM.db.experienceStatusShowValues = settings.experienceStatusShowValues AJM.db.experienceStatusShowPercentage = settings.experienceStatusShowPercentage - AJM.db.showReputationStatus = settings.showReputationStatus - AJM.db.showReputationName = settings.showReputationName - AJM.db.reputationStatusWidth = settings.reputationStatusWidth - AJM.db.reputationStatusHeight = settings.reputationStatusHeight - AJM.db.reputationStatusShowValues = settings.reputationStatusShowValues - AJM.db.reputationStatusShowPercentage = settings.reputationStatusShowPercentage AJM.db.showHealthStatus = settings.showHealthStatus AJM.db.healthStatusWidth = settings.healthStatusWidth AJM.db.healthStatusHeight = settings.healthStatusHeight @@ -1736,16 +1972,13 @@ function AJM:JambaOnSettingsReceived( characterName, settings ) AJM.db.comboStatusHeight = settings.comboStatusHeight AJM.db.comboStatusShowValues = settings.comboStatusShowValues AJM.db.comboStatusShowPercentage = settings.comboStatusShowPercentage - AJM.db.showBagInformation = settings.showBagInformation - AJM.db.showBagFreeSlotsOnly = settings.showBagFreeSlotsOnly - AJM.db.bagInformationWidth = settings.bagInformationWidth - AJM.db.bagInformationHeight = settings.bagInformationHeight +-- AJM.db.showBagInformation = settings.showBagInformation +-- AJM.db.showBagFreeSlotsOnly = settings.showBagFreeSlotsOnly +-- AJM.db.bagInformationWidth = settings.bagInformationWidth +-- AJM.db.bagInformationHeight = settings.bagInformationHeight --EBS - AJM.db.showIlvlInformation = settings.showIlvlInformation - AJM.db.ShowEquippedOnly = settings.ShowEquippedOnly - AJM.db.stackName = settings.stackName - --AJM.db.ilvlInformationWidth = settings.ilvlInformationWidth - --AJM.db.ilvlInformationHeight = settings.ilvlInformationHeight + +-- AJM.db.ShowEquippedOnly = settings.ShowEquippedOnly AJM.db.frameAlpha = settings.frameAlpha AJM.db.framePoint = settings.framePoint AJM.db.frameRelativePoint = settings.frameRelativePoint @@ -1796,6 +2029,12 @@ function AJM:SettingsToggleEnableClique( event, checked ) AJM:SettingsRefresh() end +function AJM:SettingsChangeCharactersPerBar( event, value ) + AJM.db.charactersPerRow = tonumber( value ) + AJM:SettingsRefresh() +end + +--[[ function AJM:SettingsToggleStackVertically( event, checked ) AJM.db.barsAreStackedVertically = checked AJM:SettingsRefresh() @@ -1805,6 +2044,7 @@ function AJM:SettingsToggleTeamHorizontal( event, checked ) AJM.db.teamListHorizontal = checked AJM:SettingsRefresh() end +]] function AJM:SettingsToggleShowTeamListTitle( event, checked ) AJM.db.showListTitle = checked @@ -1836,6 +2076,17 @@ function AJM:SettingsChangeBackgroundStyle( event, value ) AJM:SettingsRefresh() end +function AJM:SettingsChangeFontStyle( event, value ) + AJM.db.fontStyle = value + AJM:SettingsRefresh() +end + +function AJM:SettingsChangeFontSize( event, value ) + AJM.db.fontSize = value + AJM:SettingsRefresh() +end + + function AJM:SettingsToggleShowPortrait( event, checked ) AJM.db.showCharacterPortrait = checked AJM:SettingsRefresh() @@ -1856,10 +2107,16 @@ function AJM:SettingsToggleShowFollowStatusName( event, checked ) AJM:SettingsRefresh() end +function AJM:SettingsToggleShowToolTipInfo( event, checked ) + AJM.db.showToolTipInfo = checked + AJM:SettingsRefresh() +end + +--[[ function AJM:SettingsToggleShowFollowStatusLevel( event, checked ) AJM.db.followStatusShowLevel = checked AJM:SettingsRefresh() -end +end]] function AJM:SettingsChangeFollowStatusWidth( event, value ) AJM.db.followStatusWidth = tonumber( value ) @@ -1875,54 +2132,46 @@ function AJM:SettingsToggleShowExperienceStatus( event, checked ) AJM.db.showExperienceStatus = checked AJM:SettingsRefresh() end +-- -function AJM:SettingsToggleShowExperienceStatusValues( event, checked ) - AJM.db.experienceStatusShowValues = checked +function AJM:SettingsToggleShowXpStatus( event, checked ) + AJM.db.showXpStatus = checked AJM:SettingsRefresh() end -function AJM:SettingsToggleShowExperienceStatusPercentage( event, checked ) - AJM.db.experienceStatusShowPercentage = checked - AJM.SettingsRefresh() -end - -function AJM:SettingsChangeExperienceStatusWidth( event, value ) - AJM.db.experienceStatusWidth = tonumber( value ) - AJM:SettingsRefresh() -end - -function AJM:SettingsChangeExperienceStatusHeight( event, value ) - AJM.db.experienceStatusHeight = tonumber( value ) +function AJM:SettingsToggleShowArtifactStatus( event, checked ) + AJM.db.showArtifactStatus = checked AJM:SettingsRefresh() end -function AJM:SettingsToggleShowReputationStatus( event, checked ) - AJM.db.showReputationStatus = checked +function AJM:SettingsToggleShowHonorStatus( event, checked ) + AJM.db.showHonorStatus = checked AJM:SettingsRefresh() end -function AJM:SettingsToggleShowReputationName( event, checked ) - AJM.db.showReputationName = checked +function AJM:SettingsToggleShowRepStatus( event, checked ) + AJM.db.showRepStatus = checked AJM:SettingsRefresh() end +-- -function AJM:SettingsToggleShowReputationStatusValues( event, checked ) - AJM.db.reputationStatusShowValues = checked +function AJM:SettingsToggleShowExperienceStatusValues( event, checked ) + AJM.db.experienceStatusShowValues = checked AJM:SettingsRefresh() end -function AJM:SettingsToggleShowReputationStatusPercentage( event, checked ) - AJM.db.reputationStatusShowPercentage = checked - AJM:SettingsRefresh() +function AJM:SettingsToggleShowExperienceStatusPercentage( event, checked ) + AJM.db.experienceStatusShowPercentage = checked + AJM.SettingsRefresh() end -function AJM:SettingsChangeReputationStatusWidth( event, value ) - AJM.db.reputationStatusWidth = tonumber( value ) +function AJM:SettingsChangeExperienceStatusWidth( event, value ) + AJM.db.experienceStatusWidth = tonumber( value ) AJM:SettingsRefresh() end -function AJM:SettingsChangeReputationStatusHeight( event, value ) - AJM.db.reputationStatusHeight = tonumber( value ) +function AJM:SettingsChangeExperienceStatusHeight( event, value ) + AJM.db.experienceStatusHeight = tonumber( value ) AJM:SettingsRefresh() end @@ -2000,6 +2249,7 @@ function AJM:SettingsChangeComboStatusHeight( event, value ) AJM.db.comboStatusHeight = tonumber( value ) AJM:SettingsRefresh() end + function AJM:SettingsBackgroundColourPickerChanged( event, r, g, b, a ) AJM.db.frameBackgroundColourR = r AJM.db.frameBackgroundColourG = g @@ -2016,6 +2266,7 @@ function AJM:SettingsBorderColourPickerChanged( event, r, g, b, a ) AJM:SettingsRefresh() end +--[[ function AJM:SettingsToggleShowBagInformation( event, checked ) AJM.db.showBagInformation = checked AJM:SettingsRefresh() @@ -2035,34 +2286,15 @@ function AJM:SettingsChangeBagInformationHeight( event, value ) AJM.db.bagInformationHeight = tonumber( value ) AJM:SettingsRefresh() end - +--]] --ilvl -function AJM:SettingsToggleShowIlvlInformation( event, checked ) - AJM.db.showIlvlInformation = checked - AJM:SettingsRefresh() -end +--[[ function AJM:SettingsToggleShowEquippedOnly( event, checked ) AJM.db.ShowEquippedOnly = checked AJM:SettingsRefresh() -end - -function AJM:SettingsTogglestackName( event, checked ) - AJM.db.stackName = checked - AJM:SettingsRefresh() -end +end ]] ---[[ -function AJM:SettingsChangeIlvlInformationWidth( event, value ) - AJM.db.ilvlInformationWidth = tonumber( value ) - AJM:SettingsRefresh() -end - -function AJM:SettingsChangeIlvlInformationHeight( event, value ) - AJM.db.ilvlInformationHeight = tonumber( value ) - AJM:SettingsRefresh() -end ---]] ------------------------------------------------------------------------------------------------------------- -- Commands. @@ -2080,14 +2312,17 @@ function AJM:JambaOnCommandReceived( characterName, commandName, ... ) if commandName == AJM.COMMAND_REPUTATION_STATUS_UPDATE then AJM:ProcessUpdateReputationStatusMessage( characterName, ... ) end - if commandName == AJM.COMMAND_BAGINFORMATION_UPDATE then - AJM:ProcessUpdateBagInformationMessage( characterName, ... ) - end -if commandName == AJM.COMMAND_ITEMLEVELINFORMATION_UPDATE then - AJM:ProcessUpdateIlvlInformationMessage( characterName, ... ) +-- if commandName == AJM.COMMAND_BAGINFORMATION_UPDATE then +-- AJM:ProcessUpdateBagInformationMessage( characterName, ... ) +-- end + if commandName == AJM.COMMAND_TOONINFORMATION_UPDATE then + AJM:ProcessUpdateToonInformationMessage ( characterName, ... ) end if commandName == AJM.COMMAND_COMBO_STATUS_UPDATE then AJM:ProcessUpdateComboStatusMessage( characterName, ... ) + end + if commandName == AJM.COMMAND_REQUEST_INFO then + AJM.SendInfomationUpdateCommand() end end @@ -2114,16 +2349,11 @@ function AJM:RangeUpdateCommand() --AJM:Print("name", characterName ) local name = Ambiguate( characterName, "none" ) local range = UnitInRange( name ) - AJM:UpdateHealthStatus( name, nil, nil, range, nil ) - AJM:UpdatePowerStatus( name, nil, nil, range ) - AJM:UpdateComboStatus( name, nil, nil, range ) - AJM:UpdateReputationStatus( name, nil, nil, nil, nil, nil, range ) - AJM:UpdateExperienceStatus( name, nil, nil, nil, range ) - AJM:ProcessUpdateBagInformationMessage( name, nil, nil, range ) + end end - +--[[ ------------------------------------------------------------------------------------------------------------- -- Bag Information Updates. ------------------------------------------------------------------------------------------------------------- @@ -2142,26 +2372,26 @@ function AJM:SendBagInformationUpdateCommand() end local slotsFree, totalSlots = LibBagUtils:CountSlots( "BAGS", 0 ) local curTotal, maxTotal, broken = 0, 0, 0 + --for i = 1, 18 do -- local curItemDurability, maxItemDurability = GetInventoryItemDurability(i) - --if curItemDurability and maxItemDurability then + -- if curItemDurability and maxItemDurability then -- curTotal = curTotal + curItemDurability -- maxTotal = maxTotal + maxItemDurability - -- if maxItemDurability > 0 and curItemDurability == 0 then - -- broken = broken + 1 + -- if maxItemDurability > 0 and curItemDurability == 0 then + -- broken = broken + 1 + -- end -- end - --end - --end --local percent = curTotal / maxTotal * 100 --return percent, broken + --end --AJM:Print("Durability", percent, broken) --if AJM.previousSlotsFree ~= slotsFree or AJM.previousTotalSlots ~= totalSlots then - if AJM.db.showTeamListOnMasterOnly == true then - AJM:JambaSendCommandToMaster( AJM.COMMAND_BAGINFORMATION_UPDATE, slotsFree, totalSlots ) - else - AJM:JambaSendCommandToTeam( AJM.COMMAND_BAGINFORMATION_UPDATE, slotsFree, totalSlots ) - end - --end + if AJM.db.showTeamListOnMasterOnly == true then + AJM:JambaSendCommandToMaster( AJM.COMMAND_BAGINFORMATION_UPDATE, slotsFree, totalSlots ) + else + AJM:JambaSendCommandToTeam( AJM.COMMAND_BAGINFORMATION_UPDATE, slotsFree, totalSlots ) + end end end @@ -2171,12 +2401,12 @@ end function AJM:SettingsUpdateBagInformationAll() for characterName, characterStatusBar in pairs( AJM.characterStatusBar ) do - AJM:UpdateBagInformation( characterName, nil, nil, nil ) + AJM:UpdateBagInformation( characterName, nil, nil, nil, nil ) end end function AJM:UpdateBagInformation( characterName, slotsFree, totalSlots, range ) --percent, range ) - --AJM:Print("Data", characterName, slotsFree, totalSlots, percent ) +-- AJM:Print("Data", characterName, slotsFree, totalSlots, percent ) if CanDisplayTeamList() == false then return end @@ -2196,12 +2426,12 @@ function AJM:UpdateBagInformation( characterName, slotsFree, totalSlots, range ) if totalSlots == nil then totalSlots = bagInformationFrame.totalSlots end - --if percent == nil or percent == false then - -- percent = bagInformationFrame.durability - --end +-- if percent == nil or percent == false then +-- percent = bagInformationFrame.durability +-- end bagInformationFrame.slotsFree = slotsFree bagInformationFrame.totalSlots = totalSlots - --bagInformationFrame.durability = percent +-- bagInformationFrame.durability = percent if UnitInParty(Ambiguate( characterName, "none" ) ) == true then if range == false then bagInformationFrame:SetAlpha( 0.5 ) @@ -2227,62 +2457,184 @@ function AJM:UpdateBagInformation( characterName, slotsFree, totalSlots, range ) bagInformationFrameText:SetText( text ) --AJM:Print("freespace", slotsFree, totalSlots) --Debug end - +--]] ------------------------------------------------------------------------------------------------------------- -- Ilvl Information Updates. ------------------------------------------------------------------------------------------------------------- -function AJM:ITEMLVL_PUSH( event, ... ) - AJM:SendIlvlInformationUpdateCommand() -end - -function AJM:PLAYER_EQUIPMENT_CHANGED( event, ... ) - AJM:SendIlvlInformationUpdateCommand() +function AJM:JambaRequestUpdate() + AJM:JambaSendCommandToTeam( AJM.COMMAND_REQUEST_INFO ) end - -function AJM:SendIlvlInformationUpdateCommand() - if AJM.db.showTeamList == true and AJM.db.showIlvlInformation == true or AJM.db.followStatusShowLevel == true then - if UnitIsGhost( "player" ) then - return - end - if UnitIsDead( "player" ) then - return - end - local overall, equipped = GetAverageItemLevel() +function AJM:SendInfomationUpdateCommand() + -- Item Level + local _, iLevel = GetAverageItemLevel() + -- characterLevel local characterLevel = UnitLevel("player") - --if AJM.previousIlvl ~= overall then ---or AJM.previousTotalSlots ~= totalSlots then + --Max Level + local characterMaxLevel = GetMaxPlayerLevel() + -- gold + local gold = GetMoney() + -- Bag information + local slotsFree, totalSlots = LibBagUtils:CountSlots( "BAGS", 0 ) + -- durability + 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 + if curTotal == 0 then + curTotal = 1 + maxTotal = 1 + end + local durability = curTotal / maxTotal * 100 + --Mail (blizzard minimap code) + mailText = "nothing" + if HasNewMail() == true then + local sender1,sender2,sender3 = GetLatestThreeSenders() + if( sender1 or sender2 or sender3 ) then + if( sender1 ) then + mailText = sender1 + end + if( sender2 ) then + mailText = mailText.."\n"..sender2 + end + if( sender3 ) then + mailText = mailText.."\n"..sender3 + end + else + mailText = L["Unknown Sender"] + end + end + --mailText = text + --local name, count, icon, currencyID + currText = "currNothing" + local name, count, icon, currencyID = GetBackpackCurrencyInfo(1) + if ( name ) then + --AJM:Print("test", name, count) + currText = name.." ".." |T"..icon..":16|t".." "..count + end + local name, count, icon, currencyID = GetBackpackCurrencyInfo(2) + if ( name ) then + --AJM:Print("test2", name, count) + currText = currText.."\n"..name.." ".." |T"..icon..":16|t".." "..count + end + local name, count, icon, currencyID = GetBackpackCurrencyInfo(3) + if ( name ) then + --AJM:Print("test3", name, count) + currText = currText.."\n"..name.." ".." |T"..icon..":16|t".." "..count + end if AJM.db.showTeamListOnMasterOnly == true then - AJM:JambaSendCommandToMaster( AJM.COMMAND_ITEMLEVELINFORMATION_UPDATE, characterLevel, overall, equipped ) + AJM:JambaSendCommandToMaster( AJM.COMMAND_TOONINFORMATION_UPDATE, characterLevel, characterMaxLevel, iLevel, gold, durability, slotsFree, totalSlots, currName, currCout, mailText, currText) else - AJM:JambaSendCommandToTeam( AJM.COMMAND_ITEMLEVELINFORMATION_UPDATE, characterLevel, overall, equipped ) + AJM:JambaSendCommandToTeam( AJM.COMMAND_TOONINFORMATION_UPDATE, characterLevel, characterMaxLevel, iLevel, gold, durability, slotsFree, totalSlots, currName, currCout, mailText, currText) end - --end +end + +function AJM:ProcessUpdateToonInformationMessage( characterName, characterLevel, characterMaxLevel, iLevel, gold, durability, slotsFree, totalSlots, mailText, currText ) + AJM:SettingsUpdateToonInfomation( characterName, characterLevel, characterMaxLevel, iLevel, gold, durability, slotsFree, totalSlots, mailText, currText ) +end + + +function AJM:SettingsUpdateToonInfomationAll() + for characterName, characterStatusBar in pairs( AJM.characterStatusBar ) do + AJM:SettingsUpdateToonInfomation( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil ) end end +function AJM:SettingsUpdateToonInfomation( characterName, characterLevel, characterMaxLevel, iLevel, gold, durability, slotsFree, totalSlots, mailText, currText ) + --AJM:Print("toonInfoUpdate", characterName, characterLevel, characterMaxLevel, iLevel, gold, durability, slotsFree, totalSlots, mailText, currText ) + if CanDisplayTeamList() == false then + return + end + characterName = JambaUtilities:AddRealmToNameIfMissing( characterName ) + local characterStatusBar = AJM.characterStatusBar[characterName] + if characterStatusBar == nil then + return + end + local followBar = characterStatusBar["followBar"] + if iLevel == nil then + iLevel = followBar.ArgIlvl + end + if characterLevel == nil then + characterLevel = followBar.CharacterLevel + end + if characterMaxLevel == nil then + characterMaxLevel = followBar.MaxCharacterLevel + end + if gold == nil then + gold = followBar.Gold + end + if durability == nil then + durability = followBar.Durability + end + if slotsFree == nil then + slotsFree = followBar.FreeBagSpace + end + if totalSlots == nil then + totalSlots = followBar.TotalBagSpace + end + if mailText == nil then + mailText = followBar.Mail + end + if currText == nil then + currText = followBar.CurrText + end + + followBar.ArgIlvl = iLevel + followBar.CharacterLevel = characterLevel + followBar.MaxCharacterLevel = characterMaxLevel + followBar.Gold = gold + followBar.Durability = durability + followBar.FreeBagSpace = slotsFree + followBar.TotalBagSpace = totalSlots + followBar.Mail = mailText + followBar.CurrText = currText + +end + ------------------------------------------------------------------------------------------------------------- -- Follow Status Bar Updates. ------------------------------------------------------------------------------------------------------------- - -function AJM:AUTOFOLLOW_BEGIN( event, ... ) - AJM:SendFollowStatusUpdateCommand( true ) +AJM.isFollowing = false + +function AJM:AUTOFOLLOW_BEGIN( event, name, ... ) + if AJM.isFollowing == false then + AJM:ScheduleTimer( "SendFollowStatusUpdateCommand", 1 , true) + AJM.isFollowing = true + end end -function AJM:AUTOFOLLOW_END( event, followEndedReason, ... ) - AJM:SendFollowStatusUpdateCommand( false ) +function AJM:AUTOFOLLOW_END( event, ... ) + AJM:ScheduleTimer( "SendFollowStatusUpdateCommand", 1 , false ) end + function AJM:SendFollowStatusUpdateCommand( isFollowing ) - if AJM.db.showTeamList == true and AJM.db.showFollowStatus == true then + if AJM.db.showTeamList == true and AJM.db.showFollowStatus == true then + local canSend = false + local alpha = AutoFollowStatus:GetAlpha() + if alpha < 1 then + canSend = true + AJM.isFollowing = false + end + if isFollowing == true then + canSend = true + end -- Check to see if JambaFollow is enabled and follow strobing is on. If this is the case then -- do not send the follow update. - local canSend = true if JambaApi.Follow ~= nil then if JambaApi.Follow.IsFollowingStrobing() == true then canSend = false end - end + end + --AJM:Print("canSend", canSend) if canSend == true then if AJM.db.showTeamListOnMasterOnly == true then AJM:JambaSendCommandToMaster( AJM.COMMAND_FOLLOW_STATUS_UPDATE, isFollowing ) @@ -2294,11 +2646,11 @@ function AJM:SendFollowStatusUpdateCommand( isFollowing ) end function AJM:ProcessUpdateFollowStatusMessage( characterName, isFollowing ) - AJM:UpdateFollowStatus( characterName, isFollowing, false ) + AJM:UpdateFollowStatus( characterName, isFollowing, isFollowLeader ) end ---TODO: Ebony,-- See if this code could be cleaned up a little as when in combat takes a few mins after to catch up. Sending add-on msg with combat? function AJM:UpdateFollowStatus( characterName, isFollowing, isFollowLeader ) + --AJM:Print("follow", characterName, isFollowing, isFollowLeader) if CanDisplayTeamList() == false then return end @@ -2320,26 +2672,20 @@ function AJM:UpdateFollowStatus( characterName, isFollowing, isFollowLeader ) followBar:SetStatusBarColor( 0.55, 0.15, 0.15, 0.25 ) else -- Not following. - followBar:SetStatusBarColor( 0.85, 0.05, 0.05, 1.00 ) + followBar:SetStatusBarColor( 0.85, 0.05, 0.05, 1.00 ) end end end -function AJM:ProcessUpdateIlvlInformationMessage( characterName, characterLevel, overall, equipped ) - AJM:SettingsUpdateFollowText( characterName, characterLevel, overall, equipped ) -end - - function AJM:SettingsUpdateFollowTextAll() for characterName, characterStatusBar in pairs( AJM.characterStatusBar ) do - AJM:SettingsUpdateFollowText( characterName, nil, nil, nil ) - --AJM:SettingsUpdateFollowText( characterName, nil, nil, nil ) + AJM:SettingsUpdateFollowText( characterName ) end end -function AJM:SettingsUpdateFollowText( characterName, characterLevel, overall, equipped ) - --AJM:Print("Info", characterName, characterLevel,overall, equipped) -- debug +function AJM:SettingsUpdateFollowText( characterName, characterLevel, characterMaxLevel, overall, equipped, gold, durability, slotsFree, totalSlots, toolText ) + --AJM:Print("Info", characterName, characterLevel,characterMaxLevel, overall, equipped) -- debug if CanDisplayTeamList() == false then return end @@ -2351,54 +2697,16 @@ function AJM:SettingsUpdateFollowText( characterName, characterLevel, overall, e if characterStatusBar == nil then return end - local ilvlInformationFrame = characterStatusBar["ilvlInformationFrame"] - local ilvlInformationFrameText = characterStatusBar["ilvlInformationFrameText"] - if overall == nil then - overall = ilvlInformationFrame.overall - end - if equipped == nil then - equipped = ilvlInformationFrame.equipped - end - if characterLevel == nil then - characterLevel = ilvlInformationFrame.characterLevel - end - ilvlInformationFrame.overall = overall - ilvlInformationFrame.equipped = equipped - ilvlInformationFrame.characterLevel = characterLevel + local followBarText = characterStatusBar["followBarText"] local text = "" if AJM.db.followStatusShowName == true then text = text..Ambiguate( characterName, "none" ) end - if AJM.db.followStatusShowLevel == true then - if AJM.db.followStatusShowName == true then - if AJM.db.stackName == true then - text = text..L[" "]..("\n")..L["("]..tostring( characterLevel )..L[")"] - else - text = text..L[" "]..L["("]..tostring( characterLevel )..L[")"] - end - else - text = tostring( characterLevel ) - end - end - if AJM.db.showIlvlInformation == true then - if AJM.db.ShowEquippedOnly == true then - if AJM.db.stackName == true then - text = text..L[" "]..("\n")..L["("]..tostring (format("%.0f", equipped ))..L[")"] - else - text = text..L[" "]..L["("]..tostring (format("%.0f", equipped ))..L[")"] - end - else - if AJM.db.stackName == true then - text = text..L[" "]..("\n")..L["("]..tostring(format("%.0f", equipped )).."/"..tostring(format("%.0f", overall ))..L[")"] - else - text = text..L[" "]..L["("]..tostring(format("%.0f", equipped )).."/"..tostring(format("%.0f", overall ))..L[")"] - end - end - end followBarText:SetText( text ) end + ------------------------------------------------------------------------------------------------------------- -- Experience Status Bar Updates. ------------------------------------------------------------------------------------------------------------- @@ -2413,64 +2721,116 @@ end function AJM:PLAYER_LEVEL_UP( event, ... ) AJM:SendExperienceStatusUpdateCommand() - --AJM:SettingsUpdateFollowTextAll() - AJM:SendIlvlInformationUpdateCommand() +end + +function AJM:HONOR_XP_UPDATE(event, arg1, agr2, ...) + AJM:SendExperienceStatusUpdateCommand() +end + +function AJM:HONOR_LEVEL_UPDATE(event, arg1, agr2, ...) + AJM:SendExperienceStatusUpdateCommand() +end + +function AJM:HONOR_PRESTIGE_UPDATE(event, arg1, agr2, ...) + AJM:SendExperienceStatusUpdateCommand() end function AJM:SendExperienceStatusUpdateCommand() if AJM.db.showTeamList == true and AJM.db.showExperienceStatus == true then - -- Hide the xp bar at max level as its nolonger needed. - local uLevel = UnitLevel("player") - local maxLevel = GetMaxPlayerLevel() - --[[ - if uLevel == maxLevel then - --AJM:Print("maxLevel", uLevel, maxLevel) --debug - AJM.db.showExperienceStatus = false - AJM.SettingsRefresh() - AJM:JambaSendSettings() - end - --]] + --Player XP local playerExperience = UnitXP( "player" ) local playerMaxExperience = UnitXPMax( "player" ) local playerMaxLevel = GetMaxPlayerLevel() local playerLevel = UnitLevel("player") local exhaustionStateID, exhaustionStateName, exhaustionStateMultiplier = GetRestState() - if AJM.db.showTeamListOnMasterOnly == true then - AJM:JambaSendCommandToMaster( AJM.COMMAND_EXPERIENCE_STATUS_UPDATE, playerExperience, playerMaxExperience, exhaustionStateID) + --Artifact XP + local artifactName = "n/a" + local artifactXP = 0 + local artifactForNextPoint = 100 + local artifactPointsAvailable = 0 + if ArtifactWatchBar:IsShown() == true then + local itemID, altItemID, name, icon, totalXP, pointsSpent, quality, artifactAppearanceID, appearanceModID, itemAppearanceID, altItemAppearanceID, altOnTop = C_ArtifactUI.GetEquippedArtifactInfo() + local numPointsAvailableToSpend, xp, xpForNextPoint = MainMenuBar_GetNumArtifactTraitsPurchasableFromXP(pointsSpent, totalXP) + artifactName = name + artifactXP = xp + artifactForNextPoint = xpForNextPoint + artifactPointsAvailable = numPointsAvailableToSpend + end + local honorXP = UnitHonor("player") + local honorMax = UnitHonorMax("player") + -- A DityDityHack if capped --Ebony + if honorMax == 0 then + honorMax = 10000 + end + local HonorLevel = UnitHonorLevel("player") + local honorExhaustionStateID = GetHonorRestState() + if not (honorexhaustionStateID == 1) then + honorExhaustionStateID = 0 + end + + + -- AJM:Print("testSend", honorXP, honorMax, HonorLevel, honorExhaustionStateID) + + + if AJM.db.showTeamListOnMasterOnly == true then + --AJM:Print("Test", characterName, name, xp, xpForNextPoint, numPointsAvailableToSpend) + AJM:JambaSendCommandToMaster( AJM.COMMAND_EXPERIENCE_STATUS_UPDATE, playerExperience, playerMaxExperience, exhaustionStateID, artifactName, artifactXP, artifactForNextPoint, artifactPointsAvailable, honorXP, honorMax, HonorLevel, honorExhaustionStateID ) else AJM:DebugMessage( "SendExperienceStatusUpdateCommand TO TEAM!" ) - AJM:JambaSendCommandToTeam( AJM.COMMAND_EXPERIENCE_STATUS_UPDATE, playerExperience, playerMaxExperience, exhaustionStateID) + --AJM:Print("Test", characterName, name, xp, xpForNextPoint, numPointsAvailableToSpend) + AJM:JambaSendCommandToTeam( AJM.COMMAND_EXPERIENCE_STATUS_UPDATE, playerExperience, playerMaxExperience, exhaustionStateID, artifactName, artifactXP, artifactForNextPoint, artifactPointsAvailable, honorXP, honorMax, HonorLevel, honorExhaustionStateID) end end end -function AJM:ProcessUpdateExperienceStatusMessage( characterName, playerExperience, playerMaxExperience, exhaustionStateID, range ) - AJM:UpdateExperienceStatus( characterName, playerExperience, playerMaxExperience, exhaustionStateID, range ) +function AJM:ProcessUpdateExperienceStatusMessage( characterName, playerExperience, playerMaxExperience, exhaustionStateID, artifactName, artifactXP, artifactForNextPoint, artifactPointsAvailable, honorXP, honorMax, HonorLevel, honorExhaustionStateID) + AJM:UpdateExperienceStatus( characterName, playerExperience, playerMaxExperience, exhaustionStateID, artifactName, artifactXP, artifactForNextPoint, artifactPointsAvailable, honorXP, honorMax, HonorLevel, honorExhaustionStateID ) end function AJM:SettingsUpdateExperienceAll() for characterName, characterStatusBar in pairs( AJM.characterStatusBar ) do - AJM:UpdateExperienceStatus( characterName, nil, nil, nil, nil ) + AJM:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil ) end end -function AJM:UpdateExperienceStatus( characterName, playerExperience, playerMaxExperience, exhaustionStateID, range ) - --AJM:Print( "UpdateExperienceStatus", characterName, playerExperience, playerMaxExperience, exhaustionStateID, range) - +function AJM:UpdateExperienceStatus( characterName, playerExperience, playerMaxExperience, exhaustionStateID, artifactName, artifactXP, artifactForNextPoint, artifactPointsAvailable, honorXP, honorMax, HonorLevel, honorExhaustionStateID ) +--AJM:Print( "UpdateExperienceStatus", characterName, playerExperience, playerMaxExperience, exhaustionStateID) +-- AJM:Print("ArtTest", characterName, "name", artifactName, "xp", artifactXP, "Points", artifactForNextPoint, artifactPointsAvailable) +-- AJM:Print("honorTest", characterName, honorXP, honorMax, HonorLevel, honorExhaustionStateID) if CanDisplayTeamList() == false then return end if AJM.db.showExperienceStatus == false then return end - characterName = JambaUtilities:AddRealmToNameIfMissing( characterName ) local characterStatusBar = AJM.characterStatusBar[characterName] if characterStatusBar == nil then return end + local experienceBarText = characterStatusBar["experienceBarText"] local experienceBar = characterStatusBar["experienceBar"] + + local experienceArtBarText = characterStatusBar["experienceArtBarText"] + if characterStatusBar["experienceArtBarText"] == nil then + return + end + local experienceArtBar = characterStatusBar["experienceArtBar"] + if characterStatusBar["experienceArtBar"] == nil then + return + end + local experienceHonorBarText = characterStatusBar["experienceHonorBarText"] + if characterStatusBar["experienceHonorBarText"] == nil then + return + end + local experienceHonorBar = characterStatusBar["experienceHonorBar"] + if characterStatusBar["experienceHonorBar"] == nil then + return + end + + + if playerExperience == nil then playerExperience = experienceBarText.playerExperience end @@ -2479,13 +2839,63 @@ function AJM:UpdateExperienceStatus( characterName, playerExperience, playerMaxE end if exhaustionStateID == nil then exhaustionStateID = experienceBarText.exhaustionStateID + end + + if artifactName == nil then + artifactName = experienceArtBarText.artifactName + end + + if artifactXP == nil then + artifactXP = experienceArtBarText.artifactXP + end + + if artifactForNextPoint == nil then + artifactForNextPoint = experienceArtBarText.artifactForNextPoint + end + + if artifactPointsAvailable == nil then + artifactPointsAvailable = experienceArtBarText.artifactPointsAvailable + end + + if honorXP == nil then + honorXP = experienceHonorBarText.honorXP + end + + if honorMax == nil then + honorMax = experienceHonorBarText.honorMax + end + + if HonorLevel == nil then + honorLevel = experienceHonorBarText.honorLevel + end + + if honorExhaustionStateID == nil then + honorExhaustionStateID = experienceHonorBarText.honorExhaustionStateID end experienceBarText.playerExperience = playerExperience experienceBarText.playerMaxExperience = playerMaxExperience experienceBarText.exhaustionStateID = exhaustionStateID + experienceArtBarText.artifactName = artifactName + experienceArtBarText.artifactXP = artifactXP + experienceArtBarText.artifactForNextPoint = artifactForNextPoint + experienceArtBarText.artifactPointsAvailable = artifactPointsAvailable + experienceHonorBarText.honorXP = honorXP + experienceHonorBarText.honorMax = honorMax + experienceHonorBarText.honorLevel = honorLevel + experienceHonorBarText.honorExhaustionStateID = honorExhaustionStateID + + experienceBar:SetMinMaxValues( 0, tonumber( playerMaxExperience ) ) experienceBar:SetValue( tonumber( playerExperience ) ) + + experienceArtBar:SetMinMaxValues( 0, tonumber( artifactForNextPoint ) ) + experienceArtBar:SetValue( tonumber( artifactXP ) ) + + experienceHonorBar:SetMinMaxValues( 0, tonumber( honorMax ) ) + experienceHonorBar:SetValue( tonumber( honorXP ) ) + +--[[ if UnitInParty(Ambiguate( characterName, "none" ) ) == true then if range == false then experienceBar:SetAlpha( 0.5 ) @@ -2495,26 +2905,70 @@ function AJM:UpdateExperienceStatus( characterName, playerExperience, playerMaxE else experienceBar:SetAlpha( 1 ) end +--]] local text = "" if AJM.db.experienceStatusShowValues == true then - text = text..tostring( playerExperience )..L[" / "]..tostring( playerMaxExperience )..L[" "] + text = text..tostring( AbbreviateLargeNumbers(playerExperience) )..L[" / "]..tostring( AbbreviateLargeNumbers(playerMaxExperience) )..L[" "] end if AJM.db.experienceStatusShowPercentage == true then if AJM.db.experienceStatusShowValues == true then - text = text..L["("]..tostring( floor( (playerExperience/playerMaxExperience)*100) )..L["%"]..L[")"] + text = tostring( AbbreviateLargeNumbers(playerExperience) )..L[" "]..L["("]..tostring( floor( (playerExperience/playerMaxExperience)*100) )..L["%"]..L[")"] else text = tostring( floor( (playerExperience/playerMaxExperience)*100) )..L["%"] end end - experienceBarText:SetText( text ) + experienceBarText:SetText( text ) if exhaustionStateID == 1 then experienceBar:SetStatusBarColor( 0.0, 0.39, 0.88, 1.0 ) - experienceBar.backgroundTexture:SetTexture( 0.0, 0.39, 0.88, 0.15 ) + experienceBar.backgroundTexture:SetColorTexture( 0.0, 0.39, 0.88, 0.15 ) else experienceBar:SetStatusBarColor( 0.58, 0.0, 0.55, 1.0 ) - experienceBar.backgroundTexture:SetTexture( 0.58, 0.0, 0.55, 0.15 ) + experienceBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 ) end -end + + --ArtText + local artText = "" + --AJM:Print("TextTest", artifactXP, artifactForNextPoint) + if AJM.db.experienceStatusShowValues == true then + artText = artText..tostring( AbbreviateLargeNumbers(artifactXP ) )..L[" / "]..tostring( AbbreviateLargeNumbers(artifactForNextPoint) )..L[" "] + end + if AJM.db.experienceStatusShowPercentage == true then + if AJM.db.experienceStatusShowValues == true then + artText = tostring( AbbreviateLargeNumbers(artifactXP ) )..L[" "]..L["("]..tostring( floor( (artifactXP/artifactForNextPoint)*100) )..L["%"]..L[")"] + else + artText = tostring( floor( (artifactXP/artifactForNextPoint)*100) )..L["%"] + end + end + --AJM: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 ) + + + --HonorText + local honorText = "" + if AJM.db.experienceStatusShowValues == true then + honorText = honorText..tostring( AbbreviateLargeNumbers(honorXP) )..L[" / "]..tostring( AbbreviateLargeNumbers(honorMax) )..L[" "] + end + if AJM.db.experienceStatusShowPercentage == true then + if AJM.db.experienceStatusShowValues == true then + honorText = tostring( AbbreviateLargeNumbers(honorXP) )..L[" "]..L["("]..tostring( floor( (honorXP/honorMax)*100) )..L["%"]..L[")"] + else + honorText = tostring( floor( (honorXP/honorMax)*100) )..L["%"] + end + end + experienceHonorBarText:SetText( honorText ) + if honorExhaustionStateID == 1 then + experienceHonorBar:SetStatusBarColor( 1.0, 0.71, 0.0, 1.0 ) + experienceHonorBar.backgroundTexture:SetColorTexture( 1.0, 0.71, 0.0, 0.20 ) + else + experienceHonorBar:SetStatusBarColor( 1.0, 0.24, 0.0, 1.0 ) + experienceHonorBar.backgroundTexture:SetColorTexture( 1.0, 0.24, 0.0, 0.20 ) + end +end + + + ------------------------------------------------------------------------------------------------------------- -- Reputation Status Bar Updates. @@ -2529,7 +2983,7 @@ function AJM:SetWatchedFactionIndex( index ) end function AJM:SendReputationStatusUpdateCommand() - if AJM.db.showTeamList == true and AJM.db.showReputationStatus == true then + if AJM.db.showTeamList == true and AJM.db.showRepStatus == true then local reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue = GetWatchedFactionInfo() if AJM.db.showTeamListOnMasterOnly == true then AJM:JambaSendCommandToMaster( AJM.COMMAND_REPUTATION_STATUS_UPDATE, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue ) @@ -2539,8 +2993,8 @@ function AJM:SendReputationStatusUpdateCommand() end end -function AJM:ProcessUpdateReputationStatusMessage( characterName, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue, range ) - AJM:UpdateReputationStatus( characterName, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue, range ) +function AJM:ProcessUpdateReputationStatusMessage( characterName, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue) + AJM:UpdateReputationStatus( characterName, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue) end function AJM:SettingsUpdateReputationAll() @@ -2549,11 +3003,11 @@ function AJM:SettingsUpdateReputationAll() end end -function AJM:UpdateReputationStatus( characterName, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue, range ) +function AJM:UpdateReputationStatus( characterName, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue) if CanDisplayTeamList() == false then return end - if AJM.db.showReputationStatus == false then + if AJM.db.showRepStatus == false then return end characterName = JambaUtilities:AddRealmToNameIfMissing( characterName ) @@ -2591,6 +3045,7 @@ function AJM:UpdateReputationStatus( characterName, reputationName, reputationSt reputationBarValue = 100 reputationStandingID = 1 end +--[[ if UnitInParty(Ambiguate( characterName, "none" ) ) == true then if range == false then reputationBar:SetAlpha( 0.5 ) @@ -2600,22 +3055,15 @@ function AJM:UpdateReputationStatus( characterName, reputationName, reputationSt else reputationBar:SetAlpha( 1 ) end +--]] local text = "" - if AJM.db.showReputationName == true then - if reputationName == 0 then - text = text..L["No Faction Selected"].." " - else - text = text..reputationName.." " - end - end - -- TODO: do we need to hook SetWatchedFactionIndex for when a watched faction changes? - if AJM.db.reputationStatusShowValues == true then - text = text..tostring( reputationBarValue-reputationBarMin )..L[" / "]..tostring( reputationBarMax-reputationBarMin )..L[" "] - end - if AJM.db.reputationStatusShowPercentage == true then + if AJM.db.experienceStatusShowValues == true then + text = text..tostring( AbbreviateLargeNumbers(reputationBarValue-reputationBarMin) )..L[" / "]..tostring( AbbreviateLargeNumbers(reputationBarMax-reputationBarMin) )..L[" "] + end + if AJM.db.experienceStatusShowPercentage == true then local textPercentage = tostring( floor( (reputationBarValue-reputationBarMin)/(reputationBarMax-reputationBarMin)*100 ) )..L["%"] - if AJM.db.reputationStatusShowValues == true then - text = text..L["("]..textPercentage..L[")"] + if AJM.db.experienceStatusShowValues == true then + text = tostring( AbbreviateLargeNumbers(reputationBarValue-reputationBarMin) )..L[" "]..L["("]..textPercentage..L[")"] else text = text..textPercentage end @@ -2624,7 +3072,7 @@ function AJM:UpdateReputationStatus( characterName, reputationName, reputationSt local barColor = _G.FACTION_BAR_COLORS[reputationStandingID] if barColor ~= nil then reputationBar:SetStatusBarColor( barColor.r, barColor.g, barColor.b, 1.0 ) - reputationBar.backgroundTexture:SetTexture( barColor.r, barColor.g, barColor.b, 0.15 ) + reputationBar.backgroundTexture:SetColorTexture( barColor.r, barColor.g, barColor.b, 0.15 ) end end @@ -2633,7 +3081,7 @@ end ------------------------------------------------------------------------------------------------------------- function AJM:UNIT_HEALTH( event, unit, ... ) - AJM:SendHealthStatusUpdateCommand( unit,nil ) + AJM:SendHealthStatusUpdateCommand( unit, nil ) --AJM:Print("test2", unit) end @@ -2642,7 +3090,7 @@ function AJM:UNIT_MAXHEALTH( event, unit, ... ) end -function AJM:SendHealthStatusUpdateCommand( unit, range ) +function AJM:SendHealthStatusUpdateCommand( unit ) if AJM.db.showTeamList == true and AJM.db.showHealthStatus == true then local playerHealth = UnitHealth( unit ) local playerMaxHealth = UnitHealthMax( unit ) @@ -2650,7 +3098,7 @@ function AJM:SendHealthStatusUpdateCommand( unit, range ) local characterName, characterRealm = UnitName( unit ) local character = JambaUtilities:AddRealmToNameIfNotNil( characterName, characterRealm ) --AJM:Print("HeathStats", character, playerHealth, playerMaxHealth, range) - AJM:UpdateHealthStatus( character, playerHealth, playerMaxHealth, range, isDead ) + AJM:UpdateHealthStatus( character, playerHealth, playerMaxHealth, isDead ) end end @@ -2660,7 +3108,8 @@ function AJM:SettingsUpdateHealthAll() end end -function AJM:UpdateHealthStatus( characterName, playerHealth, playerMaxHealth, range, isDead ) +function AJM:UpdateHealthStatus( characterName, playerHealth, playerMaxHealth, isDead ) + --AJM:Print("testUpdate", characterName, playerHealth, playerMaxHealth, isDead) if CanDisplayTeamList() == false then return end @@ -2674,12 +3123,17 @@ function AJM:UpdateHealthStatus( characterName, playerHealth, playerMaxHealth, r end local healthBarText = characterStatusBar["healthBarText"] local healthBar = characterStatusBar["healthBar"] + + if playerMaxHealth == 0 then + playerMaxHealth = healthBarText.playerMaxHealth + end if playerHealth == nil then playerHealth = healthBarText.playerHealth end if playerMaxHealth == nil then playerMaxHealth = healthBarText.playerMaxHealth end +--[[ if UnitInParty(Ambiguate( characterName, "none" ) ) == true then if range == false then healthBar:SetAlpha( 0.5 ) @@ -2689,43 +3143,43 @@ function AJM:UpdateHealthStatus( characterName, playerHealth, playerMaxHealth, r else healthBar:SetAlpha( 1 ) end +]] healthBarText.playerHealth = playerHealth healthBarText.playerMaxHealth = playerMaxHealth healthBar:SetMinMaxValues( 0, tonumber( playerMaxHealth ) ) healthBar:SetValue( tonumber( playerHealth ) ) local text = "" if UnitIsDeadOrGhost(Ambiguate( characterName, "none" ) ) == true then - --if isDead == true then --AJM:Print("dead", characterName) - text = text..L["DEAD"] + text = text..L["DEAD"] else if AJM.db.healthStatusShowValues == true then - text = text..tostring( playerHealth )..L[" / "]..tostring( playerMaxHealth )..L[" "] + text = text..tostring( AbbreviateLargeNumbers(playerHealth) )..L[" / "]..tostring( AbbreviateLargeNumbers(playerMaxHealth) )..L[" "] end if AJM.db.healthStatusShowPercentage == true then if AJM.db.healthStatusShowValues == true then - text = text..L["("]..tostring( floor( (playerHealth/playerMaxHealth)*100) )..L["%"]..L[")"] + text = tostring( AbbreviateLargeNumbers(playerHealth) )..L[" "]..L["("]..tostring( floor( (playerHealth/playerMaxHealth)*100) )..L["%"]..L[")"] else text = tostring( floor( (playerHealth/playerMaxHealth)*100) )..L["%"] end end end healthBarText:SetText( text ) - AJM:SetStatusBarColourForHealth( healthBar, floor((playerHealth/playerMaxHealth)*100) ) + AJM:SetStatusBarColourForHealth( healthBar, floor((playerHealth/playerMaxHealth)*100), characterName) end -function AJM:SetStatusBarColourForHealth( statusBar, statusValue ) +function AJM:SetStatusBarColourForHealth( statusBar, statusValue, characterName ) local r, g, b = 0, 0, 0 - statusValue = statusValue / 100 - if( statusValue > 0.5 ) then - r = (1.0 - statusValue) * 2 - g = 1.0 - else - r = 1.0 - g = statusValue * 2 - end - b = 0.0 - statusBar:SetStatusBarColor( r, g, b ) + statusValue = statusValue / 100 + if( statusValue > 0.5 ) then + r = (1.0 - statusValue) * 2 + g = 1.0 + else + r = 1.0 + g = statusValue * 2 + end + b = 0.0 + statusBar:SetStatusBarColor( r, g, b ) end ------------------------------------------------------------------------------------------------------------- @@ -2733,7 +3187,7 @@ end ------------------------------------------------------------------------------------------------------------- function AJM:UNIT_POWER( event, unit, ... ) - AJM:SendPowerStatusUpdateCommand( unit ) + AJM:SendPowerStatusUpdateCommand( unit ) end function AJM:UNIT_DISPLAYPOWER( event, unit, ... ) @@ -2757,13 +3211,14 @@ function AJM:SettingsUpdatePowerAll() end end -function AJM:UpdatePowerStatus( characterName, playerPower, playerMaxPower, range ) +function AJM:UpdatePowerStatus( characterName, playerPower, playerMaxPower) + --AJM:Print("testPOwer", characterName, playerPower, playerMaxPower ) if CanDisplayTeamList() == false then return end if AJM.db.showPowerStatus == false then return - end + end local originalChatacterName = characterName characterName = JambaUtilities:AddRealmToNameIfMissing( characterName ) local characterStatusBar = AJM.characterStatusBar[characterName] @@ -2772,12 +3227,18 @@ function AJM:UpdatePowerStatus( characterName, playerPower, playerMaxPower, rang end local powerBarText = characterStatusBar["powerBarText"] local powerBar = characterStatusBar["powerBar"] + + if playerMaxPower == 0 then + playerMaxPower = powerBarText.playerMaxPower + end + if playerPower == nil then playerPower = powerBarText.playerPower end if playerMaxPower == nil then playerMaxPower = powerBarText.playerMaxPower end +--[[ if UnitInParty(Ambiguate( characterName, "none" ) ) == true then if range == false then powerBar:SetAlpha( 0.5 ) @@ -2786,18 +3247,19 @@ function AJM:UpdatePowerStatus( characterName, playerPower, playerMaxPower, rang end else powerBar:SetAlpha( 1 ) - end + end]] + powerBarText.playerPower = playerPower powerBarText.playerMaxPower = playerMaxPower powerBar:SetMinMaxValues( 0, tonumber( playerMaxPower ) ) powerBar:SetValue( tonumber( playerPower ) ) local text = "" if AJM.db.powerStatusShowValues == true then - text = text..tostring( playerPower )..L[" / "]..tostring( playerMaxPower )..L[" "] + text = text..tostring( AbbreviateLargeNumbers(playerPower) )..L[" / "]..tostring( AbbreviateLargeNumbers(playerMaxPower) )..L[" "] end if AJM.db.powerStatusShowPercentage == true then if AJM.db.powerStatusShowValues == true then - text = text..L["("]..tostring( floor( (playerPower/playerMaxPower)*100) )..L["%"]..L[")"] + text = tostring( AbbreviateLargeNumbers(playerPower) )..L[" "]..L["("]..tostring( floor( (playerPower/playerMaxPower)*100) )..L["%"]..L[")"] else text = tostring( floor( (playerPower/playerMaxPower)*100) )..L["%"] end @@ -2814,7 +3276,7 @@ function AJM:SetStatusBarColourForPower( statusBar, unit ) local g = PowerBarColor[powerString].g local b = PowerBarColor[powerString].b statusBar:SetStatusBarColor( r, g, b, 1 ) - statusBar.backgroundTexture:SetTexture( r, g, b, 0.25 ) + statusBar.backgroundTexture:SetColorTexture( r, g, b, 0.25 ) end end @@ -2822,36 +3284,93 @@ end -- Combo Points Status Bar Updates. ------------------------------------------------------------------------------------------------------------- -function AJM:UNIT_COMBO_POINTS( event, ... ) - --AJM:Print("hello") - AJM:SendComboStatusUpdateCommand() +function AJM:UNIT_POWER_FREQUENT( event, Unit, powerType, ... ) + --TODO there got to be a better way to clean this code up Checking to see if its the event we need and then send the command to the update if it is. + --AJM:Print("EventTest", Unit, powerType) + if Unit == "player" then + --AJM:Print("player", Unit, powerType) + if( event and powerType == "COMBO_POINTS" ) then + AJM:SendComboStatusUpdateCommand() + elseif( event and powerType == "SOUL_SHARDS" ) then + AJM:SendComboStatusUpdateCommand() + elseif( event and powerType == "HOLY_POWER" ) then + AJM:SendComboStatusUpdateCommand() + elseif( event and powerType == "ARCANE_CHARGES" ) then + AJM:SendComboStatusUpdateCommand() + elseif( event and powerType == "CHI" ) then + AJM:SendComboStatusUpdateCommand() + else + return + end + end end +function AJM:RUNE_POWER_UPDATE( event, ...) + AJM:SendComboStatusUpdateCommand() +end ---function AJM:UNIT_DISPLAYCOMBO( event, unit, ... ) --- AJM:SendComboStatusUpdateCommand( unit ) ---end +function AJM:PLAYER_TALENT_UPDATE(event, ...) + AJM:SendComboStatusUpdateCommand() +end function AJM:SendComboStatusUpdateCommand() + --AJM:Print("test") if AJM.db.showTeamList == true and AJM.db.showComboStatus == true then - if select(2, UnitClass("player")) ~= "DRUID" and select(2, UnitClass("player")) ~= "ROGUE" == true then + -- get powerType from http://wowprogramming.com/docs/api_types#powerType as there no real API to get this infomation as of yet. + local Class = select(2, UnitClass("player")) + --AJM:Print("class", Class) + -- Combo Points + if Class == "DRUID" then + PowerType = 4 + -- Combo Points + elseif Class == "ROGUE" then + PowerType = 4 + -- Warlock's soulshards + elseif Class == "WARLOCK" then + PowerType = 7 + -- Paladin Holy Power + elseif Class == "PALADIN" then + PowerType = 9 + -- DEATHKNIGHT Runes + elseif Class == "DEATHKNIGHT" then + PowerType = 5 + -- Mage ARCANE_CHARGES + elseif Class == "MAGE" then + PowerType = 16 + -- Monk Cil + elseif Class == "MONK" then + PowerType = 12 + else return - end - - local playerCombo = UnitPower ( "player", 4) - local playerMaxCombo = UnitPowerMax( "player", 4) - --AJM:Print ("combo", playerCombo, playerMaxCombo) + end + + local playerCombo = UnitPower ( "player", PowerType) + local playerMaxCombo = UnitPowerMax( "player", PowerType) + + --Deathkight Dity Hacky Hacky. + if Class == "DEATHKNIGHT" then + for i=1, playerMaxCombo do + local start, duration, runeReady = GetRuneCooldown(i) + if not runeReady then + playerCombo = playerCombo - 1 + end + end + end + + + --AJM:Print ("PowerType", PowerType, playerCombo, playerMaxCombo) if AJM.db.showTeamListOnMasterOnly == true then + AJM:DebugMessage( "SendComboStatusUpdateCommand TO Master!" ) AJM:JambaSendCommandToMaster( AJM.COMMAND_COMBO_STATUS_UPDATE, playerCombo, playerMaxCombo ) else AJM:DebugMessage( "SendComboStatusUpdateCommand TO TEAM!" ) AJM:JambaSendCommandToTeam( AJM.COMMAND_COMBO_STATUS_UPDATE, playerCombo, playerMaxCombo ) end - end + end end -function AJM:ProcessUpdateComboStatusMessage( characterName, playerCombo, playerMaxCombo, range ) - AJM:UpdateComboStatus( characterName, playerCombo , playerMaxCombo, range ) +function AJM:ProcessUpdateComboStatusMessage( characterName, playerCombo, playerMaxCombo ) + AJM:UpdateComboStatus( characterName, playerCombo , playerMaxCombo) end function AJM:SettingsUpdateComboAll() @@ -2860,7 +3379,7 @@ function AJM:SettingsUpdateComboAll() end end -function AJM:UpdateComboStatus( characterName, playerCombo, playerMaxCombon, range ) +function AJM:UpdateComboStatus( characterName, playerCombo, playerMaxCombo ) if CanDisplayTeamList() == false then return end @@ -2880,7 +3399,9 @@ function AJM:UpdateComboStatus( characterName, playerCombo, playerMaxCombon, ran if playerCombo == nil then playerCombo = comboBarText.playerCombo end - + if playerMaxCombo == 0 then + playerMaxCombo = comboBarText.playerMaxCombo + end if playerMaxCombo == nil then playerMaxCombo = comboBarText.playerMaxCombo end @@ -2889,6 +3410,7 @@ function AJM:UpdateComboStatus( characterName, playerCombo, playerMaxCombon, ran comboBarText.playerMaxCombo = playerMaxCombo comboBar:SetMinMaxValues( 0, tonumber( playerMaxCombo ) ) comboBar:SetValue( tonumber( playerCombo ) ) +--[[ if UnitInParty(Ambiguate( characterName, "none" ) ) == true then if range == false then comboBar:SetAlpha( 0.5 ) @@ -2898,35 +3420,52 @@ function AJM:UpdateComboStatus( characterName, playerCombo, playerMaxCombon, ran else comboBar:SetAlpha( 1 ) end +]] local text = "" if AJM.db.comboStatusShowValues == true then - text = text..tostring( playerCombo )..L[" / "]..tostring( playerMaxCombo )..L[" "] + text = text..tostring( AbbreviateLargeNumbers(playerCombo) )..L[" / "]..tostring( AbbreviateLargeNumbers(playerMaxCombo) )..L[" "] end if AJM.db.ComboStatusShowPercentage == true then if AJM.db.comboStatusShowValues == true then - text = text..L["("]..tostring( floor( (playerCombo/playerMaxCombo)*100) )..L["%"]..L[")"] + text = text..tostring( AbbreviateLargeNumbers(playerCombo) )..L[" "]..L["("]..tostring( floor( (playerCombo/playerMaxCombo)*100) )..L["%"]..L[")"] else text = tostring( floor( (playerCombo/playerMaxCombo)*100) )..L["%"] end end - comboBarText:SetText( text ) -end - ---[[ -function AJM:SetStatusBarColourForCombo( statusBar, unit ) - local powerIndex, powerString, altR, altG, altB = UnitPowerType( unit ) - if comboString ~= nil and comboString ~= "" then - local r = ComboBarColor[powerString].r - local g = ComboBarColor[powerString].g - local b = ComboBarColor[powerString].b - statusBar:SetStatusBarColor( r, g, b, 1 ) - statusBar.backgroundTexture:SetTexture( r, g, b, 0.25 ) - end - + comboBarText:SetText( text ) + AJM:SetStatusBarColourForCombo( comboBar ) +end + + +function AJM:SetStatusBarColourForCombo( comboBar ) + local Class = select(2, UnitClass("player")) + if Class == "WARLOCK" then + -- Purple + comboBar:SetStatusBarColor( 0.58, 0.51, 0.79, 1 ) + comboBar.backgroundTexture:SetColorTexture( 0.58, 0.51, 0.79, 0.25) + elseif Class == "PALADIN" then + --yellow(gold) + comboBar:SetStatusBarColor( 0.96, 0.55, 0.73, 1 ) + comboBar.backgroundTexture:SetColorTexture( 0.96, 0.55, 0.73, 0.25) + elseif Class =="DEATHKNIGHT" then + --Sky Blue? + comboBar:SetStatusBarColor( 0.60, 0.80, 1.0, 1 ) + comboBar.backgroundTexture:SetColorTexture( 0.60, 0.80, 1.0, 0.25) + elseif Class =="MAGE" then + --Very Blue ice? + comboBar:SetStatusBarColor( 0.07, 0.30, 0.92, 1 ) + comboBar.backgroundTexture:SetColorTexture( 0.07, 0.30, 0.92, 0.25) + elseif Class =="MONK" then + --Greenish + comboBar:SetStatusBarColor( 0.44, 0.79, 0.67, 1 ) + comboBar.backgroundTexture:SetColorTexture( 0.44, 0.79, 0.67, 0.25) + else + return + end end ---]] + ------------------------------------------------------------------------------------------------------------- -- Addon initialization, enabling and disabling. @@ -2960,21 +3499,15 @@ function AJM:OnEnable() AJM:RegisterEvent( "UNIT_MAXHEALTH" ) AJM:RegisterEvent( "UNIT_POWER", "UNIT_POWER" ) AJM:RegisterEvent( "UNIT_MAXPOWER", "UNIT_POWER" ) - AJM:RegisterEvent( "PLAYER_EQUIPMENT_CHANGED" ) - AJM:RegisterEvent( "PLAYER_ENTERING_WORLD") + AJM:RegisterEvent( "PLAYER_ENTERING_WORLD" ) AJM:RegisterEvent( "UNIT_DISPLAYPOWER" ) - AJM:RegisterEvent( "UNIT_LEVEL" ) - AJM:RegisterEvent( "ITEMLVL_PUSH" ) - AJM:RegisterEvent( "GROUP_ROSTER_UPDATE" ) - AJM:RegisterEvent( "ITEM_PUSH" ) AJM:RegisterEvent( "CHAT_MSG_COMBAT_FACTION_CHANGE" ) - AJM:RegisterEvent( "UNIT_COMBO_POINTS" ) - --Updating Bag information -- Chaneged again 4.1 this event fires even for bank bags. When moving an item in your inventory, this fires multiple times: once each for the source and destination bag - AJM:RegisterEvent( "BAG_UPDATE", "ITEM_PUSH" ) - --Updates everytime jamba Reads the UI_ERROR_MESSAGE Are This is not very good for me using a spambar! Need's a better system. - --AJM:RegisterEvent( "UI_ERROR_MESSAGE", "ITEM_PUSH" ) - --TODO: Clean up code - --AJM:RegisterEvent( "UNIT_PORTRAIT_UPDATE" ) + AJM:RegisterEvent( "UNIT_POWER_FREQUENT") + AJM:RegisterEvent( "RUNE_POWER_UPDATE" ) + AJM:RegisterEvent( "PLAYER_TALENT_UPDATE") + AJM:RegisterEvent( "HONOR_XP_UPDATE" ) + AJM:RegisterEvent( "HONOR_LEVEL_UPDATE" ) + AJM:RegisterEvent( "HONOR_PRESTIGE_UPDATE" ) AJM.SharedMedia.RegisterCallback( AJM, "LibSharedMedia_Registered" ) AJM.SharedMedia.RegisterCallback( AJM, "LibSharedMedia_SetGlobal" ) AJM:RegisterMessage( JambaApi.MESSAGE_TEAM_CHARACTER_ADDED, "OnCharactersChanged" ) @@ -2984,43 +3517,47 @@ function AJM:OnEnable() AJM:RegisterMessage( JambaApi.MESSAGE_CHARACTER_ONLINE, "OnCharactersChanged") AJM:RegisterMessage( JambaApi.MESSAGE_CHARACTER_OFFLINE, "OnCharactersChanged") AJM:SecureHook( "SetWatchedFactionIndex" ) - AJM:ScheduleTimer( "RefreshTeamListControls", 20 ) + AJM:ScheduleTimer( "RefreshTeamListControls", 3 ) AJM:ScheduleTimer( "SendExperienceStatusUpdateCommand", 5 ) AJM:ScheduleTimer( "SendReputationStatusUpdateCommand", 5 ) - AJM:ScheduleTimer( "SendBagInformationUpdateCommand", 5 ) - AJM:ScheduleTimer( "SendIlvlInformationUpdateCommand", 5 ) - --AJM:timerCount = ( 0 ) - --AJM:testTimer = - --self.timerCount = 0 - AJM:ScheduleRepeatingTimer("RangeUpdateCommand", 5) + AJM:ScheduleTimer( "SendInfomationUpdateCommand", 5 ) + AJM:ScheduleTimer( "SendHealthStatusUpdateCommand", 5, "player" ) + AJM:ScheduleTimer( "SendPowerStatusUpdateCommand", 5, "player" ) + AJM:ScheduleTimer( "SendComboStatusUpdateCommand", 5 ) + --AJM:ScheduleRepeatingTimer("SendExperienceStatusUpdateCommand", 5) end -- Called when the addon is disabled. function AJM:OnDisable() end --- this is not needed as the range timer would do this. function AJM:PLAYER_ENTERING_WORLD( event, ... ) - AJM:SendBagInformationUpdateCommand() - AJM:SendExperienceStatusUpdateCommand() - AJM:SendIlvlInformationUpdateCommand() - AJM:SendReputationStatusUpdateCommand() + --AJM:ScheduleTimer( "UpdateAll", 3 ) +end + +function AJM:UpdateAll(event, ...) + AJM:ScheduleTimer( "RefreshTeamListControls", 3 ) + AJM:ScheduleTimer( "SendExperienceStatusUpdateCommand", 2 ) + AJM:ScheduleTimer( "SendReputationStatusUpdateCommand", 2 ) + AJM:ScheduleTimer( "SendInfomationUpdateCommand", 2 ) + AJM:ScheduleTimer( "SendComboStatusUpdateCommand", 2 ) + for index, characterName in JambaApi.TeamListOrderedOnline() do + unit = Ambiguate( characterName, "none" ) + AJM:ScheduleTimer( "SendHealthStatusUpdateCommand", 2, unit ) + AJM:ScheduleTimer( "SendPowerStatusUpdateCommand", 2, unit ) + end end + function AJM:OnMasterChanged( message, characterName ) AJM:SettingsRefresh() end - +--[[ function AJM:UNIT_LEVEL( event, ... ) --AJM:SettingsUpdateFollowTextAll() AJM:SendIlvlInformationUpdateCommand() -end +end]] -function AJM:GROUP_ROSTER_UPDATE( event, ... ) - --AJM:SettingsUpdateFollowTextAll() - AJM:SendIlvlInformationUpdateCommand() - AJM:SendBagInformationUpdateCommand() -end function AJM:PLAYER_REGEN_ENABLED( event, ... ) if AJM.db.hideTeamListInCombat == true then @@ -3048,5 +3585,7 @@ end function AJM:OnCharactersChanged() AJM:RefreshTeamListControls() - AJM:SendIlvlInformationUpdateCommand() -end \ No newline at end of file + --AJM:SendIlvlInformationUpdateCommand() +end + + diff --git a/Jamba-DisplayTeam/Locales/JambaDisplayTeam-Locale-enUS.lua b/Jamba-DisplayTeam/Locales/JambaDisplayTeam-Locale-enUS.lua index 27f523b..8b74b88 100644 --- a/Jamba-DisplayTeam/Locales/JambaDisplayTeam-Locale-enUS.lua +++ b/Jamba-DisplayTeam/Locales/JambaDisplayTeam-Locale-enUS.lua @@ -39,10 +39,10 @@ L["Width"] = true L["Height"] = true L["Portrait"] = true L["Follow Status Bar"] = true -L["Experience Bar"] = true +L["Experience Bars"] = true L["Health Bar"] = true L["Power Bar"] = true -L["Combo Point Bar"] = true +L["Class Power Bar"] = true L["Jamba Team"] = true L["Hide Team Display"] = true L["Hide the display team panel."] = true @@ -53,6 +53,9 @@ L["Enable Clique Support - **reload UI to take effect**"] = true L["Transparency"] = true L["Border Colour"] = true L["Background Colour"] = true +L["Arial Narrow"] = true +L["Font"] = true +L["Font Size"] = true L["Display Team List Horizontally"] = true L["Show Team List Title"] = true L["Bag Information"] = true @@ -64,5 +67,53 @@ L["Show Item Level"] = true L["Equipped iLvl Only"] = true L["Stack Text"] = true L["DEAD"] = true -L["BgS"] = true -L["Dura"] = true \ No newline at end of file +L["OffLine"] = true + +--new stuff +L["Toon Information"] = true +L["Player Level:"] = true +L["Item Level:"] = true +L["Bag Space:"] = true +L["Durability:"] = true +L["Gold:"] = true +L["Has New Mail From:"] = true +L["Currency:"] = true +L["Unknown Sender"] = true +L["Show ToolTip"] = true +L["Characters Per Bar"] = true +--Help System + +L["Show Team List"] = true +L["Only Show on Master Character"] = true +L["Only On Master"] = true +L["Hide Team List In Combat"] = true +L["Olny Show The Team List out of Combat"] = true +L["Enable Clique Support"] = true +L["Enable Clique Support\n\n**reload UI to take effect**"] = true +L["Show Title"] = true +L["Show the Character Portrait"] = true +L["Olny shows Equipped item Level"] = true +L["Show the Team Experience(xp) bar"] = true +L["Show the Team Reputation Bar"] = true +L["Show the Teams Health Bars"] = true +L["Show the Team Power Bar\n\nMana, Rage, Etc..."] = true +L["Show the Teams Class Power Bar\n\nComboPoints\nSoulShards\nHoly Power\nRunes\nArcane Charges\nCHI"] = true +L["Show Values"] = true +L["Show Percentage"] = true +L["Faction Name"] = true +L["Show Jamba Team or Unit Frame List"] = true +L["Show Character Name"] = true + +L["ShowHonorXP"] = true +L["Show ToolTip Information"] = true +L["Show the Follow Bar and Character Name\n\nHover Over for Character Infomation"] = true +L["Show the Team Experience bar\n\nAnd Artifact XP Bar\nAnd Honor XP Bar\nAnd Reputation Bar\n \nHover Over Bar With Mouse and Shift to Show More Infomation."] = true + +L["ShowXP"] = true +L["Show the Team Experience bar"] = true +L["ShowArtifactXP"] = true +L["Show the Team Artifact XP bar"] = true +L["Show the Team Honor XP Bar"] = true +L["ShowReputation"] = true +L["Show the Team Reputation Bar"] = true + diff --git a/Jamba-FTL/Jamba-FTL.toc b/Jamba-FTL/Jamba-FTL.toc index 801ee22..ad60a68 100644 --- a/Jamba-FTL/Jamba-FTL.toc +++ b/Jamba-FTL/Jamba-FTL.toc @@ -1,11 +1,12 @@ -## Interface: 60200 +## Interface: 70000 ## Title: JambaFTL ## Notes: JambaFTL ## Author: olipcs (although most of the code is originaly from Jafula) (any changes added to support 4.0.5 from ebony!) -## Version: 4.2.2 +## Version: 7.0.3-5.0 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba ## Dependencies: Jamba ## SavedVariables: JambaFTLProfileDB ## LoadOnDemand: 1 - Locales\Locales.xml JambaFTL.lua \ No newline at end of file diff --git a/Jamba-FTL/JambaFTL.lua b/Jamba-FTL/JambaFTL.lua index a9e4e7b..dd101d9 100644 --- a/Jamba-FTL/JambaFTL.lua +++ b/Jamba-FTL/JambaFTL.lua @@ -42,6 +42,7 @@ AJM.settings = { dontUseLeftRight = false, onlyUseUsedModifiers = true, onlyUseOnlineToons = false, + dontShowMsgs = false, assistString = "", targetString = "", followString = "", @@ -100,21 +101,27 @@ end -- Updates The AssistButton with an FTL String (called when the AJM.COMMAND_UPDATE_FTL_BUTTON is received) local function UpdateFTLAssistButton( astring ) assistButton:SetAttribute("macrotext", astring) - AJM:Print("Updating JambaFTLAssist-Button with:" .. astring) + if AJM.db.dontShowMsgs == false then + AJM:Print("Updating JambaFTLAssist-Button with:" .. astring) + end AJM.db.assistString = astring end -- Updates The FollowButton with an FTL String (called when the AJM.COMMAND_UPDATE_FTL_BUTTON is received) local function UpdateFTLFollowButton( fstring ) followButton:SetAttribute("macrotext", fstring) - AJM:Print("Updating JambaFTLFollow-Button with:" .. fstring) + if AJM.db.dontShowMsgs == false then + AJM:Print("Updating JambaFTLFollow-Button with:" .. fstring) + end AJM.db.followString = fstring end -- Updates The AssistButton with an FTL String (called when the AJM.COMMAND_UPDATE_FTL_BUTTON is received) local function UpdateFTLTargetButton( tstring ) targetButton:SetAttribute("macrotext", tstring) - AJM:Print("Updating JambaFTLTarget-Button with:" .. tstring) + if AJM.db.dontShowMsgs == false then + AJM:Print("Updating JambaFTLTarget-Button with:" .. tstring) + end AJM.db.targetString = tstring end @@ -278,7 +285,8 @@ function AJM:JambaOnSettingsReceived( characterName, settings ) AJM.db.dontUseLeftRight = settings.dontUseLeftRight AJM.db.onlyUseUsedModifiers = settings.onlyUseUsedModifiers AJM.db.onlyUseOnlineToons = settings.onlyUseOnlineToons - AJM.db.assistString = settings.assistString + AJM.db.dontShowMsgs = settings.dontShowMsgs + AJM.db.assistString = settings.assistString AJM.db.targetString = settings.targetString -- Refresh the settings. AJM:SettingsRefresh() @@ -301,7 +309,8 @@ function AJM:SettingsRefresh() AJM.settingsControl.checkBoxDontUseLeftRight:SetValue( AJM.db.dontUseLeftRight ) AJM.settingsControl.checkBoxonlyUseUsedModifiers:SetValue( AJM.db.onlyUseUsedModifiers ) AJM.settingsControl.checkBoxonlyUseOnlineToons:SetValue( AJM.db.onlyUseOnlineToons ) - local characterName = JambaApi.GetCharacterNameAtOrderPosition( AJM.settingsControl.teamListHighlightRow ) + AJM.settingsControl.checkBoxDontShowMsgs:SetValue( AJM.db.dontShowMsgs ) + local characterName = JambaApi.GetCharacterNameAtOrderPosition( AJM.settingsControl.teamListHighlightRow ) if AJM.db.CharListWithModifiers[characterName] == nil then createNewFTLListEntry( characterName ) end @@ -420,6 +429,15 @@ function SettingsCreateFTLControl( top ) L["Only use Toons which are online"], AJM.SettingsToggleonlyUseOnlineToons ) + movingTop = movingTop - checkBoxHeight + AJM.settingsControl.checkBoxDontShowMsgs = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl, + headingWidth, + column1Left, + movingTop, + L["Don't Show Update Messages"], + AJM.SettingsToggleDontShowMsgs + ) movingTop = movingTop - checkBoxHeight AJM.settingsControl.teamListButtonUpdateFTL = JambaHelperSettings:CreateButton( AJM.settingsControl, @@ -522,7 +540,7 @@ function AJM:SettingsTeamListScrollRefresh() AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetText( "" ) AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + AJM.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + AJM.settingsControl.teamListOffset if dataRowNumber <= JambaApi.GetTeamListMaximumOrder() then @@ -534,7 +552,7 @@ function AJM:SettingsTeamListScrollRefresh() AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetText( characterType ) -- Highlight the selected row. if dataRowNumber == AJM.settingsControl.teamListHighlightRow then - AJM.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + AJM.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) end end end @@ -563,6 +581,11 @@ function AJM:SettingsToggleonlyUseOnlineToons( event, checked ) AJM:SettingsRefresh() end +function AJM:SettingsToggleDontShowMsgs( event, checked ) + AJM.db.dontShowMsgs = checked + AJM:SettingsRefresh() +end + function AJM:SettingsToggleonlyUseUsedModifiers( event, checked ) AJM.db.onlyUseUsedModifiers = checked AJM:SettingsRefresh() @@ -608,8 +631,10 @@ end function AJM:CreateUpdateFTLButton(event) local ftlstring = createFTLString() - AJM:Print("FTL-String is:" .. ftlstring) - AJM:JambaSendCommandToTeam( AJM.COMMAND_UPDATE_FTL_BUTTON, ftlstring ) + if AJM.db.dontShowMsgs == false then + AJM:Print("FTL-String is:" .. ftlstring) + end + AJM:JambaSendCommandToTeam( AJM.COMMAND_UPDATE_FTL_BUTTON, ftlstring ) -- UpdateFTLButton( ftlstring ) (is done by SendCommandToTeam) end @@ -620,8 +645,9 @@ end -- A Jamba command has been received. function AJM:JambaOnCommandReceived( characterName, commandName, ... ) if commandName == AJM.COMMAND_UPDATE_FTL_BUTTON then - AJM:Print("Update recieved") - UpdateFTLButton( ... ) + -- Debug + --AJM:Print("Update recieved") + UpdateFTLButton( ... ) end end diff --git a/Jamba-FTL/Locales/JambaFTL-Locale-enUS.lua b/Jamba-FTL/Locales/JambaFTL-Locale-enUS.lua index e8943ab..6b988e8 100644 --- a/Jamba-FTL/Locales/JambaFTL-Locale-enUS.lua +++ b/Jamba-FTL/Locales/JambaFTL-Locale-enUS.lua @@ -39,3 +39,4 @@ L["Use selected Toon in FTL"] = true L["Update FTL-Button"] = true L["Updates the FTL-Button on all Team members"] = true L["Hint:Use the buttons by: /click JambaFTLAssist or /click JambaFTLTarget"] = true +L["Don't Show Update Messages"] = true diff --git a/Jamba-Follow/Jamba-Follow.toc b/Jamba-Follow/Jamba-Follow.toc index 1a8d0db..a841306 100644 --- a/Jamba-Follow/Jamba-Follow.toc +++ b/Jamba-Follow/Jamba-Follow.toc @@ -1,12 +1,13 @@ -## Interface: 60200 +## Interface: 70000 ## Title: JambaFollow ## Notes: JambaFollow ## Author: Ebony, Former Author: Jafula -## Version: 4.2.2 +## Version: 7.0.3-5.0 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba ## Dependencies: Jamba ## SavedVariables: JambaFollowProfileDB ## LoadOnDemand: 1 - Locales\Locales.xml JambaFollow.lua diff --git a/Jamba-Follow/JambaFollow.lua b/Jamba-Follow/JambaFollow.lua index a876ef6..a9d2f32 100644 --- a/Jamba-Follow/JambaFollow.lua +++ b/Jamba-Follow/JambaFollow.lua @@ -684,7 +684,7 @@ function AJM:AreTeamMembersInCombat() if JambaApi.GetCharacterOnlineStatus( characterName ) == true then -- Yes, is the character in combat? --if UnitAffectingCombat( characterName ) then - -- Ebony This API does not like A realmName so better remove it if its from the server we playing on. + -- Ebony This API does not like A realmName so better remove it its from the server we playing on. if UnitAffectingCombat( Ambiguate( characterName, "none" ) ) then inCombat = true break @@ -754,23 +754,43 @@ function AJM:SetNoFollowBrokenWarningNextSecondBreak() AJM.jambaExternalNoWarnNextSecondBreak = true end -function AJM:AUTOFOLLOW_BEGIN( event, target, ... ) - AJM.currentFollowTarget = target - AJM.isFollowing = true +function AJM:AUTOFOLLOW_BEGIN( event, target, ... ) + AJM.currentFollowTarget = target + AJM.isFollowing = true end function AJM:AUTOFOLLOW_END( event, ... ) + AJM.isFollowing = false + AJM:ScheduleTimer( "AutoFollowEndUpdate", 1 ) + --AJM:AutoFollowEndSend() +end + +function AJM:AutoFollowEndUpdate() + local alpha = AutoFollowStatus:GetAlpha() + --AJM:Print("updatetest", test) + if alpha < 1 then + --AJM:Print("canSend") + AJM:AutoFollowEndSend() + end +end + + +function AJM:AutoFollowEndSend() -- Argument 1 has the reason follow ended, this does not come back from the event parameters. -- arg1 is gone in 4.01 which makes this functionality kinda useless. Shame. - AJM.isFollowing = false -- If warn if auto follow breaks is on... local canWarn = false + local canWarnMsg = nil if AJM.db.warnWhenFollowBreaks == true then if AJM.jambaSetFollowTarget == false then canWarn = true end end - -- Do not warn if in combat? + -- Do not warn if not Taxi + if UnitOnTaxi(AJM.currentFollowTarget) == true or UnitOnTaxi("player") == true then + canWarn = false + end + --Do not warn if in combat? if AJM.db.doNotWarnFollowBreakInCombat == true and AJM.outOfCombat == false then canWarn = false end @@ -784,19 +804,22 @@ function AJM:AUTOFOLLOW_END( event, ... ) canWarn = false end end + -- Ebony says this system does not work right. so is not checking to see if blizzard code says follow is borken, (or kinda anyway) -- If the first do not warn flag is set, check the second do not warn flag. - if AJM.jambaExternalNoWarnNextBreak == false then - if AJM.jambaExternalNoWarnNextSecondBreak == true then - canWarn = false - AJM.jambaExternalNoWarnNextSecondBreak = false +--[[ if AJM.jambaExternalNoWarnNextBreak == false then + if AJM.jambaExternalNoWarnNextSecondBreak == true then + canWarn = false + AJM.jambaExternalNoWarnNextSecondBreak = false + end end - end + -- ebony says i DON'T even know what the hell this is doing??? so it can go -- Is another Jamba module supressing this warning? if AJM.jambaExternalNoWarnNextBreak == true then canWarn = false + canWarnMsg = "jambaExternalNoWarnNextBreak" AJM.jambaExternalNoWarnNextBreak = false - end - -- Check to see if range warning is in effect. + end ]] + -- Check to see if range warning is in effect. This olny works in a party it seems!! if AJM.db.onlyWarnIfOutOfFollowRange == true then if CheckInteractDistance( AJM.currentFollowTarget, 4 ) then canWarn = false diff --git a/Jamba-ItemUse/Jamba-ItemUse.toc b/Jamba-ItemUse/Jamba-ItemUse.toc index 8494f57..223895b 100644 --- a/Jamba-ItemUse/Jamba-ItemUse.toc +++ b/Jamba-ItemUse/Jamba-ItemUse.toc @@ -1,12 +1,13 @@ -## Interface: 60200 +## Interface: 70000 ## Title: JambaItemUse ## Notes: JambaItemUse ## Author: Ebony, Former Author: Jafula -## Version: 4.2.2 +## Version: 7.0.3-5.0 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba ## Dependencies: Jamba ## SavedVariables: JambaItemUseProfileDB ## LoadOnDemand: 1 - Locales\Locales.xml JambaItemUse.lua diff --git a/Jamba-ItemUse/JambaItemUse.lua b/Jamba-ItemUse/JambaItemUse.lua index fc9f4fc..7c09b62 100644 --- a/Jamba-ItemUse/JambaItemUse.lua +++ b/Jamba-ItemUse/JambaItemUse.lua @@ -70,8 +70,8 @@ AJM.settings = { numberOfRows = 2, messageArea = JambaApi.DefaultWarningArea(), itemsAdvanced = {}, - framePoint = "CENTER", - frameRelativePoint = "CENTER", + framePoint = "BOTTOMRIGHT", + frameRelativePoint = "BOTTOMRIGHT", frameXOffset = 0, frameYOffset = 0, frameAlpha = 1.0, @@ -383,50 +383,6 @@ function AJM:CreateJambaItemUseItemContainer( itemNumber, parentFrame ) itemContainer["container"] = containerButton end ---TODO CLEAN UP NOLONGER NEEDED ---[[ -function AJM:CheckForQuestItemAndAddToBar() - local isQuest - local questId - local isActive - local iterateQuests - local numEntries - local numQuests - local questItemLink - local questItemIcon - local questItemCharges - -- Iterate all bags looming for quest item. - for bag, slot, link in LibBagUtils:Iterate( "BAGS" ) do - -- Don't check slots that have no items and don't check anything in the keyring bag (-2) - if link ~= nil and bag ~= -2 then - -- Starts a quest items. - -- Battlepet links break tooltips! - if string.find(link, "battlepet") then - return - end - LibGratuity:SetHyperlink( link ) - if LibGratuity:Find( ITEM_STARTS_QUEST ) then - AJM:AddAnItemToTheBarIfNotExists( link, true ) - end - -- Useable quest items. - isQuest, questId, isActive = GetContainerItemQuestInfo(bag, slot) - if isQuest == true then - -- Quest item, but it is useable? Check. - numEntries, numQuests = GetNumQuestLogEntries() - for iterateQuests = 1, numEntries, 1 do - questItemLink, questItemIcon, questItemCharges = GetQuestLogSpecialItemInfo( iterateQuests ) - if questItemLink ~= nil then - if JambaUtilities:DoItemLinksContainTheSameItem( link, questItemLink ) == true then - AJM:AddAnItemToTheBarIfNotExists( link, false ) - end - end - end - end - end - end -end ---]] - --ebony test Using the wowapi and not the scanning of tooltips function AJM:CheckForQuestItemAndAddToBar() for bag = 0,4,1 do @@ -492,13 +448,7 @@ function AJM:AddAnItemToTheBarIfNotExists( itemLink, startsQuest ) if alreadyExists == false then for iterateItems = 1, AJM.db.numberOfItems, 1 do itemInfo = AJM:GetItemFromItemDatabase( iterateItems ) - --TODO LOOK in if we need this i don't think we do. - --AJM:Print( "ITEMiD", itemLink) - --ebonyfassttest - --AJM:Print( "checking item is in players bag.") --Checks the items we talking about is in the bags of the player. - --if AJM:IsInInventory( itemLink ) == true then - --AJM:Print( "is in bags") if itemInfo.kind == "empty" then AJM:AddItemToItemDatabase( iterateItems, "item", itemId ) AJM:JambaSendSettings() @@ -507,7 +457,6 @@ function AJM:AddAnItemToTheBarIfNotExists( itemLink, startsQuest ) AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["New item that starts a quest found!"], false ) end return - --end end end end diff --git a/Jamba-Macro/Jamba-Macro.toc b/Jamba-Macro/Jamba-Macro.toc index 3455a4c..3cdb663 100644 --- a/Jamba-Macro/Jamba-Macro.toc +++ b/Jamba-Macro/Jamba-Macro.toc @@ -1,8 +1,10 @@ -## Interface: 60200 +## Interface: 70000 ## Title: Jamba-Macro ## Notes: Jamba-Macro ## Author: Ebony, Former Author: Jafula -## Version: 4.2.2 +## Version: 7.0.3-5.0 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba ## Dependencies: Jamba ## SavedVariables: JambaMacroProfileDB ## LoadOnDemand: 1 diff --git a/Jamba-Macro/JambaMacro.lua b/Jamba-Macro/JambaMacro.lua index b08fc94..3707f92 100644 --- a/Jamba-Macro/JambaMacro.lua +++ b/Jamba-Macro/JambaMacro.lua @@ -885,7 +885,7 @@ function AJM:SettingsMacroControlScrollRefresh() AJM.settingsControl.macroControl.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) AJM.settingsControl.macroControl.rows[iterateDisplayRows].columns[4].textString:SetText( "" ) AJM.settingsControl.macroControl.rows[iterateDisplayRows].columns[4].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControl.macroControl.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + AJM.settingsControl.macroControl.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + AJM.settingsControl.macroControlOffset if dataRowNumber <= AJM:GetMacroSetsMaxPosition() then @@ -903,7 +903,7 @@ function AJM:SettingsMacroControlScrollRefresh() end -- Highlight the selected row. if dataRowNumber == AJM.settingsControl.macroControlHighlightRow then - AJM.settingsControl.macroControl.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + AJM.settingsControl.macroControl.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) end end end @@ -929,7 +929,7 @@ function AJM:SettingsVariableSetsScrollRefresh() -- Reset. AJM.settingsControlVariables.variableSets.rows[iterateDisplayRows].columns[1].textString:SetText( "" ) AJM.settingsControlVariables.variableSets.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControlVariables.variableSets.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + AJM.settingsControlVariables.variableSets.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + AJM.settingsControlVariables.variableSetsOffset if dataRowNumber <= AJM:GetVariableSetsMaxPosition() then @@ -938,7 +938,7 @@ function AJM:SettingsVariableSetsScrollRefresh() AJM.settingsControlVariables.variableSets.rows[iterateDisplayRows].columns[1].textString:SetText( variableSetsInformation.name ) -- Highlight the selected row. if dataRowNumber == AJM.settingsControlVariables.variableSetsHighlightRow then - AJM.settingsControlVariables.variableSets.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + AJM.settingsControlVariables.variableSets.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) end end end @@ -970,7 +970,7 @@ function AJM:SettingsVariablesScrollRefresh() AJM.settingsControlVariables.variables.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) AJM.settingsControlVariables.variables.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) AJM.settingsControlVariables.variables.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControlVariables.variables.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + AJM.settingsControlVariables.variables.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + AJM.settingsControlVariables.variablesOffset if dataRowNumber <= AJM:GetVariablesMaxPosition() then @@ -981,7 +981,7 @@ function AJM:SettingsVariablesScrollRefresh() AJM.settingsControlVariables.variables.rows[iterateDisplayRows].columns[3].textString:SetText( variablesInformation.value ) -- Highlight the selected row. if dataRowNumber == AJM.settingsControlVariables.variablesHighlightRow then - AJM.settingsControlVariables.variables.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + AJM.settingsControlVariables.variables.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) end end end @@ -1015,7 +1015,7 @@ function AJM:SettingsMacroSetsScrollRefresh() -- Reset. AJM.settingsControlMacros.macroSets.rows[iterateDisplayRows].columns[1].textString:SetText( "" ) AJM.settingsControlMacros.macroSets.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControlMacros.macroSets.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + AJM.settingsControlMacros.macroSets.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + AJM.settingsControlMacros.macroSetsOffset if dataRowNumber <= AJM:GetMacroSetsMaxPosition() then @@ -1024,7 +1024,7 @@ function AJM:SettingsMacroSetsScrollRefresh() AJM.settingsControlMacros.macroSets.rows[iterateDisplayRows].columns[1].textString:SetText( macroSetsInformation.name ) -- Highlight the selected row. if dataRowNumber == AJM.settingsControlMacros.macroSetsHighlightRow then - AJM.settingsControlMacros.macroSets.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + AJM.settingsControlMacros.macroSets.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) end end end @@ -1054,7 +1054,7 @@ function AJM:SettingsMacrosScrollRefresh() AJM.settingsControlMacros.macros.rows[iterateDisplayRows].columns[2].textString:SetText( "" ) AJM.settingsControlMacros.macros.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) AJM.settingsControlMacros.macros.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControlMacros.macros.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + AJM.settingsControlMacros.macros.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + AJM.settingsControlMacros.macrosOffset if dataRowNumber <= AJM:GetMacrosMaxPosition() then @@ -1064,7 +1064,7 @@ function AJM:SettingsMacrosScrollRefresh() AJM.settingsControlMacros.macros.rows[iterateDisplayRows].columns[2].textString:SetText( macrosInformation.key ) -- Highlight the selected row. if dataRowNumber == AJM.settingsControlMacros.macrosHighlightRow then - AJM.settingsControlMacros.macros.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + AJM.settingsControlMacros.macros.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) end end end diff --git a/Jamba-Proc/Jamba-Proc.toc b/Jamba-Proc/Jamba-Proc.toc deleted file mode 100644 index 286e5de..0000000 --- a/Jamba-Proc/Jamba-Proc.toc +++ /dev/null @@ -1,12 +0,0 @@ -## Interface: 60200 -## Title: JambaProc -## Notes: JambaProc -## Author: Ebony, Former Author: Jafula -## Version: 4.2.2 -## Dependencies: Jamba -## SavedVariables: JambaProcProfileDBv2 -## LoadOnDemand: 1 -Locales\Locales.xml -JambaProc.lua - - diff --git a/Jamba-Proc/JambaProc.lua b/Jamba-Proc/JambaProc.lua deleted file mode 100644 index 863420d..0000000 --- a/Jamba-Proc/JambaProc.lua +++ /dev/null @@ -1,1149 +0,0 @@ ---[[ -Jamba - Jafula's Awesome Multi-Boxer Assistant -Copyright 2008 - 2016 Michael "Jafula" Miller -License: The MIT License -]]-- - --- Some code borrowed from DruidTimerBars by Gilbert - Tichondrius US (license is Public Domain) - --- Create the addon using AceAddon-3.0 and embed some libraries. -local AJM = LibStub( "AceAddon-3.0" ):NewAddon( - "JambaProc", - "JambaModule-1.0", - "AceConsole-3.0", - "AceEvent-3.0", - "AceTimer-3.0" -) - --- Load libraries. -local JambaUtilities = LibStub:GetLibrary( "JambaUtilities-1.0" ) -local JambaHelperSettings = LibStub:GetLibrary( "JambaHelperSettings-1.0" ) -AJM.SharedMedia = LibStub( "LibSharedMedia-3.0" ) - --- Constants and Locale for this module. -AJM.moduleName = "Jamba-Proc" -AJM.settingsDatabaseName = "JambaProcProfileDBv2" -AJM.chatCommand = "jamba-proc" -local L = LibStub( "AceLocale-3.0" ):GetLocale( AJM.moduleName ) -AJM.parentDisplayName = L["Combat"] -AJM.moduleDisplayName = L["Proc"] - --- Settings - the values to store and their defaults for the settings database. -AJM.settings = { - profile = { - procEnabled = false, - procEnabledOnMasterOnly = true, - procTimerBarHeight = 22, - procTimerBarWidth = 350, - procTimerBarSpacing = 3, - procTimerBarDurationWidth = 55, - framePoint = "CENTER", - frameRelativePoint = "CENTER", - frameXOffset = 0, - frameYOffset = 0, - barTexture = L["Blizzard"], - barFont = L["Friz Quadrata TT"], - barFontSize = 10, - showConfigBars = false, - procs = {}, - initialLoad1 = false, - initialLoad2 = false, - }, -} - --- Configuration. -function AJM:GetConfiguration() - local configuration = { - name = AJM.moduleDisplayName, - handler = AJM, - type = 'group', - childGroups = "tab", - get = "JambaConfigurationGetSetting", - set = "JambaConfigurationSetSetting", - args = { - push = { - type = "input", - name = L["Push Settings"], - desc = L["Push the proc settings to all characters in the team."], - usage = "/jamba-proc push", - get = false, - set = "JambaSendSettings", - }, - }, - } - return configuration -end - -------------------------------------------------------------------------------------------------------------- --- Command this module sends. -------------------------------------------------------------------------------------------------------------- - -------------------------------------------------------------------------------------------------------------- --- Messages module sends. -------------------------------------------------------------------------------------------------------------- - -------------------------------------------------------------------------------------------------------------- --- Proc Management. -------------------------------------------------------------------------------------------------------------- - -function AJM:BeforeJambaProfileChanged() -end - -function AJM:OnJambaProfileChanged() - AJM:SettingsRefresh() -end - -function AJM:SettingsRefresh() - -- Update the settings area list. - AJM.settingsControl.procCheckBoxEnable:SetValue( AJM.db.procEnabled ) - AJM:SettingsProcListScrollRefresh() - AJM.settingsControl.appearanceProcBarMediaStatus:SetValue( AJM.db.barTexture ) - AJM.settingsControl.appearanceProcBarMediaFont:SetValue( AJM.db.barFont ) - AJM.settingsControl.appearanceProcBarMediaFontSizeSlider:SetValue( AJM.db.barFontSize ) - AJM.settingsControl.appearanceProcBarWidthSlider:SetValue( AJM.db.procTimerBarWidth ) - AJM.settingsControl.appearanceProcBarHeightSlider:SetValue( AJM.db.procTimerBarHeight ) - AJM.settingsControl.appearanceProcBarSpacingSlider:SetValue( AJM.db.procTimerBarSpacing ) - AJM.settingsControl.procCheckBoxShowConfigBars:SetValue( AJM.db.showConfigBars ) - AJM.settingsControl.procCheckBoxShowOnlyOnMaster:SetValue( AJM.db.procEnabledOnMasterOnly ) - AJM:SettingsUpdateStatusBarMediaAppearance() - AJM:SettingsUpdateStatusBarLayout() - -- State - AJM.settingsControl.appearanceProcBarMediaStatus:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.appearanceProcBarMediaFont:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.appearanceProcBarMediaFontSizeSlider:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.appearanceProcBarWidthSlider:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.appearanceProcBarHeightSlider:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.appearanceProcBarSpacingSlider:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.procCheckBoxShowConfigBars:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.procCheckBoxShowOnlyOnMaster:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.procListButtonAdd:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.procListButtonRemove:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.procEditBoxSpellName:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.procEditBoxCooldown:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.procEditBoxDisplayText:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.procEditBoxTag:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.procColourPicker:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.procSound:SetDisabled( not AJM.db.procEnabled ) - AJM.settingsControl.procListButtonUpdate:SetDisabled( not AJM.db.procEnabled ) - if AJM.procFrame ~= nil then - AJM.procFrame:ClearAllPoints() - AJM.procFrame:SetPoint( AJM.db.framePoint, UIParent, AJM.db.frameRelativePoint, AJM.db.frameXOffset, AJM.db.frameYOffset ) - end -end - -function AJM:SettingsUpdateStatusBarMediaAppearance() - if AJM.procTimerBars == nil then - return - end - local statusBarTexture = AJM.SharedMedia:Fetch( "statusbar", AJM.db.barTexture ) - local statusBarFont = AJM.db.barFont - local reDraw = false - if AJM.currentBarTexture ~= statusBarTexture then - AJM.currentBarTexture = statusBarTexture - reDraw = true - end - if AJM.currentBarFont ~= statusBarFont then - AJM.currentBarFont = statusBarFont - reDraw = true - end - if AJM.currentBarFontSize ~= AJM.db.barFontSize then - AJM.currentBarFontSize = AJM.db.barFontSize - reDraw = true - end - if reDraw == false then - return - end - for index, procBar in pairs( AJM.procTimerBars ) do - if procBar.bar ~= nil then - procBar.bar:SetStatusBarTexture( statusBarTexture ) - procBar.bar:GetStatusBarTexture():SetHorizTile( false ) - procBar.bar:GetStatusBarTexture():SetVertTile( false ) - procBar.bar.dshadow:SetFont( AJM.SharedMedia:Fetch( "font", statusBarFont ), AJM.db.barFontSize ) - procBar.bar.duration:SetFont( AJM.SharedMedia:Fetch( "font", statusBarFont ), AJM.db.barFontSize ) - procBar.bar.shadow:SetFont( AJM.SharedMedia:Fetch( "font", statusBarFont ), AJM.db.barFontSize ) - procBar.bar.label:SetFont( AJM.SharedMedia:Fetch( "font", statusBarFont ), AJM.db.barFontSize ) - end - end -end - -function AJM:SettingsUpdateStatusBarLayout() - if AJM.procTimerBars == nil then - return - end - for index, procBar in pairs( AJM.procTimerBars ) do - if procBar.bar ~= nil then - procBar.bar:SetHeight( AJM.db.procTimerBarHeight ) - procBar.bar:SetWidth( AJM.db.procTimerBarWidth ) - procBar.bar.icon:SetWidth( AJM.db.procTimerBarHeight ) - procBar.bar.icon:SetHeight( AJM.db.procTimerBarHeight ) - procBar.bar.label:SetWidth( AJM.db.procTimerBarWidth - AJM.db.procTimerBarDurationWidth ) - procBar.bar.label:SetHeight( AJM.db.procTimerBarHeight ) - procBar.bar.shadow:SetWidth( AJM.db.procTimerBarWidth - AJM.db.procTimerBarDurationWidth ) - procBar.bar.shadow:SetHeight( AJM.db.procTimerBarHeight ) - end - end - AJM.procFrame:SetWidth( (AJM.db.procTimerBarWidth + AJM.db.procTimerBarHeight) ) - AJM:UpdateProcBarTimerPositions( true ) -end - --- Settings received. -function AJM:JambaOnSettingsReceived( characterName, settings ) - if characterName ~= AJM.characterName then - -- Update the settings. - AJM.db.procEnabled = settings.procEnabled - AJM.db.procEnabledOnMasterOnly = settings.procEnabledOnMasterOnly - AJM.db.procs = JambaUtilities:CopyTable( settings.procs ) - AJM.db.barTexture = settings.barTexture - AJM.db.barFont = settings.barFont - AJM.db.barFontSize = settings.barFontSize - AJM.db.procTimerBarHeight = settings.procTimerBarHeight - AJM.db.procTimerBarWidth = settings.procTimerBarWidth - AJM.db.procTimerBarSpacing = settings.procTimerBarSpacing - AJM.db.procTimerBarDurationWidth = settings.procTimerBarDurationWidth - AJM.db.showConfigBars = settings.showConfigBars - AJM.db.framePoint = settings.framePoint - AJM.db.frameRelativePoint = settings.frameRelativePoint - AJM.db.frameXOffset = settings.frameXOffset - AJM.db.frameYOffset = settings.frameYOffset - -- Refresh the settings. - AJM:SettingsRefresh() - AJM:UpdateProcEnabled() - AJM:UpdateShowConfigBars() - -- Tell the player. - AJM:Print( L["Settings received from A."]( characterName ) ) - -- Tell the team? - --AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["Settings received from A."]( characterName ), false ) - end -end - -local function GetProcListMaxPosition() - return #AJM.db.procs -end - -local function GetProcAtPosition( position ) - return AJM.db.procs[position] -end - -local function SetProcAtPosition( position, procInformation ) - AJM.db.procs[position] = procInformation -end - -local function AddProc( spellID ) - local newProc = {} - newProc.spellID = spellID - local spellName, spellRank, spellIcon, spellPowerCost, spellIsFunnel, spellPowerType, spellCastingTime, spellMinRange, spellMaxRange = GetSpellInfo( spellID ) - newProc.displayText = spellName - newProc.tag = JambaApi.AllTag() - newProc.type = "SPELL_AURA" - newProc.coolDown = AJM.currentProcCooldown - newProc.colourRed = AJM.currentProcColourR - newProc.colourGreen = AJM.currentProcColourG - newProc.colourBlue = AJM.currentProcColourB - newProc.colourAlpha = 1.0 - newProc.sound = AJM.currentSound - table.insert( AJM.db.procs, newProc ) - AJM:SettingsRefresh() - -- Click the proc list first row, column to set the child controls. - AJM:SettingsProcListRowClick( 1, 1 ) -end - -local function AddProcWithDetails( spellID, displayText, type, coolDown, colourRed, colourGreen, colourBlue, colourAlpha, tag, sound ) - local newProc = {} - newProc.spellID = spellID - newProc.displayText = displayText - newProc.tag = tag - newProc.type = type - newProc.coolDown = coolDown - newProc.colourRed = colourRed - newProc.colourGreen = colourGreen - newProc.colourBlue = colourBlue - newProc.colourAlpha = colourAlpha - newProc.sound = sound - table.insert( AJM.db.procs, newProc ) -end - -local function RemoveProc( spellID, displayText, tag ) - local procIndex = 0 - for index, proc in ipairs( AJM.db.procs ) do - if (proc.spellID == spellID) and (proc.displayText == displayText) and (proc.tag == tag) then - procIndex = index - break - end - end - if procIndex ~= 0 then - table.remove( AJM.db.procs, procIndex ) - end - -- Click the proc list first row, column to set the child controls. - AJM:SettingsProcListRowClick( 1, 1 ) -end - -function AJM:AddProcGUI( name ) - AddProc( name ) - AJM:SettingsProcListScrollRefresh() -end - -function AJM:RemoveProcGUI() - local proc = GetProcAtPosition( AJM.settingsControl.procListHighlightRow ) - RemoveProc( proc.spellID, proc.displayText, proc.tag ) - AJM.settingsControl.procListHighlightRow = 1 - AJM:SettingsProcListScrollRefresh() -end - -function AJM:LoadDefaultProcs() - AddProcWithDetails( 59578, L["The Art of War"], "SPELL_AURA", 15, 0.0, 1.0, 1.0, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 48108, L["Hot Streak"],"SPELL_AURA", 10,1.0,0.0,0.0,1.0,JambaApi.AllTag(),L["None"] ) - AddProcWithDetails( 44401, L["Missile Barrage"], "SPELL_AURA", 15, 0.45, 0.24, 0.65, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 57761, L["Fireball!"], "SPELL_AURA", 15, 0.15, 0.94, 0.35, 1, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 16246, L["Clearcasting (Shaman)"], "SPELL_AURA", 15, 0.49, 0.12, 0.12, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 16870, L["Clearcasting (Druid)"], "SPELL_AURA", 15, 0.99, 0.59, 0.78, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 53817, L["Maelstrom Weapon"], "SPELL_AURA", 30, 0.59, 0.39, 0.62, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 64823, L["Elune's Wrath"], "SPELL_AURA", 10, 0.89, 0.12, 0.12, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 17941, L["Shadow Trance"], "SPELL_AURA", 10, 0.23, 0.23, 0.66, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 59052, L["Freezing Fog"], "SPELL_AURA", 15, 0.83, 0.19, 0.73, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 54149, L["Infusion of Light"], "SPELL_AURA", 15, 0.05, 0.65, 0.49, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 12536, L["Clearcasting (Mage)"], "SPELL_AURA", 15, 0.89, 0.82, 0.72, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 56453, L["Lock and Load"], "SPELL_AURA", 12, 0.77, 0.23, 0.77, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 48518, L["Eclipse (Lunar)"], "SPELL_AURA", 15, 0.2, 0.4, 0.2, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 48517, L["Eclipse (Solar)"], "SPELL_AURA", 15, 0.2, 0.7, 0.7, 1.0, JambaApi.AllTag(), L["None"] ) - AJM:SettingsRefresh() - -- Click the proc list first row, column to set the child controls. - AJM:SettingsProcListRowClick( 1, 1 ) -end - - -function AJM:LoadDefaultProcs2() - AddProcWithDetails( 51124, L["Killing Machine"], "SPELL_AURA", 10, 0.34, 0.76, 0.99, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 95774, L["Fulmination!"], "SPELL_AURA", 10, 0.44, 0.26, 0.66, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 50227, L["Sword and Board"], "SPELL_AURA", 5, 0.14, 0.96, 0.16, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 60503, L["Taste for Blood"], "SPELL_AURA", 9, 0.94, 0.96, 0.86, 1.0, JambaApi.AllTag(), L["None"] ) - AddProcWithDetails( 74241, L["Power Torrent"], "SPELL_AURA", 12, 0.14, 0.36, 0.56, 1.0, JambaApi.AllTag(), L["None"] ) - AJM:SettingsRefresh() - -- Click the proc list first row, column to set the child controls. - AJM:SettingsProcListRowClick( 1, 1 ) -end - - -------------------------------------------------------------------------------------------------------------- --- Settings Dialogs. -------------------------------------------------------------------------------------------------------------- - -local function SettingsCreateProcList() - -- Position and size constants. - local checkBoxHeight = JambaHelperSettings:GetCheckBoxHeight() - local procListButtonControlWidth = 105 - local buttonHeight = JambaHelperSettings:GetButtonHeight() - local top = JambaHelperSettings:TopOfSettings() - local left = JambaHelperSettings:LeftOfSettings() - local headingHeight = JambaHelperSettings:HeadingHeight() - local headingWidth = JambaHelperSettings:HeadingWidth( true ) - local horizontalSpacing = JambaHelperSettings:GetHorizontalSpacing() - local verticalSpacing = JambaHelperSettings:GetVerticalSpacing() - local procListWidth = headingWidth - -- Team list internal variables (do not change). - AJM.settingsControl.procListHighlightRow = 1 - AJM.settingsControl.procListOffset = 1 - AJM.settingsControl.procCheckBoxEnable = JambaHelperSettings:CreateCheckBox( - AJM.settingsControl, - headingWidth, - left, - top, - L["Enable Jamba Proc"], - AJM.SettingsToggleProcEnable - ) - -- Create a heading. - JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Proc List"], top - checkBoxHeight - verticalSpacing, true ) - -- Create an area list frame. - local list = {} - list.listFrameName = "JambaProcSettingsProcListFrame" - list.parentFrame = AJM.settingsControl.widgetSettings.content - list.listTop = top - headingHeight - checkBoxHeight - verticalSpacing - list.listLeft = left - list.listWidth = procListWidth - list.rowHeight = 20 - list.rowsToDisplay = 5 - list.columnsToDisplay = 2 - list.columnInformation = {} - list.columnInformation[1] = {} - list.columnInformation[1].width = 15 - list.columnInformation[1].alignment = "LEFT" - list.columnInformation[2] = {} - list.columnInformation[2].width = 85 - list.columnInformation[2].alignment = "LEFT" - list.scrollRefreshCallback = AJM.SettingsProcListScrollRefresh - list.rowClickCallback = AJM.SettingsProcListRowClick - AJM.settingsControl.procList = list - JambaHelperSettings:CreateScrollList( AJM.settingsControl.procList ) - -- Position and size constants (once list height is known). - local bottomOfList = top - headingHeight - list.listHeight - verticalSpacing - checkBoxHeight - verticalSpacing - local bottomOfSection = bottomOfList - verticalSpacing - buttonHeight - verticalSpacing - -- Create buttons. - AJM.settingsControl.procListButtonAdd = JambaHelperSettings:CreateButton( - AJM.settingsControl, - procListButtonControlWidth, - left, - bottomOfList, - L["Add"], - AJM.SettingsAddClick - ) - AJM.settingsControl.procListButtonRemove = JambaHelperSettings:CreateButton( - AJM.settingsControl, - procListButtonControlWidth, - left + horizontalSpacing + procListButtonControlWidth, - bottomOfList, - L["Remove"], - AJM.SettingsRemoveClick - ) - return bottomOfSection -end - -local function SettingsCreateProcConfiguration( top ) - local procListButtonControlWidth = 105 - local buttonHeight = JambaHelperSettings:GetButtonHeight() - local dropdownHeight = JambaHelperSettings:GetDropdownHeight() - local mediaHeight = JambaHelperSettings:GetMediaHeight() - local colourPickerHeight = JambaHelperSettings:GetColourPickerHeight() - local left = JambaHelperSettings:LeftOfSettings() - local headingHeight = JambaHelperSettings:HeadingHeight() - local headingWidth = JambaHelperSettings:HeadingWidth( true ) - local horizontalSpacing = JambaHelperSettings:GetHorizontalSpacing() - local verticalSpacing = JambaHelperSettings:GetVerticalSpacing() - local halfWidth = (headingWidth - (horizontalSpacing * 3)) / 2 - local column1Left = left - local column2Left = left + halfWidth + (horizontalSpacing * 3) - local procConfigurationTop = top - headingHeight - JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Proc Configuration"], top, true ) - AJM.settingsControl.procEditBoxSpellName = JambaHelperSettings:CreateEditBox( AJM.settingsControl, - halfWidth, - column1Left, - procConfigurationTop, - L["Spell ID"] - ) - AJM.settingsControl.procEditBoxSpellName:SetCallback( "OnEnterPressed", AJM.EditBoxSpellNameChanged ) - AJM.settingsControl.procEditBoxCooldown = JambaHelperSettings:CreateEditBox( - AJM.settingsControl, - halfWidth, - column2Left, - procConfigurationTop, - L["Proc Duration (seconds)"] - ) - AJM.settingsControl.procEditBoxCooldown:SetCallback( "OnEnterPressed", AJM.EditBoxProcCooldownChanged ) - procConfigurationTop = procConfigurationTop - dropdownHeight - AJM.settingsControl.procEditBoxDisplayText = JambaHelperSettings:CreateEditBox( - AJM.settingsControl, - headingWidth, - column1Left, - procConfigurationTop, - L["Display Text"] - ) - AJM.settingsControl.procEditBoxDisplayText:SetCallback( "OnEnterPressed", AJM.EditBoxDisplayTextChanged ) - procConfigurationTop = procConfigurationTop - dropdownHeight - AJM.settingsControl.procEditBoxTag = JambaHelperSettings:CreateEditBox( - AJM.settingsControl, - headingWidth, - column1Left, - procConfigurationTop, - L["Tag"] - ) - AJM.settingsControl.procEditBoxTag:SetCallback( "OnEnterPressed", AJM.EditBoxTagChanged ) - procConfigurationTop = procConfigurationTop - dropdownHeight - AJM.settingsControl.procColourPicker = JambaHelperSettings:CreateColourPicker( - AJM.settingsControl, - halfWidth, - column1Left, - procConfigurationTop - 13, - L["Proc Colour"] - ) - AJM.settingsControl.procColourPicker:SetHasAlpha( false ) - AJM.settingsControl.procColourPicker:SetCallback( "OnValueConfirmed", AJM.ProcColourPickerChanged ) - AJM.settingsControl.procSound = JambaHelperSettings:CreateMediaSound( - AJM.settingsControl, - halfWidth, - column2Left, - procConfigurationTop, - L["Proc Sound"] - ) - AJM.settingsControl.procSound:SetCallback( "OnValueChanged", AJM.ProcSoundChanged ) - procConfigurationTop = procConfigurationTop - mediaHeight - verticalSpacing - AJM.settingsControl.procListButtonUpdate = JambaHelperSettings:CreateButton( - AJM.settingsControl, - procListButtonControlWidth, - column1Left, - procConfigurationTop, - L["Save"], - AJM.SettingsUpdateClick - ) - procConfigurationTop = procConfigurationTop - buttonHeight - AJM.settingsControl.procEditBoxTag:SetText( "" ) - AJM.settingsControl.procEditBoxDisplayText:SetText( "" ) - AJM.settingsControl.procEditBoxSpellName:SetText( "" ) - AJM.settingsControl.procEditBoxCooldown:SetText( "" ) - local bottomOfSection = procConfigurationTop - return bottomOfSection -end - -local function SettingsCreateProcAppearanceAndLayout( top ) - local left = JambaHelperSettings:LeftOfSettings() - local headingHeight = JambaHelperSettings:HeadingHeight() - local headingWidth = JambaHelperSettings:HeadingWidth( true ) - local checkBoxHeight = JambaHelperSettings:GetCheckBoxHeight() - local horizontalSpacing = JambaHelperSettings:GetHorizontalSpacing() - local verticalSpacing = JambaHelperSettings:GetVerticalSpacing() - local mediaHeight = JambaHelperSettings:GetMediaHeight() - local sliderHeight = JambaHelperSettings:GetSliderHeight() - local halfWidth = (headingWidth - horizontalSpacing) / 2 - local column2left = left + halfWidth - local movingTop = top - JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Appearance & Layout"], movingTop, true ) - movingTop = movingTop - headingHeight - AJM.settingsControl.procCheckBoxShowConfigBars = JambaHelperSettings:CreateCheckBox( - AJM.settingsControl, - headingWidth, - left, - movingTop, - L["Show Test Bars"], - AJM.SettingsToggleShowConfigBars - ) - movingTop = movingTop - checkBoxHeight - verticalSpacing - AJM.settingsControl.procCheckBoxShowOnlyOnMaster = JambaHelperSettings:CreateCheckBox( - AJM.settingsControl, - headingWidth, - left, - movingTop, - L["Show Proc Bars Only On Master"], - AJM.SettingsToggleShowOnMasterOnly - ) - movingTop = movingTop - checkBoxHeight - verticalSpacing - AJM.settingsControl.appearanceProcBarMediaStatus = JambaHelperSettings:CreateMediaStatus( - AJM.settingsControl, - halfWidth, - left, - movingTop, - L["Proc Bar Texture"] - ) - AJM.settingsControl.appearanceProcBarMediaStatus:SetCallback( "OnValueChanged", AJM.SettingsChangeStatusBarTexture ) - AJM.settingsControl.appearanceProcBarMediaFont = JambaHelperSettings:CreateMediaFont( - AJM.settingsControl, - halfWidth, - column2left, - movingTop, - L["Proc Bar Font"] - ) - AJM.settingsControl.appearanceProcBarMediaFont:SetCallback( "OnValueChanged", AJM.SettingsChangeStatusBarFont ) - movingTop = movingTop - mediaHeight - verticalSpacing - AJM.settingsControl.appearanceProcBarMediaFontSizeSlider = JambaHelperSettings:CreateSlider( - AJM.settingsControl, - headingWidth, - left, - movingTop, - L["Proc Bar Font Size"] - ) - AJM.settingsControl.appearanceProcBarMediaFontSizeSlider:SetSliderValues( 5, 25, 0.25 ) - AJM.settingsControl.appearanceProcBarMediaFontSizeSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeStatusBarFontSize ) - movingTop = movingTop - sliderHeight - verticalSpacing - AJM.settingsControl.appearanceProcBarWidthSlider = JambaHelperSettings:CreateSlider( - AJM.settingsControl, - headingWidth, - left, - movingTop, - L["Proc Bar Width"] - ) - AJM.settingsControl.appearanceProcBarWidthSlider:SetSliderValues( 50, 500, 5 ) - AJM.settingsControl.appearanceProcBarWidthSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeStatusBarWidth ) - movingTop = movingTop - sliderHeight - verticalSpacing - AJM.settingsControl.appearanceProcBarHeightSlider = JambaHelperSettings:CreateSlider( - AJM.settingsControl, - headingWidth, - left, - movingTop, - L["Proc Bar Height"] - ) - AJM.settingsControl.appearanceProcBarHeightSlider:SetSliderValues( 5, 100, 1 ) - AJM.settingsControl.appearanceProcBarHeightSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeStatusBarHeight ) - movingTop = movingTop - sliderHeight - verticalSpacing - AJM.settingsControl.appearanceProcBarSpacingSlider = JambaHelperSettings:CreateSlider( - AJM.settingsControl, - headingWidth, - left, - movingTop, - L["Proc Bar Spacing"] - ) - AJM.settingsControl.appearanceProcBarSpacingSlider:SetSliderValues( 0, 20, 0.25 ) - AJM.settingsControl.appearanceProcBarSpacingSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeStatusBarSpacing ) - movingTop = movingTop - sliderHeight - verticalSpacing - local bottomOfSection = movingTop - return bottomOfSection -end - -local function SettingsCreate() - AJM.settingsControl = {} - -- Create the settings panel. - JambaHelperSettings:CreateSettings( - AJM.settingsControl, - AJM.moduleDisplayName, - AJM.parentDisplayName, - AJM.SettingsPushSettingsClick - ) - -- Create the proc list controls. - local bottomOfProcList = SettingsCreateProcList() - -- Create the proc configuration controls. - local bottomOfProcConfiguration = SettingsCreateProcConfiguration( bottomOfProcList ) - local bottomOfAppearanceAndLayout = SettingsCreateProcAppearanceAndLayout( bottomOfProcConfiguration ) - AJM.settingsControl.widgetSettings.content:SetHeight( -bottomOfAppearanceAndLayout ) - -- Help - local helpTable = {} - JambaHelperSettings:CreateHelp( AJM.settingsControl, helpTable, AJM:GetConfiguration() ) -end - -------------------------------------------------------------------------------------------------------------- --- Settings Callbacks. -------------------------------------------------------------------------------------------------------------- - -function AJM:SettingsChangeStatusBarTexture( event, value ) - AJM.db.barTexture = value - AJM:SettingsRefresh() -end - -function AJM:SettingsChangeStatusBarFont( event, value ) - AJM.db.barFont = value - AJM:SettingsRefresh() -end - -function AJM:SettingsChangeStatusBarFontSize( event, value ) - AJM.db.barFontSize = tonumber( value ) - AJM:SettingsRefresh() -end - -function AJM:SettingsChangeStatusBarWidth( event, value ) - AJM.db.procTimerBarWidth = tonumber( value ) - AJM.db.procTimerBarDurationWidth = AJM.db.procTimerBarWidth * 0.1636363636 - if AJM.db.procTimerBarDurationWidth < 30 then - AJM.db.procTimerBarDurationWidth = 30 - end - AJM:SettingsRefresh() -end - -function AJM:SettingsChangeStatusBarHeight( event, value ) - AJM.db.procTimerBarHeight = tonumber( value ) - AJM:SettingsRefresh() -end - -function AJM:SettingsChangeStatusBarSpacing( event, value ) - AJM.db.procTimerBarSpacing = tonumber( value ) - AJM:SettingsRefresh() -end - -function AJM:SettingsProcListScrollRefresh() - FauxScrollFrame_Update( - AJM.settingsControl.procList.listScrollFrame, - GetProcListMaxPosition(), - AJM.settingsControl.procList.rowsToDisplay, - AJM.settingsControl.procList.rowHeight - ) - AJM.settingsControl.procListOffset = FauxScrollFrame_GetOffset( AJM.settingsControl.procList.listScrollFrame ) - for iterateDisplayRows = 1, AJM.settingsControl.procList.rowsToDisplay do - -- Reset. - AJM.settingsControl.procList.rows[iterateDisplayRows].columns[1].textString:SetText( "" ) - AJM.settingsControl.procList.rows[iterateDisplayRows].columns[2].textString:SetText( "" ) - AJM.settingsControl.procList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControl.procList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControl.procList.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) - -- Get data. - local dataRowNumber = iterateDisplayRows + AJM.settingsControl.procListOffset - if dataRowNumber <= GetProcListMaxPosition() then - -- Put proc information into columns. - local procInformation = GetProcAtPosition( dataRowNumber ) - AJM.settingsControl.procList.rows[iterateDisplayRows].columns[1].textString:SetText( procInformation.spellID ) - AJM.settingsControl.procList.rows[iterateDisplayRows].columns[2].textString:SetText( procInformation.displayText ) - -- Highlight the selected row. - if dataRowNumber == AJM.settingsControl.procListHighlightRow then - AJM.settingsControl.procList.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) - end - end - end -end - -function AJM:EditBoxProcCooldownChanged( event, value ) - AJM.currentProcCooldown = tonumber( value ) -end - -local function UpdateProcInformation() - -- Update the area type controls to reflect the information for this selection. - local procInformation = GetProcAtPosition( AJM.settingsControl.procListHighlightRow ) - -- Update controls. - AJM.settingsControl.procEditBoxTag:SetText( procInformation.tag ) - AJM.currentEditBoxTagText = procInformation.tag - AJM.settingsControl.procEditBoxDisplayText:SetText( procInformation.displayText ) - AJM.currentEditBoxDisplayTextText = procInformation.displayText - AJM.settingsControl.procEditBoxSpellName:SetText( procInformation.spellID ) - AJM.currentEditBoxSpellNameText = procInformation.spellID - AJM.settingsControl.procEditBoxCooldown:SetText( procInformation.coolDown ) - AJM.currentProcCooldown = tonumber( procInformation.coolDown ) - AJM.settingsControl.procColourPicker:SetColor( procInformation.colourRed, procInformation.colourGreen, procInformation.colourBlue, 1.0 ) - AJM.currentProcColourR = tonumber( procInformation.colourRed ) - AJM.currentProcColourG = tonumber( procInformation.colourGreen ) - AJM.currentProcColourB = tonumber( procInformation.colourBlue ) - AJM.settingsControl.procSound:SetValue( procInformation.sound ) - AJM.currentSound = procInformation.sound -end - -function AJM:SettingsProcListRowClick( rowNumber, columnNumber ) - if AJM.settingsControl.procListOffset + rowNumber <= GetProcListMaxPosition() then - AJM.settingsControl.procListHighlightRow = AJM.settingsControl.procListOffset + rowNumber - UpdateProcInformation() - AJM:SettingsProcListScrollRefresh() - end -end - -function AJM:ProcColourPickerChanged( event, r, g, b, a ) - AJM.currentProcColourR = r - AJM.currentProcColourG = g - AJM.currentProcColourB = b -end - -function AJM:EditBoxTagChanged( event, text ) - AJM.currentEditBoxTagText = text -end - -function AJM:ProcSoundChanged( event, value ) - AJM.settingsControl.procSound:SetValue( value ) - AJM.currentSound = value -end - -function AJM:EditBoxDisplayTextChanged( event, text ) - AJM.currentEditBoxDisplayTextText = text -end - -function AJM:EditBoxSpellNameChanged( event, text ) - AJM.currentEditBoxSpellNameText = text -end - -local function SetProcConfigurationIntoCurrentProc() - -- Get information from table at position. - local procInformation = GetProcAtPosition( AJM.settingsControl.procListHighlightRow ) - procInformation.coolDown = tonumber( AJM.currentProcCooldown ) - procInformation.tag = AJM.currentEditBoxTagText - procInformation.displayText = AJM.currentEditBoxDisplayTextText - procInformation.spellID = AJM.currentEditBoxSpellNameText - procInformation.colourRed = AJM.currentProcColourR - procInformation.colourGreen = AJM.currentProcColourG - procInformation.colourBlue = AJM.currentProcColourB - procInformation.sound = AJM.currentSound - -- Put information back into table at position. - SetProcAtPosition( AJM.settingsControl.procListHighlightRow, procInformation ) - -- Refresh the settings. - AJM:SettingsRefresh() -end - -function AJM:SettingsPushSettingsClick( event ) - AJM:JambaSendSettings() -end - -function AJM:SettingsUpdateClick( event ) - SetProcConfigurationIntoCurrentProc() -end - -function AJM:SettingsAddClick( event ) - StaticPopup_Show( "JAMBAMPROC_ASK_PROC_SPELL_NAME" ) -end - -function AJM:SettingsToggleProcEnable( event, checked ) - AJM.db.procEnabled = checked - AJM:UpdateProcEnabled() - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleShowConfigBars( event, checked ) - AJM.db.showConfigBars = checked - AJM:UpdateShowConfigBars() - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleShowOnMasterOnly( event, checked ) - AJM.db.procEnabledOnMasterOnly = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsRemoveClick( event ) - local procInformation = GetProcAtPosition( AJM.settingsControl.procListHighlightRow ) - StaticPopup_Show( "JAMBAPROC_CONFIRM_REMOVE_PROC", procInformation.spellID ) -end - -function AJM:UpdateShowConfigBars() - if AJM.db.showConfigBars == true then - AJM.showConfigurationBarsTimer = AJM:ScheduleRepeatingTimer( "ShowConfigurationBars", 21 ) - AJM:ShowConfigurationBars() - else - if AJM.showConfigurationBarsTimer ~= nil then - AJM:CancelTimer( AJM.showConfigurationBarsTimer ) - end - AJM:RemoveConfigurationBars() - end -end - -function AJM:UpdateProcEnabled() - if AJM.procFrame ~= nil then - if AJM.db.procEnabled == true then - AJM.procFrame:Show() - else - AJM.procFrame:Hide() - end - end -end - -------------------------------------------------------------------------------------------------------------- --- Popup Dialogs. -------------------------------------------------------------------------------------------------------------- - --- Initialize Popup Dialogs. -local function InitializePopupDialogs() - StaticPopupDialogs["JAMBAMPROC_ASK_PROC_SPELL_NAME"] = { - text = L["Enter the ID of the spell to add:"], - button1 = ACCEPT, - button2 = CANCEL, - hasEditBox = 1, - timeout = 0, - whileDead = 1, - hideOnEscape = 1, - OnShow = function( self ) - self.editBox:SetText("") - self.button1:Disable() - self.editBox:SetFocus() - end, - OnAccept = function( self ) - AJM:AddProcGUI( self.editBox:GetText() ) - end, - EditBoxOnTextChanged = function( self ) - if not self:GetText() or self:GetText():trim() == "" then - self:GetParent().button1:Disable() - else - self:GetParent().button1:Enable() - end - end, - EditBoxOnEnterPressed = function( self ) - if self:GetParent().button1:IsEnabled() then - AJM:AddProcGUI( self:GetText() ) - end - self:GetParent():Hide() - end, - } - -- Confirm removing characters from member list. - StaticPopupDialogs["JAMBAPROC_CONFIRM_REMOVE_PROC"] = { - text = L['Are you sure you wish to remove "%s" from the proc list?'], - button1 = YES, - button2 = NO, - timeout = 0, - whileDead = 1, - hideOnEscape = 1, - OnAccept = function( self ) - AJM:RemoveProcGUI() - end, - } -end - -------------------------------------------------------------------------------------------------------------- --- Addon initialization, enabling and disabling. -------------------------------------------------------------------------------------------------------------- - --- Initialise the module. -function AJM:OnInitialize() - AJM.currentProcColourR = 0.5 - AJM.currentProcColourG = 0.5 - AJM.currentProcColourB = 0.5 - AJM.currentBarTexture = "" - AJM.currentBarFont = "" - AJM.currentBarSize = "" - AJM.currentSound = L["None"] - AJM.currentEditBoxTagText = "" - AJM.currentEditBoxDisplayTextText = "" - AJM.currentEditBoxSpellNameText = "" - AJM.currentProcCooldown = 55 - -- Create the settings control. - SettingsCreate() - -- Initialise the JambaModule part of this module. - AJM:JambaModuleInitialize( AJM.settingsControl.widgetSettings.frame ) - -- Populate the settings. - AJM:SettingsRefresh() - -- Initialise the popup dialogs. - InitializePopupDialogs() - -- Click the proc list first row, column to set the child controls. - AJM:SettingsProcListRowClick( 1, 1 ) - AJM.tempPositionTimeBars = {} - AJM.procTimerBarPosition = 0 - AJM.procTimerBars = {} - AJM.procTimerBarTop = 0 - AJM.procTimerBarLeft = 0 - AJM:CreateProcFrame() - if AJM.db.initialLoad1 == false then - AJM:LoadDefaultProcs() - AJM.db.initialLoad1 = true - end - if AJM.db.initialLoad2 == false then - AJM:LoadDefaultProcs2() - AJM.db.initialLoad2 = true - end -end - --- Called when the addon is enabled. -function AJM:OnEnable() - AJM:RegisterEvent( "COMBAT_LOG_EVENT_UNFILTERED" ) - AJM:UpdateProcEnabled() - AJM:UpdateShowConfigBars() -end - --- Called when the addon is disabled. -function AJM:OnDisable() -end - -------------------------------------------------------------------------------------------------------------- --- JambaProc functionality. -------------------------------------------------------------------------------------------------------------- - -function AJM:ShowConfigurationBars() - AJM.procFrame:SetBackdropColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.procFrame:EnableMouse( true ) - AJM:AddProcBarTimer( L["Toon-Name-2"], L["Proc Information Text Displayed Here"], 20, 1.0, 0.1, 0.1, 1.0, 57761, false ) - AJM:AddProcBarTimer( L["Toon-Name-3"], L["Proc Information Text Displayed Here"], 17.5, 0.8, 0.2, 0.4, 1.0, 48108, false ) - AJM:AddProcBarTimer( L["Toon-Name-1"], L["Proc Information Text Displayed Here"], 15, 0.3, 0.6, 0.8, 1.0, 59578, false ) - AJM:AddProcBarTimer( L["Toon-Name-1"], L["Proc Information Text Displayed Here"], 12.5, 1.0, 0.1, 0.1, 1.0, 57761, false ) - AJM:AddProcBarTimer( L["Toon-Name-2"], L["Proc Information Text Displayed Here"], 10, 0.8, 0.2, 0.4, 1.0, 48108, false ) - AJM:AddProcBarTimer( L["Toon-Name-3"], L["Proc Information Text Displayed Here"], 5, 0.3, 0.6, 0.8, 1.0, 59578, false ) -end - -function AJM:RemoveConfigurationBars() - AJM.procFrame:SetBackdropColor( 1.0, 1.0, 1.0, 0.0 ) - AJM.procFrame:EnableMouse( false ) - AJM:RemoveProcBarTimer( L["Toon-Name-2"].."57761" ) - AJM:RemoveProcBarTimer( L["Toon-Name-3"].."48108" ) - AJM:RemoveProcBarTimer( L["Toon-Name-1"].."59578" ) - AJM:RemoveProcBarTimer( L["Toon-Name-1"].."57761" ) - AJM:RemoveProcBarTimer( L["Toon-Name-2"].."48108" ) - AJM:RemoveProcBarTimer( L["Toon-Name-3"].."59578" ) -end - -function AJM:CreateProcFrame() - AJM.procFrame = CreateFrame( "Frame", "JambaProcBarAnchor", UIParent ) - AJM.procFrame:SetFrameStrata( "BACKGROUND" ) - AJM.procFrame:SetWidth( (AJM.db.procTimerBarWidth + AJM.db.procTimerBarHeight) ) - AJM.procFrame:SetHeight( 34 ) - AJM.procFrame:SetBackdrop( { bgFile = "Interface/Tooltips/UI-Tooltip-Background" } ) - AJM.procFrame:SetBackdropColor( 1.0, 1.0, 1.0, 0.0 ) - AJM.procFrame:RegisterForDrag( "LeftButton" ) - AJM.procFrame:SetMovable( true ) - AJM.procFrame:ClearAllPoints() - AJM.procFrame:SetScript( "OnDragStart", - function( this ) - if IsAltKeyDown() then - this:StartMoving() - end - end ) - AJM.procFrame:SetScript( "OnDragStop", - function( this ) - this:StopMovingOrSizing() - local point, relativeTo, relativePoint, xOffset, yOffset = this:GetPoint() - AJM.db.framePoint = point - AJM.db.frameRelativePoint = relativePoint - AJM.db.frameXOffset = xOffset - AJM.db.frameYOffset = yOffset - end ) - AJM.procFrame:ClearAllPoints() - AJM.procFrame:SetPoint( AJM.db.framePoint, UIParent, AJM.db.frameRelativePoint, AJM.db.frameXOffset, AJM.db.frameYOffset ) - AJM.procFrame:Show() - AJM.procFrame:SetScript( "OnUpdate", - function() - AJM:DoProcBarUpdates( self, elapsed ) - end ) -end - -function AJM:DoProcBarUpdates() - local time = GetTime() - for index, procBar in pairs( AJM.procTimerBars ) do - if procBar.active == true then - if time >= procBar.expires then - AJM:RemoveProcBarTimer( procBar.key ) - else - local progress = ((procBar.expires - time) / procBar.duration) * 100 - local timeLeft = procBar.expires - time - AJM:UpdateProcBarTimer( procBar, progress, timeLeft ) - end - end - end -end - -function AJM:UpdateProcBarTimer( procBar, progress, timeLeft ) - local timeLeftText = "" - if timeLeft >= 60 then - timeLeftText = ( "%dm %1.1fs" ):format( (timeLeft / 60), (timeLeft % 60) ) - else - timeLeftText = ( "%1.1fs" ):format( (timeLeft % 60) ) - end - procBar.bar.dshadow:SetText( timeLeftText ) - procBar.bar.duration:SetText( timeLeftText ) - procBar.bar.spark:SetPoint( "LEFT", procBar.bar, "LEFT", (progress / 100 * AJM.db.procTimerBarWidth - 5), 0 ) - procBar.bar:SetValue( progress ) -end - -function AJM:CreateProcBar( key, labelText, spellID, textColourR, textColourG, textColourB, textColourA, barColourR, barColourG, barColourB, barColourA ) - local newBar = CreateFrame( "StatusBar", "JambaProcBar"..key, AJM.procFrame ) - -- Create all the portions of the bar. - newBar.icon = CreateFrame( "Frame", "JambaProcBar"..key.."Icon", AJM.procFrame ) - newBar.backgroundTexture = newBar:CreateTexture( "JambaProcBar"..key.."BackgroundTexture", "ARTWORK" ) - newBar.dshadow = newBar:CreateFontString( nil, "OVERLAY" ) - newBar.duration = newBar:CreateFontString( nil, "OVERLAY" ) - newBar.shadow = newBar:CreateFontString( nil, "OVERLAY" ) - newBar.label = newBar:CreateFontString( nil, "OVERLAY" ) - newBar.spark = newBar:CreateTexture( nil, "OVERLAY" ) - -- Icon. - local name, rank, icon, powerCost, isFunnel, powerType, castingTime, minRange, maxRange = GetSpellInfo( spellID ) - newBar.icon:SetWidth( AJM.db.procTimerBarHeight ) - newBar.icon:SetHeight( AJM.db.procTimerBarHeight ) - newBar.icon:SetBackdrop( {bgFile = icon} ) - newBar.icon:SetBackdropColor( 1, 1, 1, 1 ) - newBar.icon:SetPoint( "RIGHT", "JambaProcBar"..key, "LEFT", 0, 0 ) - -- Status Bar. - newBar:SetHeight( AJM.db.procTimerBarHeight ) - newBar:SetWidth( AJM.db.procTimerBarWidth ) - newBar:SetParent( UIParent ) - newBar:SetMinMaxValues( 0, 100 ) - newBar:SetBackdrop( { bgFile = "Interface/Tooltips/UI-Tooltip-Background" } ) - newBar:SetStatusBarTexture( AJM.SharedMedia:Fetch( "statusbar", AJM.db.barTexture ) ) - newBar:GetStatusBarTexture():SetHorizTile( false ) - newBar:GetStatusBarTexture():SetVertTile( false ) - newBar:SetBackdropColor( { r = barColourR, g = barColourG, b = barColourB, a = 0.2} ) - newBar:SetStatusBarColor( barColourR, barColourG, barColourB, barColourA ) - -- Status bar backdrop. - newBar.backgroundTexture:SetTexture( barColourR, barColourG, barColourB, 0.15 ) - newBar.backgroundTexture:SetAllPoints() - -- Duration backdrop. - newBar.dshadow:SetFont( AJM.SharedMedia:Fetch( "font", AJM.db.barFont ), AJM.db.barFontSize ) - newBar.dshadow:SetTextColor( 0, 0, 0, .75 ) - newBar.dshadow:ClearAllPoints() - newBar.dshadow:SetPoint( "RIGHT", newBar, "RIGHT", -6, -1 ) - -- Duration. - newBar.duration:SetFont( AJM.SharedMedia:Fetch( "font", AJM.db.barFont ), AJM.db.barFontSize ) - newBar.duration:SetTextColor( textColourR, textColourG, textColourB, textColourA ) - newBar.duration:ClearAllPoints() - newBar.duration:SetPoint( "RIGHT", newBar, "RIGHT", -5, 0 ) - -- Text backdrop. - newBar.shadow:SetFont( AJM.SharedMedia:Fetch( "font", AJM.db.barFont ), AJM.db.barFontSize ) - newBar.shadow:SetTextColor( 0, 0, 0, .75 ) - newBar.shadow:SetHeight( AJM.db.procTimerBarHeight ) - newBar.shadow:SetWidth( AJM.db.procTimerBarWidth - AJM.db.procTimerBarDurationWidth ) - newBar.shadow:ClearAllPoints() - newBar.shadow:SetPoint( "LEFT", newBar, "LEFT", 2, -1 ) - newBar.shadow:SetText( labelText ) - -- Label. - newBar.label:SetFont( AJM.SharedMedia:Fetch( "font", AJM.db.barFont ), AJM.db.barFontSize ) - newBar.label:SetTextColor( textColourR, textColourG, textColourB, textColourA ) - newBar.label:SetHeight( AJM.db.procTimerBarHeight ) - newBar.label:SetWidth( AJM.db.procTimerBarWidth - AJM.db.procTimerBarDurationWidth ) - newBar.label:ClearAllPoints() - newBar.label:SetPoint( "LEFT", newBar, "LEFT", 1, 0 ) - newBar.label:SetText( labelText ) - -- Spark. - newBar.spark:SetTexture( "Interface\\CastingBar\\UI-CastingBar-Spark" ) - newBar.spark:SetWidth( 10 ) - newBar.spark:SetBlendMode( "ADD" ) - return newBar -end - -function AJM:UpdateProcBarTimerPositions( updateAll ) - JambaUtilities:ClearTable( AJM.tempPositionTimeBars ) - for index, procBar in pairs( AJM.procTimerBars ) do - if procBar.active == true then - AJM.tempPositionTimeBars[procBar.key] = procBar.position - end - end - table.sort( AJM.tempPositionTimeBars ) - AJM.procTimerBarPosition = 0 - for procBarKey, oldPosition in pairs( AJM.tempPositionTimeBars ) do - AJM.procTimerBars[procBarKey].position = AJM.procTimerBarPosition - AJM.procTimerBarPosition = AJM.procTimerBarPosition + 1 - end - for index, procBar in pairs( AJM.procTimerBars ) do - if procBar.active == true or updateAll == true then - AJM:SetProcBarTimerPosition( procBar ) - end - end -end - -function AJM:SetProcBarTimerPosition( procBar ) - procBar.bar:SetPoint( "TOPLEFT", AJM.procFrame, "TOPLEFT", AJM.procTimerBarLeft, AJM.procTimerBarTop - (procBar.position * (AJM.db.procTimerBarHeight + AJM.db.procTimerBarSpacing) ) ) -end - -function AJM:AddProcBarTimer( characterName, displayText, timeLeft, colourRed, colourGreen, colourBlue, colourAlpha, spellID, isUpdate ) - local key = characterName..spellID - if AJM.procTimerBars[key] == nil then - AJM.procTimerBars[key] = {} - AJM.procTimerBars[key].bar = AJM:CreateProcBar( key, characterName.." - "..displayText, spellID, 1, 1, 1, 1, colourRed, colourGreen, colourBlue, colourAlpha ) - end - if isUpdate == false then - AJM.procTimerBars[key].position = AJM.procTimerBarPosition - AJM.procTimerBarPosition = AJM.procTimerBarPosition + 1 - AJM:SetProcBarTimerPosition( AJM.procTimerBars[key] ) - end - AJM.procTimerBars[key].duration = timeLeft - AJM.procTimerBars[key].expires = GetTime() + timeLeft - AJM.procTimerBars[key].active = true - AJM.procTimerBars[key].key = key - AJM.procTimerBars[key].bar:Show() - AJM.procTimerBars[key].bar.icon:Show() - AJM:UpdateProcBarTimerPositions( false ) -end - -function AJM:RemoveProcBarTimer( key ) - if AJM.procTimerBars[key] ~= nil then - AJM.procTimerBars[key].active = false - AJM.procTimerBars[key].bar:Hide() - AJM.procTimerBars[key].bar.icon:Hide() - end - AJM:UpdateProcBarTimerPositions( false ) -end - -function AJM:COMBAT_LOG_EVENT_UNFILTERED( ... ) - -- If not enabled, stop now. - if AJM.db.procEnabled == false then - return - end - -- If show only on master and not the master, stop now. - if AJM.db.procEnabledOnMasterOnly == true then - if JambaApi.IsCharacterTheMaster( AJM.characterName ) == false then - return - end - end - -- Get the combat log information. - local wowEvent, timestamp, event, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, param1, param2, param3, param4, param5, param6, param7, param8, param9 = ... - -- See if the source of this information is in the team, if not stop now. - if JambaApi.IsCharacterInTeam( sourceName ) == false then - return - end - if event == "SPELL_AURA_APPLIED" or event == "SPELL_AURA_REFRESH" then - local isUpdate = false - if event == "SPELL_AURA_REFRESH" then - isUpdate = true - end - for index, procInformation in pairs( AJM.db.procs ) do - if tonumber( param1 ) == tonumber( procInformation.spellID ) then - if JambaApi.DoesCharacterHaveTag( sourceName, procInformation.tag ) == true then - if procInformation.sound ~= L["None"] then - PlaySoundFile( AJM.SharedMedia:Fetch( "sound", procInformation.sound ) ) - end - AJM:AddProcBarTimer( sourceName, procInformation.displayText, procInformation.coolDown, procInformation.colourRed, procInformation.colourGreen, procInformation.colourBlue, procInformation.colourAlpha, param1, isUpdate ) - end - break - end - end - end - if event == "SPELL_AURA_REMOVED" then - for index, procInformation in pairs( AJM.db.procs ) do - if tonumber( param1 ) == tonumber( procInformation.spellID ) then - if JambaApi.DoesCharacterHaveTag( sourceName, procInformation.tag ) == true then - AJM:RemoveProcBarTimer( sourceName..param1 ) - end - end - end - end -end - --- A Jamba command has been recieved. -function AJM:JambaOnCommandReceived( characterName, commandName, ... ) -end diff --git a/Jamba-Proc/Locales/JambaProc-Locale-enUS.lua b/Jamba-Proc/Locales/JambaProc-Locale-enUS.lua deleted file mode 100644 index 637c950..0000000 --- a/Jamba-Proc/Locales/JambaProc-Locale-enUS.lua +++ /dev/null @@ -1,68 +0,0 @@ ---[[ -Jamba - Jafula's Awesome Multi-Boxer Assistant -Copyright 2008 - 2016 Michael "Jafula" Miller -License: The MIT License -]]-- - -local L = LibStub("AceLocale-3.0"):NewLocale( "Jamba-Proc", "enUS", true ) -L["Slash Commands"] = true -L["Combat"] = true -L["Proc"] = true -L["Push Settings"] = true -L["Push the proc settings to all characters in the team."] = true -L["Settings received from A."] = function( characterName ) - return string.format( "Settings received from %s.", characterName ) -end -L["Proc"] = true -L["Enable Jamba-Proc"] = true -L["Jamba Proc"] = true -L["Tag"] = true -L["Proc List"] = true -L["Proc Configuration"] = true -L["Display Text"] = true -L['Are you sure you wish to remove "%s" from the proc list?'] = true -L["Add"] = true -L["Remove"] = true -L["Save"] = true -L["The Art of War"] = true -L["Hot Streak"] = true -L["Missile Barrage"] = true -L["Fireball!"] = true -L["Clearcasting (Shaman)"] = true -L["Clearcasting (Druid)"] = true -L["Maelstrom Weapon"] = true -L["Elune's Wrath"] = true -L["Shadow Trance"] = true -L["Clearcasting (Mage)"] = true -L["Infusion of Light"] = true -L["Freezing Fog"] = true -L["Lock and Load"] = true -L["Eclipse (Lunar)"] = true -L["Eclipse (Solar)"] = true -L["Appearance & Layout"] = true -L["Proc Bar Texture"] = true -L["Proc Bar Font"] = true -L["Proc Bar Font Size"] = true -L["Proc Bar Width"] = true -L["Proc Bar Height"] = true -L["Proc Bar Spacing"] = true -L["Proc Duration (seconds)"] = true -L["Proc Colour"] = true -L["Proc Sound"] = true -L["Toon-Name-1"] = true -L["Toon-Name-2"] = true -L["Toon-Name-3"] = true -L["Enter the ID of the spell to add:"] = true -- Remove obsolete text around line 25 similar to this one (name instead of ID). -L["Spell ID"] = true -- Remove obsolete text around line 25 similar to this one (name instead of ID). -L["Enable Jamba Proc"] = true -L["Show Test Bars"] = true -L["Show Proc Bars Only On Master"] = true -L["Proc Information Text Displayed Here"] = true -L["Blizzard"] = true -- Default status bar texture, check what LibSharedMedia has for default for each language. -L["Friz Quadrata TT"] = true -- Default status bar font, check what LibSharedMedia has for default for each language. -L["None"] = true -- Default sound, check what LibSharedMedia has for default for each language. -L["Killing Machine"] = true -L["Fulmination!"] = true -L["Sword and Board"] = true -L["Taste for Blood"] = true -L["Power Torrent"] = true \ No newline at end of file diff --git a/Jamba-Proc/Locales/Locales.xml b/Jamba-Proc/Locales/Locales.xml deleted file mode 100644 index a3d739b..0000000 --- a/Jamba-Proc/Locales/Locales.xml +++ /dev/null @@ -1,9 +0,0 @@ -<!-- -Jamba - Jafula's Awesome Multi-Boxer Assistant -Copyright 2008 - 2016 Michael "Jafula" Miller -License: The MIT License ---> - -<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd" xmlns="http://www.blizzard.com/wow/ui/"> - <Script file="JambaProc-Locale-enUS.lua" /> -</Ui> \ No newline at end of file diff --git a/Jamba-Purchase/Jamba-Purchase.toc b/Jamba-Purchase/Jamba-Purchase.toc index 6456007..edc0913 100644 --- a/Jamba-Purchase/Jamba-Purchase.toc +++ b/Jamba-Purchase/Jamba-Purchase.toc @@ -1,8 +1,10 @@ -## Interface: 60200 +## Interface: 70000 ## Title: Jamba-Purchase ## Notes: Jamba-Purchase ## Author: Ebony, Former Author: Jafula -## Version: 4.2.2 +## Version: 7.0.3-5.0 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba ## Dependencies: Jamba ## SavedVariables: JambaPurchaseProfileDB ## LoadOnDemand: 1 diff --git a/Jamba-Purchase/JambaPurchase.lua b/Jamba-Purchase/JambaPurchase.lua index e6193de..ef9d799 100644 --- a/Jamba-Purchase/JambaPurchase.lua +++ b/Jamba-Purchase/JambaPurchase.lua @@ -284,7 +284,7 @@ function AJM:SettingsScrollRefresh() AJM.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) AJM.settingsControl.list.rows[iterateDisplayRows].columns[3].textString:SetText( "" ) AJM.settingsControl.list.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControl.list.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + AJM.settingsControl.list.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + AJM.settingsControl.offset if dataRowNumber <= AJM:GetItemsMaxPosition() then @@ -295,7 +295,7 @@ function AJM:SettingsScrollRefresh() AJM.settingsControl.list.rows[iterateDisplayRows].columns[3].textString:SetText( itemInformation.tag ) -- Highlight the selected row. if dataRowNumber == AJM.settingsControl.highlightRow then - AJM.settingsControl.list.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + AJM.settingsControl.list.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) end end end diff --git a/Jamba-Quest/Jamba-Quest.toc b/Jamba-Quest/Jamba-Quest.toc index 9bcfedc..49be9a0 100644 --- a/Jamba-Quest/Jamba-Quest.toc +++ b/Jamba-Quest/Jamba-Quest.toc @@ -1,10 +1,12 @@ -## Interface: 60200 +## Interface: 70000 ## Title: JambaQuest ## Notes: JambaQuest -## Author: Ebony, Former Author: Jafula -## Version: 4.2.2 +## Author: Ebony, DropDownchanges by Schilm, Former Author: Jafula +## Version: 7.0.3-5.0.1 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba ## Dependencies: Jamba ## SavedVariables: JambaQuestProfileDB ## LoadOnDemand: 1 Locales\Locales.xml -JambaQuest.lua \ No newline at end of file +JambaQuest.lua diff --git a/Jamba-Quest/JambaQuest.lua b/Jamba-Quest/JambaQuest.lua index 6146351..685fb59 100644 --- a/Jamba-Quest/JambaQuest.lua +++ b/Jamba-Quest/JambaQuest.lua @@ -1,8 +1,8 @@ --[[ -Jamba - Jafula's Awesome Multi-Boxer Assistant +Jamba -- Jafula's Awesome Multi-Boxer Assistant Copyright 2008 - 2016 Michael "Jafula" Miller License: The MIT License -]]-- +--]] -- Create the addon using AceAddon-3.0 and embed some libraries. local AJM = LibStub( "AceAddon-3.0" ):NewAddon( @@ -20,6 +20,9 @@ local JambaHelperSettings = LibStub:GetLibrary( "JambaHelperSettings-1.0" ) local AceGUI = LibStub( "AceGUI-3.0" ) AJM.SharedMedia = LibStub( "LibSharedMedia-3.0" ) + +local JambaQuestMapQuestOptionsDropDown = CreateFrame("Frame", "JambaQuestMapQuestOptionsDropDown", QuestMapFrame, "UIDropDownMenuTemplate"); + -- Constants and Locale for this module. AJM.moduleName = "Jamba-Quest" AJM.settingsDatabaseName = "JambaQuestProfileDB" @@ -28,6 +31,13 @@ local L = LibStub( "AceLocale-3.0" ):GetLocale( AJM.moduleName ) AJM.parentDisplayName = L["Quest"] AJM.moduleDisplayName = L["Quest"] +ALL_QUEST_BUTTON_TEXTURES = { + _AbandonAllButton = [[Interface\Icons\INV_BOX_01]], + _ShareAllButton = [[Interface\Icons\INV_BOX_02]], + _TrackAllButton = [[Interface\Icons\INV_BOX_03]], + _UnTrackAllButton = [[Interface\Icons\INV_BOX_04]], +} + -- Settings - the values to store and their defaults for the settings database. AJM.settings = { profile = { @@ -119,6 +129,9 @@ AJM.COMMAND_SELECT_QUEST_LOG_ENTRY = "SelectQuestLogEntry" AJM.COMMAND_QUEST_TRACK = "QuestTrack" AJM.COMMAND_ABANDON_QUEST = "AbandonQuest" AJM.COMMAND_ABANDON_ALL_QUESTS = "AbandonAllQuests" +AJM.COMMAND_TRACK_ALL_QUESTS = "TrackAllQuests" +AJM.COMMAND_UNTRACK_ALL_QUESTS = "UnTrackAllQuests" +AJM.COMMAND_SHARE_ALL_QUESTS = "ShareAllQuests" AJM.COMMAND_TOGGLE_AUTO_SELECT = "ToggleAutoSelect" AJM.COMMAND_LOG_COMPLETE_QUEST = "LogCompleteQuest" AJM.COMMAND_ACCEPT_QUEST_FAKE = "AcceptQuestFake" @@ -144,8 +157,7 @@ function AJM:OnInitialize() -- Populate the settings. AJM:SettingsRefresh() -- Create the Jamba Quest Log frame. - AJM.currentlySelectedQuest = L["(No Quest Selected)"] - AJM:CreateJambaQuestLogFrame() + AJM:CreateJambaMiniQuestLogFrame() -- An empty table to hold the available and active quests at an npc. AJM.gossipQuests = {} end @@ -163,6 +175,8 @@ function AJM:OnEnable() AJM:RegisterEvent( "GOSSIP_SHOW" ) AJM:RegisterEvent( "QUEST_GREETING" ) AJM:RegisterEvent( "QUEST_PROGRESS" ) + AJM:RegisterEvent( "WORLD_MAP_UPDATE" ) + AJM:RegisterEvent( "ZONE_CHANGED_NEW_AREA" ) -- Quest post hooks. AJM:SecureHook( "SelectGossipOption" ) AJM:SecureHook( "SelectGossipActiveQuest" ) @@ -177,8 +191,11 @@ function AJM:OnEnable() AJM:SecureHook( "ToggleFrame" ) AJM:SecureHook( "ToggleQuestLog" ) AJM:SecureHook( WorldMapFrame, "Hide", "QuestLogFrameHide" ) - AJM:SecureHook( "SelectQuestLogEntry" ) AJM:SecureHook( "ShowQuestComplete" ) + + JambaQuestMapQuestOptionsDropDown.questID = 0; -- for QuestMapQuestOptionsDropDown_Initialize + UIDropDownMenu_Initialize(JambaQuestMapQuestOptionsDropDown, JambaQuestMapQuestOptionsDropDown_Initialize, "MENU"); + end -- Called when the addon is disabled. @@ -1261,7 +1278,7 @@ function AJM:QUEST_COMPLETE() AJM:DebugMessage( "QUEST_COMPLETE" ) if AJM.db.enableAutoQuestCompletion == true then if (AJM.db.hasChoiceAquireBestQuestRewardForCharacter == true) and (GetNumQuestChoices() > 1) then - local bestQuestItemIndex = AJM:GetBestRewardIndexForCharacter() + local bestQuestItemIndex = nil --AJM:GetBestRewardIndexForCharacter() Max Fix 4/1/2016... this method is commented, yields error. if bestQuestItemIndex ~= nil and bestQuestItemIndex > 0 then local questItemChoice = _G["QuestInfoItem"..bestQuestItemIndex] QuestInfoItem_OnClick( questItemChoice ) @@ -1622,12 +1639,10 @@ function AJM:QUEST_ACCEPTED( ... ) -- Remove some spam, --AJM:JambaSendMessageToTeam( AJM.db.messageArea, "Attempting to auto share newly accepted quest.", false ) SelectQuestLogEntry( questIndex ) - if AJM:IsCurrentlySelectedQuestValid() == true then if GetQuestLogPushable() and GetNumSubgroupMembers() > 0 then AJM:JambaSendMessageToTeam( AJM.db.messageArea, "Pushing newly accepted quest.", false ) QuestLogPushQuest() end - end end end end @@ -1765,236 +1780,178 @@ function AJM:QUEST_DETAIL() end end end -------------------------------------------------------------------------------------------------------------- --- ESCORT QUEST -------------------------------------------------------------------------------------------------------------- - -function AJM:QUEST_ACCEPT_CONFIRM( event, senderName, questName ) - AJM:DebugMessage( "QUEST_ACCEPT_CONFIRM" ) - if AJM.db.acceptQuests == true then - if AJM.db.slaveAutoAcceptEscortQuest == true then - AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["Automatically Accepted Escort Quest: A"]( questName ), false ) - AJM.isInternalCommand = true - ConfirmAcceptQuest() - AJM.isInternalCommand = false - StaticPopup_Hide( "QUEST_ACCEPT" ) - end - end -end ------------------------------------------------------------------------------------------------------------- --- JAMBA QUEST LOG WINDOW +-- JAMBA QUEST CONTEXT MENU ------------------------------------------------------------------------------------------------------------- -function AJM.JambaQuestSelectButtonClicked() - if AJM:IsCurrentlySelectedQuestValid() == true then - AJM:JambaSendCommandToTeam( AJM.COMMAND_SELECT_QUEST_LOG_ENTRY, AJM.currentlySelectedQuest, AJM.selectedTag ) - else - AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["You must select a quest from the quest log in order to action it on your other characters."], false ) - end +function JambaQuestMapQuestOptionsDropDown_Initialize(self) + local questLogIndex = GetQuestLogIndexByID(self.questID); + local info = UIDropDownMenu_CreateInfo(); + info.isNotRadio = true; + info.notCheckable = true; + table.insert( UISpecialFrames, "JambaQuestMapQuestOptionsDropDown" ) + + info.text = TRACK_QUEST; + if ( IsQuestWatched(questLogIndex) ) then + info.text = UNTRACK_QUEST; + end + info.func =function(_, questID) AJM:QuestMapQuestOptions_ToggleTrackQuest(questID) end; + info.arg1 = self.questID; + UIDropDownMenu_AddButton(info) + + info.text = SHARE_QUEST; + info.func = function(_, questID) AJM:QuestMapQuestOptions_ShareQuest(questID) end; + info.arg1 = self.questID; + if ( not GetQuestLogPushable(questLogIndex) or not IsInGroup() ) then + info.disabled = 1; + end + UIDropDownMenu_AddButton(info) + + info.text = ABANDON_QUEST; + info.func = function(_, questID) AJM:QuestMapQuestOptions_AbandonQuest(questID) end; + info.arg1 = self.questID; + info.disabled = nil; + UIDropDownMenu_AddButton(info) + + info.text = L["JAMBA_QUESTLOG_CONTEXT_DROPDOWNTEXT_TrackAllToons"]; + if ( IsQuestWatched(questLogIndex) ) then + info.text = L["JAMBA_QUESTLOG_CONTEXT_DROPDOWNTEXT_UnTrackAllToons"]; + end + info.func =function(_, questID) AJM:QuestMapQuestOptions_ToggleTrackQuestAllToons(questID) end; + info.arg1 = self.questID; + UIDropDownMenu_AddButton(info) + + info.text = L["JAMBA_QUESTLOG_CONTEXT_DROPDOWNTEXT_AbandonAllToons"]; + info.func =function(_, questID) AJM:QuestMapQuestOptions_AbandonQuestAllToons(questID) end; + info.arg1 = self.questID; + UIDropDownMenu_AddButton(info) + + StaticPopupDialogs["JAMBAQUEST_CONFIRM_ABANDON_QUEST_NEW"] = { + text = L["JAMBA_QUESTLOG_CONTEXT_ALERT_AbandonAllToons"], + button1 = YES, + button2 = NO, + timeout = 0, + whileDead = true, + hideOnEscape = true, + OnAccept = function(self, data) + AJM:JambaSendCommandToTeam( AJM.COMMAND_ABANDON_QUEST, data.questID, data.title) + end, + } end -function AJM.JambaQuestShareButtonClicked() - if AJM:IsCurrentlySelectedQuestValid() == true then - if GetQuestLogPushable() and GetNumSubgroupMembers() > 0 then - QuestLogPushQuest() - end +function AJM:QuestMapQuestOptions_ToggleTrackQuest(questID) + local questLogIndex = GetQuestLogIndexByID(questID); + + if ( IsQuestWatched(questLogIndex) ) then + QuestObjectiveTracker_UntrackQuest(nil, questID); else - AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["You must select a quest from the quest log in order to action it on your other characters."], false ) + AddQuestWatch(questLogIndex, true); + QuestSuperTracking_OnQuestTracked(questID); end end -function AJM.JambaQuestTrackAllButtonClicked() - AJM.iterateQuests = 1 - if AJM.iterateQuests <= GetNumQuestLogEntries() then - AJM:ScheduleTimer( "TrackAllNextQuest", 0.5 ) - end -end +function AJM:QuestMapQuestOptions_ShareQuest(questID) -function AJM.TrackAllNextQuest() - local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( AJM.iterateQuests ) - if isHeader == nil then - if title ~= nil then - SelectQuestLogEntry( AJM.iterateQuests ) - if AJM:IsCurrentlySelectedQuestValid() == true then - local watch = 0 - local questIndex = AJM:GetQuestLogIndexByName( AJM.currentlySelectedQuest ) - if questIndex ~= 0 then - AddQuestWatch( questIndex ) - watch = 1 - end - AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_TRACK, AJM.currentlySelectedQuest, watch, AJM.selectedTag ) - end - end - end - AJM.iterateQuests = AJM.iterateQuests + 1 - if AJM.iterateQuests <= GetNumQuestLogEntries() then - AJM:ScheduleTimer( "TrackAllNextQuest", 0.5 ) - end + local questLogIndex = GetQuestLogIndexByID(questID); + QuestLogPushQuest(questLogIndex); + PlaySound("igQuestLogOpen"); end -function AJM.JambaQuestTrackNoneButtonClicked() - AJM.iterateQuests = 1 - if AJM.iterateQuests <= GetNumQuestLogEntries() then - AJM:ScheduleTimer( "TrackNoneNextQuest", 0.5 ) +function AJM:QuestMapQuestOptions_AbandonQuest(questID) + local lastQuestIndex = GetQuestLogSelection(); + SelectQuestLogEntry(GetQuestLogIndexByID(questID)); + SetAbandonQuest(); + local items = GetAbandonQuestItems(); + if ( items ) then + StaticPopup_Hide("ABANDON_QUEST"); + StaticPopup_Show("ABANDON_QUEST_WITH_ITEMS", GetAbandonQuestName(), items); + else + StaticPopup_Hide("ABANDON_QUEST_WITH_ITEMS"); + StaticPopup_Show("ABANDON_QUEST", GetAbandonQuestName()); end + SelectQuestLogEntry(lastQuestIndex); end -function AJM.TrackNoneNextQuest() - local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( AJM.iterateQuests ) - if isHeader == nil then - if title ~= nil then - SelectQuestLogEntry( AJM.iterateQuests ) - if AJM:IsCurrentlySelectedQuestValid() == true then - local watch = 0 - local questIndex = AJM:GetQuestLogIndexByName( AJM.currentlySelectedQuest ) - if questIndex ~= 0 then - RemoveQuestWatch( questIndex ) - watch = 0 - end - AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_TRACK, AJM.currentlySelectedQuest, watch, AJM.selectedTag ) - end - end - end - AJM.iterateQuests = AJM.iterateQuests + 1 - if AJM.iterateQuests <= GetNumQuestLogEntries() then - AJM:ScheduleTimer( "TrackNoneNextQuest", 0.5 ) +function AJM:QuestMapQuestOptions_TrackQuest(questID, questLogIndex) + --AJM:Print("test", questID, questLogIndex ) + if ( not IsQuestWatched(questID) ) then + AddQuestWatch(questLogIndex, true); + QuestSuperTracking_OnQuestTracked(questID); end end -function AJM.JambaQuestTrackToggleButtonClicked() - if AJM:IsCurrentlySelectedQuestValid() == true then - local watch = 0 - local questIndex = AJM:GetQuestLogIndexByName( AJM.currentlySelectedQuest ) - if questIndex ~= 0 then - if IsQuestWatched( questIndex ) then - RemoveQuestWatch( questIndex ) - watch = 0 - else - AddQuestWatch( questIndex ) - watch = 1 - end - end - AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_TRACK, AJM.currentlySelectedQuest, watch, AJM.selectedTag ) - else - AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["You must select a quest from the quest log in order to action it on your other characters."], false ) +function AJM:QuestMapQuestOptions_UnTrackQuest(questID, questLogIndex) + --AJM:Print("test", questID, questLogIndex ) + if ( IsQuestWatched(questLogIndex) ) then + QuestObjectiveTracker_UntrackQuest(nil, questID); end end -function AJM.JambaQuestTrackToggleAllButtonClicked() - AJM.iterateQuests = 1 - if AJM.iterateQuests <= GetNumQuestLogEntries() then - AJM:ScheduleTimer( "TrackToggleNextQuest", 0.5 ) - end -end - -function AJM.TrackToggleNextQuest() - local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( AJM.iterateQuests ) - if isHeader == nil then - if title ~= nil then - SelectQuestLogEntry( AJM.iterateQuests ) - if AJM:IsCurrentlySelectedQuestValid() == true then - local watch = 0 - local questIndex = AJM:GetQuestLogIndexByName( AJM.currentlySelectedQuest ) - if questIndex ~= 0 then - if IsQuestWatched( questIndex ) then - RemoveQuestWatch( questIndex ) - watch = 0 - else - AddQuestWatch( questIndex ) - watch = 1 - end - end - AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_TRACK, AJM.currentlySelectedQuest, watch, AJM.selectedTag ) - end - end - end - AJM.iterateQuests = AJM.iterateQuests + 1 - if AJM.iterateQuests <= GetNumQuestLogEntries() then - AJM:ScheduleTimer( "TrackToggleNextQuest", 0.5 ) - end -end +function AJM:QuestMapQuestOptions_ToggleTrackQuestAllToons(questID) -function AJM:JambaQuestAbandonQuest() - if AJM:IsCurrentlySelectedQuestValid() == true then - AJM:JambaSendCommandToTeam( AJM.COMMAND_ABANDON_QUEST, AJM.currentlySelectedQuest, AJM.selectedTag ) + local questLogIndex = GetQuestLogIndexByID(questID); + local title = GetQuestLogTitle( questLogIndex ) + + if ( IsQuestWatched(questLogIndex) ) then + AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_TRACK, questID, title, false ) else - AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["You must select a quest from the quest log in order to action it on your other characters."], false ) + AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_TRACK, questID, title, true ) end end -function AJM.JambaQuestAbandonButtonClicked() - if AJM:IsCurrentlySelectedQuestValid() == true then - StaticPopup_Show( "JAMBAQUEST_CONFIRM_ABANDON_QUEST", AJM.currentlySelectedQuest ) - else - AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["You must select a quest from the quest log in order to action it on your other characters."], false ) - end -end +function AJM:QuestMapQuestOptions_AbandonQuestAllToons(questID) -function AJM:JambaQuestAbandonAllQuests() - AJM:JambaSendCommandToTeam( AJM.COMMAND_ABANDON_ALL_QUESTS, AJM.selectedTag ) + local questLogIndex = GetQuestLogIndexByID(questID); + local title = GetQuestLogTitle( questLogIndex ) + + local data = {} + data.questID = questID + data.title = title + + StaticPopup_Show("JAMBAQUEST_CONFIRM_ABANDON_QUEST_NEW", title, nil, data) + end -function AJM.AbandonNextQuest() - local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( AJM.iterateQuests ) - if isHeader == false then - if title ~= nil then - AJM:DebugMessage ( "AbandonQuest" ) - SelectQuestLogEntry( AJM.iterateQuests ) - SetAbandonQuest() - AbandonQuest() - AJM:UpdateQuestLog( nil ) - -- Start again at the top, as to not miss any quests. - AJM.iterateQuests = 1 +function AJM:QuestMapQuestOptions_Jamba_DoQuestTrack( sender, questID, title, track ) + + local questLogIndex = GetQuestLogIndexByID( questID ) + + if questLogIndex ~= 0 then + if track then + AJM:QuestMapQuestOptions_TrackQuest( questID, questLogIndex ) + else + AJM:QuestMapQuestOptions_UnTrackQuest( questID, questLogIndex ) end - end - AJM.iterateQuests = AJM.iterateQuests + 1 - if AJM.iterateQuests <= GetNumQuestLogEntries() then - AJM:ScheduleTimer( "AbandonNextQuest", 0.5 ) - end + else + AJM:JambaSendMessageToTeam( AJM.db.warningArea, L["JAMBA_QUESTLOG_DoNotHaveQuest"]( title ), false ) + end end -function AJM.JambaQuestAbandonAllButtonClicked() - StaticPopup_Show( "JAMBAQUEST_CONFIRM_ABANDON_ALL_QUESTS" ) -end +function AJM:QuestMapQuestOptions_Jamba_DoAbandonQuest( sender, questID, title ) -function AJM.JambaQuestShareAllButtonClicked() - AJM.iterateQuests = 1 - if AJM.iterateQuests <= GetNumQuestLogEntries() then - AJM:ScheduleTimer( "PushNextQuest", 1 ) - end -end + local questLogIndex = GetQuestLogIndexByID( questID ) + + if questLogIndex ~= 0 then -function AJM.PushNextQuest() - local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( AJM.iterateQuests ) - if isHeader == nil then - if title ~= nil then - SelectQuestLogEntry( AJM.iterateQuests ) - if GetQuestLogPushable() and GetNumSubgroupMembers() > 0 then - AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["Sharing Quest: A"]( title ), false ) - QuestLogPushQuest() - end - end - end - AJM.iterateQuests = AJM.iterateQuests + 1 - if AJM.iterateQuests <= GetNumQuestLogEntries() then - AJM:ScheduleTimer( "PushNextQuest", 1 ) - end -end + local lastQuestIndex = GetQuestLogSelection(); + SelectQuestLogEntry(GetQuestLogIndexByID(questID)); + SetAbandonQuest(); + AbandonQuest(); + SelectQuestLogEntry(lastQuestIndex); + + AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["JAMBA_QUESTLOG_HaveAbandonedQuest"]( title ), false ) + else + AJM:JambaSendMessageToTeam( AJM.db.warningArea, L["JAMBA_QUESTLOG_DoNotHaveQuest"]( title ), false ) + end -function AJM.JambaQuestCloseButtonClicked() - JambaQuestLogWindowFrame:Hide() end -function AJM.JambaQuestTagDropDownOnClick( event, value ) - AJM.selectedTag = value -end +function AJM:CreateJambaMiniQuestLogFrame() -function AJM:CreateJambaQuestLogFrame() - local frameName = "JambaQuestLogWindowFrame" - JambaQuestLogWindowFrame = CreateFrame( "Frame", "JambaQuestLogWindowFrame", UIParent ) - local frame = JambaQuestLogWindowFrame - frame:SetWidth( 670 ) + JambaMiniQuestLogFrame = CreateFrame( "Frame", "JambaMiniQuestLogFrame", QuestMapFrame ) + local frame = JambaMiniQuestLogFrame + frame:SetWidth( 155 ) frame:SetHeight( 50 ) frame:SetFrameStrata( "HIGH" ) frame:SetToplevel( true ) @@ -2002,178 +1959,202 @@ function AJM:CreateJambaQuestLogFrame() frame:EnableMouse( true ) frame:SetMovable( true ) frame:ClearAllPoints() - frame:SetPoint( AJM.db.framePoint, UIParent, AJM.db.frameRelativePoint, AJM.db.frameXOffset, AJM.db.frameYOffset ) - 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() - AJM.db.framePoint = point - AJM.db.frameRelativePoint = relativePoint - AJM.db.frameXOffset = xOffset - AJM.db.frameYOffset = yOffset - end ) - frame:SetBackdrop( { + frame:SetPoint("BOTTOMRIGHT", QuestMapFrame, "BOTTOMRIGHT", 5,-55) + frame:SetBackdrop( { bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", tile = true, tileSize = 15, edgeSize = 15, insets = { left = 5, right = 5, top = 5, bottom = 5 } } ) - local buttonHeight = 22 - local buttonWidth = 100 - local buttonWidthTag = 120 - local buttonWidthToggle = 140 - local buttonTop = -10 --- local buttonTopSecondRow = buttonTop - buttonHeight - 2 - local left = 8 - local spacing = 1 - -- Tags - local dropDownTag = AceGUI:Create( "Dropdown" ) - dropDownTag.frame:SetParent( frame ) - dropDownTag:SetLabel( "" ) - dropDownTag:SetPoint( "TOPLEFT", frame, "TOPLEFT", left, -5 ) - dropDownTag:SetWidth( buttonWidthTag ) - dropDownTag:SetList( JambaApi.AllTagsList() ) - dropDownTag:SetCallback( "OnValueChanged", AJM.JambaQuestTagDropDownOnClick ) - -- Hack - 1 is "all" in the list - this might change on day, but will do for now! - dropDownTag:SetValue( 1 ) - AJM.selectedTag = JambaApi.AllTag() - AJM.jambaQuestLogFrameDropDownTag = dropDownTag - -- Select. - left = left + buttonWidth + spacing - left = left + 30 - local selectButton = CreateFrame( "Button", frameName.."ButtonSelect", frame, "UIPanelButtonTemplate" ) - selectButton:SetScript( "OnClick", AJM.JambaQuestSelectButtonClicked ) - selectButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", left, buttonTop ) - selectButton:SetHeight( buttonHeight ) - selectButton:SetWidth( buttonWidth ) - selectButton:SetText( L["Select"] ) - left = left + buttonWidth + spacing - -- Share / Share All. - local shareButton = CreateFrame( "Button", frameName.."ButtonShare", frame, "UIPanelButtonTemplate" ) - shareButton:SetScript( "OnClick", AJM.JambaQuestShareButtonClicked ) - shareButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", left, buttonTop ) - shareButton:SetHeight( buttonHeight ) - shareButton:SetWidth( buttonWidth ) - shareButton:SetText( L["Share"] ) - AJM.jambaQuestLogFrameShareButton = shareButton - left = left + buttonWidth + spacing - local shareAllButton = CreateFrame( "Button", frameName.."ButtonShareAll", frame, "UIPanelButtonTemplate" ) - shareAllButton:SetScript( "OnClick", AJM.JambaQuestShareAllButtonClicked ) - shareAllButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", left, buttonTop ) - shareAllButton:SetHeight( buttonHeight ) - shareAllButton:SetWidth( buttonWidth ) - shareAllButton:SetText( L["Share All"] ) - left = left + buttonWidth + spacing - -- Track / Track All. --- local trackButtonToggle = CreateFrame( "Button", frameName.."ButtonToggleTrack", frame, "UIPanelButtonTemplate" ) --- trackButtonToggle:SetScript( "OnClick", AJM.JambaQuestTrackToggleButtonClicked ) --- trackButtonToggle:SetPoint( "TOPLEFT", frame, "TOPLEFT", left, buttonTop ) --- trackButtonToggle:SetHeight( buttonHeight ) --- trackButtonToggle:SetWidth( buttonWidthToggle ) --- trackButtonToggle:SetText( L["Toggle Track"] ) --- local trackAllButtonToggle = CreateFrame( "Button", frameName.."ButtonToggleTrackAll", frame, "UIPanelButtonTemplate" ) --- trackAllButtonToggle:SetScript( "OnClick", AJM.JambaQuestTrackToggleAllButtonClicked ) --- trackAllButtonToggle:SetPoint( "TOPLEFT", frame, "TOPLEFT", left, buttonTopSecondRow ) --- trackAllButtonToggle:SetHeight( buttonHeight ) --- trackAllButtonToggle:SetWidth( buttonWidthToggle ) --- trackAllButtonToggle:SetText( L["Toggle Track All"] ) --- left = left + buttonWidthToggle + spacing --- local trackButton = CreateFrame( "Button", frameName.."ButtonTrackAll", frame, "UIPanelButtonTemplate" ) --- trackButton:SetScript( "OnClick", AJM.JambaQuestTrackAllButtonClicked ) --- trackButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", left, buttonTop ) --- trackButton:SetHeight( buttonHeight ) --- trackButton:SetWidth( buttonWidth ) --- trackButton:SetText( L["Track All"] ) --- local trackNoneButton = CreateFrame( "Button", frameName.."ButtonTrackNone", frame, "UIPanelButtonTemplate" ) --- trackNoneButton:SetScript( "OnClick", AJM.JambaQuestTrackNoneButtonClicked ) --- trackNoneButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", left, buttonTopSecondRow ) --- trackNoneButton:SetHeight( buttonHeight ) --- trackNoneButton:SetWidth( buttonWidth ) --- trackNoneButton:SetText( L["Track None"] ) --- left = left + buttonWidth + spacing --- left = left + 70 --- -- Abandon / Abandon All. - local abandonButton = CreateFrame( "Button", frameName.."ButtonAbandon", frame, "UIPanelButtonTemplate" ) - abandonButton:SetScript( "OnClick", AJM.JambaQuestAbandonButtonClicked ) - abandonButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", left, buttonTop ) - abandonButton:SetHeight( buttonHeight ) - abandonButton:SetWidth( buttonWidth ) - abandonButton:SetText( L["Abandon"] ) - left = left + buttonWidth + spacing - local abandonAllButton = CreateFrame( "Button", frameName.."ButtonAbandonAll", frame, "UIPanelButtonTemplate" ) - abandonAllButton:SetScript( "OnClick", AJM.JambaQuestAbandonAllButtonClicked ) - abandonAllButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", left, buttonTop ) - abandonAllButton:SetHeight( buttonHeight ) - abandonAllButton:SetWidth( buttonWidth ) - abandonAllButton:SetText( L["Abandon All"] ) - left = left + buttonWidth + spacing - -- Close. - local closeButton = CreateFrame( "Button", frameName.."ButtonClose", frame, "UIPanelCloseButton" ) - closeButton:SetScript( "OnClick", AJM.JambaQuestCloseButtonClicked ) - closeButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", -1, -2 ) + table.insert( UISpecialFrames, "JambaQuestLogWindowFrame" ) - -- Popups. - StaticPopupDialogs["JAMBAQUEST_CONFIRM_ABANDON_QUEST"] = { - text = L['Abandon "%s"?'], - button1 = YES, - button2 = NO, - timeout = 0, - whileDead = 1, - hideOnEscape = 1, - OnAccept = function() - AJM:JambaQuestAbandonQuest() - end, - } - StaticPopupDialogs["JAMBAQUEST_CONFIRM_ABANDON_ALL_QUESTS"] = { - text = L["This will abandon ALL quests ON every toon! Yes, this means you will end up with ZERO quests in your quest log! Are you sure?"], + AJM:CreateQuestLogButton('_AbandonAllButton', 0, AJM.QuestMapAll_Jamba_DoAbandonAllQuestsFromAllToons) + --AJM:CreateQuestLogButton('_ShareAllButton', 1, AJM.QuestMapAll_Jamba_DoShareAllQuestsFromThisToon) -- MCS 2016/04/02 This would make the share functionality share all quests from just the current toon + AJM:CreateQuestLogButton('_ShareAllButton', 1, AJM.QuestMapAll_Jamba_DoShareAllQuestsFromAllToons) -- MCS 2016/04/02 This would make the share functionality share all quests on all toons, rather than just current toon + AJM:CreateQuestLogButton('_TrackAllButton', 2, AJM.QuestMapAll_Jamba_DoTrackAllQuestsFromAllToons) + AJM:CreateQuestLogButton('_UnTrackAllButton', 3, AJM.QuestMapAll_Jamba_DoUnTrackAllQuestsFromAllToons) + +end + +function AJM:CreateQuestLogButton(name, index, doAction) + + StaticPopupDialogs[name .. "_confirm"] = { + text = L["JAMBA_QUESTLOG_ALL_ALERT" .. name], button1 = YES, button2 = NO, timeout = 0, - whileDead = 1, - hideOnEscape = 1, + whileDead = true, + hideOnEscape = true, OnAccept = function() - AJM:JambaQuestAbandonAllQuests() + doAction() end, - } + } + + local x_coord = -10 - index * 35 + + local button = CreateFrame( "CheckButton", name, JambaMiniQuestLogFrame ) + + local buttonTexture = button:CreateTexture() + buttonTexture:SetAllPoints() + buttonTexture:SetTexture(ALL_QUEST_BUTTON_TEXTURES[name]) + + button.Normal = buttonTexture + button.ButtonName = name + + button:SetScript( "OnClick", AJM.JambaAllQuestButtonOnClick ) + button:SetScript( "OnEnter", AJM.JambaAllQuestButtonOnEnter ) + button:SetScript( "OnLeave", AJM.JambaAllQuestButtonOnLeave ) + button:RegisterForClicks("AnyUp") + button:SetSize( 30, 30 ) + button:ClearAllPoints() + button:SetPoint("BOTTOMRIGHT", JambaMiniQuestLogFrame, "BOTTOMRIGHT", x_coord, 10) end -function AJM:ToggleFrame( frame ) - --AJM:Print( "in toggle frame", frame ) - if frame == WorldMapFrame then - --if frame == QuestLogFrame then - --ToggleQuestLog = function() - if AJM.db.showJambaQuestLogWithWoWQuestLog == true then - --AJM:Print("check qmfiv:", WorldMapFrame:IsVisible() ) - --if WorldMapFrame:IsVisible() then -ebs and QuestLogDetailScrollFrame:IsVisible - if WorldMapFrame:IsVisible() and QuestMapFrame:IsVisible() then - AJM:ToggleShowQuestCommandWindow( true ) - else - AJM:ToggleShowQuestCommandWindow( false ) +function AJM.JambaAllQuestButtonOnEnter (button) + WorldMapTooltip:SetOwner( button, "ANCHOR_TOPLEFT" ) + WorldMapTooltip:SetText( L["JAMBA_QUESTLOG_ALL_MOUSEOVER" .. button.ButtonName], nil, nil, nil, nil, 1 ) +end + +function AJM.JambaAllQuestButtonOnLeave () + WorldMapTooltip:Hide() +end + +function AJM.JambaAllQuestButtonOnClick (button) + StaticPopup_Show( button.ButtonName .. "_confirm" ) +end + +function AJM.QuestMapAll_Jamba_DoAbandonAllQuestsFromAllToons() + AJM:JambaSendCommandToTeam( AJM.COMMAND_ABANDON_ALL_QUESTS) +end + +function AJM.QuestMapAll_Jamba_DoAbandonAllQuestsFromThisToon() + AJM.iterateQuests = 0 + AJM:IterateQuests("QuestMapAll_Jamba_AbandonNextQuest", 0.5) +end + +function AJM.QuestMapAll_Jamba_AbandonNextQuest() + + local title, isHeader, questID = AJM:GetRelevantQuestInfo(AJM.iterateQuests) + + if isHeader == false and questID ~= 0 then + + local canAbandon = CanAbandonQuest(questID) + if canAbandon then + + AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["JAMBA_QUESTLOG_ALL_MESSAGE_AbandonAllButton"]( title ), false ) + AJM:JambaSendCommandToTeam( AJM.COMMAND_ABANDON_QUEST, questID, title) + + if (AJM.iterateQuests ~= GetNumQuestLogEntries()) then + -- decrement quest count as we have removed one if not last quest + AJM.iterateQuests = AJM.iterateQuests - 1 end + else + AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["JAMBA_QUESTLOG_ALL_MESSAGE_CannotAbandonQuest"]( title ), false ) end end + + AJM:IterateQuests("QuestMapAll_Jamba_AbandonNextQuest", 0.5) +end + +function AJM.QuestMapAll_Jamba_DoShareAllQuestsFromAllToons() + AJM:JambaSendCommandToTeam( AJM.COMMAND_SHARE_ALL_QUESTS) +end + +function AJM.QuestMapAll_Jamba_DoShareAllQuestsFromThisToon() + AJM.iterateQuests = 0 + AJM:IterateQuests("QuestMapAll_Jamba_ShareNextQuest", 1) +end + +function AJM.QuestMapAll_Jamba_ShareNextQuest() + + local title, isHeader, questID = AJM:GetRelevantQuestInfo(AJM.iterateQuests) + + if isHeader == false and questID ~= 0 then + AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["JAMBA_QUESTLOG_ALL_MESSAGE_ShareAllButton"]( title ), false ) + QuestMapQuestOptions_ShareQuest(questID) + end + + AJM:IterateQuests("QuestMapAll_Jamba_ShareNextQuest", 1) +end + +function AJM.QuestMapAll_Jamba_DoTrackAllQuestsFromAllToons() + AJM:JambaSendCommandToTeam( AJM.COMMAND_TRACK_ALL_QUESTS) +end + +function AJM.QuestMapAll_Jamba_DoTrackAllQuestsFromThisToon() + AJM.iterateQuests = 0 + AJM:IterateQuests("QuestMapAll_Jamba_TrackNextQuest", 0.5) +end + +function AJM.QuestMapAll_Jamba_TrackNextQuest() + + local title, isHeader, questID = AJM:GetRelevantQuestInfo(AJM.iterateQuests) + + if isHeader == false and questID ~= 0 then + AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["JAMBA_QUESTLOG_ALL_MESSAGE_TrackAllButton"]( title ), false ) + AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_TRACK, questID, title, true ) + end + + AJM:IterateQuests("QuestMapAll_Jamba_TrackNextQuest", 0.5) +end + +function AJM.QuestMapAll_Jamba_DoUnTrackAllQuestsFromThisToon() + AJM.iterateQuests = 0 + AJM:IterateQuests("QuestMapAll_Jamba_UnTrackNextQuest", 0.5) +end + +function AJM.QuestMapAll_Jamba_DoUnTrackAllQuestsFromAllToons() + AJM:JambaSendCommandToTeam( AJM.COMMAND_UNTRACK_ALL_QUESTS) +end + +function AJM.QuestMapAll_Jamba_UnTrackNextQuest() + + local title, isHeader, questID = AJM:GetRelevantQuestInfo(AJM.iterateQuests) + + if isHeader == false and questID ~= 0 then + + AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["JAMBA_QUESTLOG_ALL_MESSAGE_UnTrackAllButton"]( title ), false ) + + AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_TRACK, questID, title, false ) + end + + AJM:IterateQuests("QuestMapAll_Jamba_UnTrackNextQuest", 0.5) +end + +function AJM:IterateQuests(methodToCall, timer) + + AJM.iterateQuests = AJM.iterateQuests + 1 + + if AJM.iterateQuests <= GetNumQuestLogEntries() then + AJM:ScheduleTimer( methodToCall, timer ) + end end --- This sorts out hooking on L or marcioMenu button -function AJM:ToggleQuestLog() +function AJM:GetRelevantQuestInfo(questLogIndex) + + local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( questLogIndex ) + + return title, isHeader, questID +end + +function AJM:ToggleFrame( frame ) + if frame == WorldMapFrame then + AJM:ToggleQuestLog() + end +end + +function AJM:ToggleQuestLog() + + -- This sorts out hooking on L or marcioMenu button if AJM.db.showJambaQuestLogWithWoWQuestLog == true then - --AJM:Print("check qmfiv:", WorldMapFrame:IsVisible() ) if WorldMapFrame:IsVisible() and QuestMapFrame:IsVisible() then - AJM:ToggleShowQuestCommandWindow( true ) + AJM:ToggleShowQuestCommandWindow( true ) else - AJM:ToggleShowQuestCommandWindow( false ) + AJM:ToggleShowQuestCommandWindow( false ) end end end - function AJM:QuestLogFrameHide() if AJM.db.showJambaQuestLogWithWoWQuestLog == true then AJM:ToggleShowQuestCommandWindow( false ) @@ -2182,116 +2163,74 @@ end function AJM:ToggleShowQuestCommandWindow( show ) if show == true then - JambaQuestLogWindowFrame:Show() + JambaMiniQuestLogFrame:Show() else - JambaQuestLogWindowFrame:Hide() + JambaMiniQuestLogFrame:Hide() end end -function AJM:UpdateQuestLog( questIndex ) - if WorldMapFrame:IsVisible() and QuestMapFrame:IsVisible() then - if questIndex then - -- QuestLog_SetSelection( questIndex ) -- Removed by blizzard in 6.0.2 changed to SelectQuestLogEntry - SelectQuestLogEntry( questIndex ) - end - if QuestScrollFrameScrollBar:IsVisible() then - QuestMapFrame_UpdateQuestDetailsButtons() - end - end - if ObjectiveTrackerFrame:IsVisible() then --- TrackerFrame_Update() - QuestObjectiveTracker_UpdatePOIs() - end +function AJM:WORLD_MAP_UPDATE() + JambaHookQuestButtons() end -function AJM:GetQuestLogIndexByName( questName ) - for iterateQuests = 1, GetNumQuestLogEntries() do - local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( iterateQuests ) - if not isHeader then - if title == questName then - return iterateQuests - end - end - end - return 0 +function AJM:ZONE_CHANGED_NEW_AREA() + JambaHookQuestButtons() end -function AJM:SelectQuestLogEntry( questIndex ) - AJM.currentlySelectedQuest = L["(No Quest Selected)"] - if questIndex ~= nil then - local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( questIndex ) - if not isHeader then - if title then - AJM.currentlySelectedQuest = title - if JambaQuestLogWindowFrame:IsVisible() then - if GetQuestLogPushable() and GetNumSubgroupMembers() > 0 then - AJM.jambaQuestLogFrameShareButton:Enable() - else - AJM.jambaQuestLogFrameShareButton:Disable() - end - end - end - end - end -end +function JambaHookQuestButtons() -function AJM:IsCurrentlySelectedQuestValid() - if AJM.currentlySelectedQuest:trim() ~= "" and AJM.currentlySelectedQuest ~= L["(No Quest Selected)"] then - return true - end - return false -end + for k, v in pairs( QuestMapFrame.QuestsFrame.Contents.Titles ) do -function AJM:DoSelectQuestLogEntry( sender, questName, tag ) - if JambaApi.DoesCharacterHaveTag( AJM.characterName, tag ) == true then - local questIndex = AJM:GetQuestLogIndexByName( questName ) - if questIndex ~= 0 then - SelectQuestLogEntry( questIndex ) - AJM:UpdateQuestLog( questIndex ) - else - AJM:JambaSendMessageToTeam( AJM.db.warningArea, L["I do not have the quest: A"]( questName ), false ) - end + if AJM:IsHooked(v, "OnClick") then + AJM:Unhook(v, "OnClick") + end + + AJM:RawHookScript(v, "OnClick", "QuestMapLogTitleButton_OnClick") end end -function AJM:DoQuestTrack( sender, questName, watch, tag ) - if JambaApi.DoesCharacterHaveTag( AJM.characterName, tag ) == true then - local questIndex = AJM:GetQuestLogIndexByName( questName ) - if questIndex ~= 0 then - if watch then - AddQuestWatch( questIndex ) - else - RemoveQuestWatch( questIndex ) - end - AJM:UpdateQuestLog( questIndex ) - else - AJM:JambaSendMessageToTeam( AJM.db.warningArea, L["I do not have the quest: A"]( questName ), false ) - end +function AJM:QuestMapLogTitleButton_OnClick(frame, button) + + if ( button == "RightButton" ) then + + if ( frame.questID ~= JambaQuestMapQuestOptionsDropDown.questID ) then + CloseDropDownMenus(); + end + + JambaQuestMapQuestOptionsDropDown.questID = frame.questID; + ToggleDropDownMenu(1, nil, JambaQuestMapQuestOptionsDropDown, "cursor", 6, -6); + else + self.hooks[frame].OnClick(frame, button) end end -function AJM:DoAbandonQuest( sender, questName, tag ) - if JambaApi.DoesCharacterHaveTag( AJM.characterName, tag ) == true then - local questIndex = AJM:GetQuestLogIndexByName( questName ) - if questIndex ~= 0 then - SelectQuestLogEntry( questIndex ) - SetAbandonQuest() - AbandonQuest() - AJM:UpdateQuestLog( questIndex ) - AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["I have abandoned the quest: A"]( questName ), false ) - else - AJM:JambaSendMessageToTeam( AJM.db.warningArea, L["I do not have the quest: A"]( questName ), false ) - end - end +------------------------------------------------------------------------------------------------------------- +-- ESCORT QUEST +------------------------------------------------------------------------------------------------------------- + +function AJM:QUEST_ACCEPT_CONFIRM( event, senderName, questName ) + AJM:DebugMessage( "QUEST_ACCEPT_CONFIRM" ) + if AJM.db.acceptQuests == true then + if AJM.db.slaveAutoAcceptEscortQuest == true then + AJM:JambaSendMessageToTeam( AJM.db.messageArea, L["Automatically Accepted Escort Quest: A"]( questName ), false ) + AJM.isInternalCommand = true + ConfirmAcceptQuest() + AJM.isInternalCommand = false + StaticPopup_Hide( "QUEST_ACCEPT" ) + end + end end -function AJM:DoAbandonAllQuests( sender, tag ) - --if JambaApi.DoesCharacterHaveTag( AJM.characterName, tag ) == true then - AJM.iterateQuests = 1 - if AJM.iterateQuests <= GetNumQuestLogEntries() then - AJM:ScheduleTimer( "AbandonNextQuest", 1 ) +function AJM:GetQuestLogIndexByName( questName ) + for iterateQuests = 1, GetNumQuestLogEntries() do + local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( iterateQuests ) + if not isHeader then + if title == questName then + return iterateQuests + end end - --end + end + return 0 end function AJM:AutoSelectToggleCommand( info, parameters ) @@ -2338,14 +2277,24 @@ function AJM:JambaOnCommandReceived( characterName, commandName, ... ) AJM:DoAutoSelectToggle( characterName, ... ) end -- Want to action track and abandon command on the same character that sent the command. + if commandName == AJM.COMMAND_QUEST_TRACK then - AJM:DoQuestTrack( characterName, ... ) + AJM:QuestMapQuestOptions_Jamba_DoQuestTrack( characterName, ... ) end if commandName == AJM.COMMAND_ABANDON_QUEST then - AJM:DoAbandonQuest( characterName, ... ) + AJM:QuestMapQuestOptions_Jamba_DoAbandonQuest( characterName, ... ) end if commandName == AJM.COMMAND_ABANDON_ALL_QUESTS then - AJM:DoAbandonAllQuests( characterName, ... ) + AJM:QuestMapAll_Jamba_DoAbandonAllQuestsFromThisToon( ) + end + if commandName == AJM.COMMAND_TRACK_ALL_QUESTS then + AJM:QuestMapAll_Jamba_DoTrackAllQuestsFromThisToon( ) + end + if commandName == AJM.COMMAND_UNTRACK_ALL_QUESTS then + AJM:QuestMapAll_Jamba_DoUnTrackAllQuestsFromThisToon( ) + end + if commandName == AJM.COMMAND_SHARE_ALL_QUESTS then + AJM:QuestMapAll_Jamba_DoShareAllQuestsFromThisToon( ) end -- If this character sent this command, don't action it. if characterName == AJM.characterName then @@ -2378,9 +2327,6 @@ function AJM:JambaOnCommandReceived( characterName, commandName, ... ) if commandName == AJM.COMMAND_CHOOSE_QUEST_REWARD then AJM:DoChooseQuestReward( characterName, ... ) end - if commandName == AJM.COMMAND_SELECT_QUEST_LOG_ENTRY then - AJM:DoSelectQuestLogEntry( characterName, ... ) - end if commandName == AJM.COMMAND_LOG_COMPLETE_QUEST then AJM:DoShowQuestComplete( characterName, ... ) end diff --git a/Jamba-Quest/Locales/JambaQuest-Locale-enUS.lua b/Jamba-Quest/Locales/JambaQuest-Locale-enUS.lua index 7b1791a..b0b607b 100644 --- a/Jamba-Quest/Locales/JambaQuest-Locale-enUS.lua +++ b/Jamba-Quest/Locales/JambaQuest-Locale-enUS.lua @@ -1,5 +1,5 @@ --[[ -Jamba - Jafula's Awesome Multi-Boxer Assistant +Jamba -- Jafula's Awesome Multi-Boxer Assistant Copyright 2008 - 2016 Michael "Jafula" Miller License: The MIT License ]]-- @@ -74,29 +74,9 @@ end L["Automatically Accepted Escort Quest: A"] = function( questName ) return string.format( "Automatically Accepted Escort Quest: %s", questName ) end -L["I do not have the quest: A"] = function( questName ) - return string.format( "I do not have the quest: %s", questName ) -end -L["I have abandoned the quest: A"] = function( questName ) - return string.format( "I have abandoned the quest: %s", questName ) -end -L["Sharing Quest: A"] = function( questName ) - return string.format( "Sharing Quest: %s", questName ) -end -L["Abandon"] = true -L["Select"] = true + L["Jamba-Quest"] = true -L["Share"] = true -L["Track All"] = true -L["Track None"] = true -L["Toggle Track All"] = true -L["Toggle Track"] = true -L["Abandon All"] = true -L["Share All"] = true -L["(No Quest Selected)"] = true -L["You must select a quest from the quest log in order to action it on your other characters."] = true -L['Abandon "%s"?'] = true -L["This will abandon ALL quests ON every toon! Yes, this means you will end up with ZERO quests in your quest log! Are you sure?"] = true + L["Send Message Area"] = true L["Send Warning Area"] = true L["Set The Auto Select Functionality"] = true @@ -108,3 +88,48 @@ L["Hold Shift To Override Auto Select/Auto Complete"] = true L["Toon Auto Selects Best Reward"] = true L["And Claims It As Well"] = true L["The reward information was not loaded from the server. Close the quest window and open it again."] = true + +L["JAMBA_QUESTLOG_CONTEXT_DROPDOWNTEXT_AbandonAllToons"] = "Jamba Abandon On All Toons" +L["JAMBA_QUESTLOG_CONTEXT_DROPDOWNTEXT_TrackAllToons"] = "Jamba Track On All Toons" +L["JAMBA_QUESTLOG_CONTEXT_DROPDOWNTEXT_UnTrackAllToons"] = "Jamba UnTrack On All Toons" + +L["JAMBA_QUESTLOG_CONTEXT_ALERT_AbandonAllToons"] = "Abandon \"%s\" on all toons?" + +L["JAMBA_QUESTLOG_ALL_MOUSEOVER_AbandonAllButton"] = "Jamba Abandon All Quests" +L["JAMBA_QUESTLOG_ALL_MOUSEOVER_ShareAllButton"] = "Jamba Share All Quests" +L["JAMBA_QUESTLOG_ALL_MOUSEOVER_TrackAllButton"] = "Jamba Track All Quests" +L["JAMBA_QUESTLOG_ALL_MOUSEOVER_UnTrackAllButton"] = "Jamba UnTrack All Quests" + +L["JAMBA_QUESTLOG_ALL_ALERT_AbandonAllButton"] = "This will abandon ALL quests ON every toon! Yes, this means you will end up with ZERO quests in your quest log! Are you sure?" +L["JAMBA_QUESTLOG_ALL_ALERT_ShareAllButton"] = "Are you sure you want to share all quests on all toon?" +L["JAMBA_QUESTLOG_ALL_ALERT_TrackAllButton"] = "Are you sure you want to track all quests on all toons?" +L["JAMBA_QUESTLOG_ALL_ALERT_UnTrackAllButton"] = "Are you sure you want to untrack all quests on all toons?" + +L["JAMBA_QUESTLOG_HaveAbandonedQuest"] = function( questName ) + return string.format( "I have abandoned the quest: %s", questName ) +end + +L["JAMBA_QUESTLOG_DoNotHaveQuest"] = function( questName ) + return string.format( "I do not have the quest: %s", questName ) +end + +L["JAMBA_QUESTLOG_ALL_MESSAGE_CannotAbandonQuest"] = function( questName ) + return string.format( "Cannot abandon quest: %s", questName ) +end + +L["JAMBA_QUESTLOG_ALL_MESSAGE_UnTrackAllButton"] = function( questName ) + return string.format( "Untracking quest on all toons: %s", questName ) +end + +L["JAMBA_QUESTLOG_ALL_MESSAGE_TrackAllButton"] = function( questName ) + return string.format( "Tracking quest on all toons: %s", questName ) +end + +L["JAMBA_QUESTLOG_ALL_MESSAGE_AbandonAllButton"] = function( questName ) + return string.format( "Abandoning quest on all toons: %s", questName ) +end + +L["JAMBA_QUESTLOG_ALL_MESSAGE_ShareAllButton"] = function( questName ) + return string.format( "Sharing quest to all toons: %s", questName ) +end + diff --git a/Jamba-QuestWatcher/Jamba-QuestWatcher.toc b/Jamba-QuestWatcher/Jamba-QuestWatcher.toc index 14436ea..f434bbc 100644 --- a/Jamba-QuestWatcher/Jamba-QuestWatcher.toc +++ b/Jamba-QuestWatcher/Jamba-QuestWatcher.toc @@ -1,8 +1,10 @@ -## Interface: 60200 +## Interface: 70000 ## Title: JambaQuestWatcher ## Notes: JambaQuestWatcher ## Author: Ebony, Former Author: Jafula -## Version: 4.2.2 +## Version: 7.0.3-5.0 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba ## Dependencies: Jamba ## SavedVariables: JambaQuestWatcherProfileDB ## LoadOnDemand: 1 diff --git a/Jamba-QuestWatcher/JambaQuestWatcher.lua b/Jamba-QuestWatcher/JambaQuestWatcher.lua index 4c997cc..a2ea30a 100644 --- a/Jamba-QuestWatcher/JambaQuestWatcher.lua +++ b/Jamba-QuestWatcher/JambaQuestWatcher.lua @@ -25,20 +25,22 @@ AJM.settingsDatabaseName = "JambaQuestWatcherProfileDB" AJM.chatCommand = "jamba-quest-watcher" local L = LibStub( "AceLocale-3.0" ):GetLocale( AJM.moduleName ) AJM.parentDisplayName = L["Quest"] -AJM.moduleDisplayName = L["Quest: Watcher"] +AJM.moduleDisplayName = L["Quest: Tracker"] -- Settings - the values to store and their defaults for the settings database. AJM.settings = { profile = { enableQuestWatcher = true, - watcherFramePoint = "CENTER", - watcherFrameRelativePoint = "CENTER", + watcherFramePoint = "RIGHT", + watcherFrameRelativePoint = "RIGHT", watcherFrameXOffset = 0, - watcherFrameYOffset = 0, + watcherFrameYOffset = 150, watcherFrameAlpha = 1.0, watcherFrameScale = 1.0, borderStyle = L["Blizzard Tooltip"], backgroundStyle = L["Blizzard Dialog Background"], + watchFontStyle = L["Arial Narrow"], + watchFontSize = 14, hideQuestWatcherInCombat = false, enableQuestWatcherOnMasterOnly = false, watchFrameBackgroundColourR = 0.0, @@ -50,7 +52,7 @@ AJM.settings = { watchFrameBorderColourB = 0.0, watchFrameBorderColourA = 0.0, watcherListLines = 20, - watcherFrameWidth = 300, + watcherFrameWidth = 340, unlockWatcherFrame = true, hideBlizzardWatchFrame = true, doNotHideCompletedObjectives = true, @@ -162,7 +164,11 @@ function AJM:OnEnable() AJM:RegisterEvent( "QUEST_AUTOCOMPLETE" ) AJM:RegisterEvent( "QUEST_COMPLETE" ) AJM:RegisterEvent( "QUEST_DETAIL" ) - -- Quest post hooks. + AJM:RegisterEvent( "SCENARIO_UPDATE" ) + AJM:RegisterEvent( "SCENARIO_CRITERIA_UPDATE" ) + --AJM:RegisterEvent( "SUPER_TRACKED_QUEST_CHANGED", "QUEST_WATCH_UPDATE" ) + AJM:RegisterEvent( "PLAYER_ENTERING_WORLD" ) + -- Quest post hooks. AJM:SecureHook( "SelectActiveQuest" ) AJM:SecureHook( "GetQuestReward" ) AJM:SecureHook( "AddQuestWatch" ) @@ -235,6 +241,7 @@ function AJM:SettingsCreateQuestWatcherControl( top ) local indentSpecial = indentContinueLabel + 9 local checkBoxThirdWidth = (headingWidth - indentContinueLabel) / 3 local column1Left = left + local column2Left = left + halfWidthSlider local column1LeftIndent = left + indentContinueLabel local column2LeftIndent = column1LeftIndent + checkBoxThirdWidth + horizontalSpacing local column3LeftIndent = column2LeftIndent + checkBoxThirdWidth + horizontalSpacing @@ -248,8 +255,9 @@ function AJM:SettingsCreateQuestWatcherControl( top ) headingWidth, column1Left, movingTop, - L["Enable Team Quest Watcher"], - AJM.SettingsToggleEnableQuestWatcher + L["Enable JoT"], + AJM.SettingsToggleEnableQuestWatcher, + L["Enables Jamba Objective Tracker"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWatcher.checkBoxShowFrame = JambaHelperSettings:CreateCheckBox( @@ -258,7 +266,8 @@ function AJM:SettingsCreateQuestWatcherControl( top ) left, movingTop, L["Show Quest Watcher"], - AJM.SettingsToggleShowFrame + AJM.SettingsToggleShowFrame, + L["Show Quest Watcher"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWatcher.checkBoxUnlockWatcherFrame = JambaHelperSettings:CreateCheckBox( @@ -266,8 +275,9 @@ function AJM:SettingsCreateQuestWatcherControl( top ) headingWidth, left, movingTop, - L["Unlock Quest Watcher Frame (To Move It)"], - AJM.SettingsToggleUnlockWatcherFrame + L["Unlock JoT"], + AJM.SettingsToggleUnlockWatcherFrame, + L["Unlocks Jamba Objective Tracker/nTo Move It/nLock to Click Through"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWatcher.checkBoxHideBlizzardWatchFrame = JambaHelperSettings:CreateCheckBox( @@ -275,8 +285,9 @@ function AJM:SettingsCreateQuestWatcherControl( top ) headingWidth, left, movingTop, - L["Hide Blizzard's Objectives Watch Frame"], - AJM.SettingsToggleHideBlizzardWatchFrame + L["Hide Blizzard's Objectives Tracker"], + AJM.SettingsToggleHideBlizzardWatchFrame, + L["Hides Defualt Objective Tracker"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWatcher.checkBoxEnableQuestWatcherMasterOnly = JambaHelperSettings:CreateCheckBox( @@ -284,8 +295,10 @@ function AJM:SettingsCreateQuestWatcherControl( top ) headingWidth, column1Left, movingTop, - L["Show Team Quest Watcher On Master Only"], - AJM.SettingsToggleEnableQuestWatcherMasterOnly + L["Show JoT On Master Only"], + AJM.SettingsToggleEnableQuestWatcherMasterOnly, + L["Olny show Jamba Objective Tracker On Master Character Olny"] + ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWatcher.displayOptionsCheckBoxHideQuestWatcherInCombat = JambaHelperSettings:CreateCheckBox( @@ -293,8 +306,9 @@ function AJM:SettingsCreateQuestWatcherControl( top ) headingWidth, column1Left, movingTop, - L["Hide Quest Watcher In Combat"], - AJM.SettingsToggleHideQuestWatcherInCombat + L["Hide JoT In Combat"], + AJM.SettingsToggleHideQuestWatcherInCombat, + L["Hide Jamba Objective Tracker in Combat"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWatcher.checkBoxShowCompletedObjectivesAsDone = JambaHelperSettings:CreateCheckBox( @@ -302,8 +316,9 @@ function AJM:SettingsCreateQuestWatcherControl( top ) headingWidth, left, movingTop, - L["Show Completed Objectives As 'DONE'"], - AJM.SettingsShowCompletedObjectivesAsDone + L["Show Completed objective As 'DONE'"], + AJM.SettingsShowCompletedObjectivesAsDone, + L["Show Completed Objectives/Quests As 'DONE'"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWatcher.checkBoxHideQuestIfAllComplete = JambaHelperSettings:CreateCheckBox( @@ -311,8 +326,9 @@ function AJM:SettingsCreateQuestWatcherControl( top ) headingWidth, left, movingTop, - L["Hide Quests Completed By Team"], - AJM.SettingsHideQuestIfAllComplete + L["Hide objectives Completed By Team"], + AJM.SettingsHideQuestIfAllComplete, + L["Hide Objectives/Quests Completed By Team"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWatcher.checkBoxShowDoNotHideCompletedObjectives = JambaHelperSettings:CreateCheckBox( @@ -321,7 +337,8 @@ function AJM:SettingsCreateQuestWatcherControl( top ) left, movingTop, L["Do Not Hide An Individuals Completed Objectives"], - AJM.SettingsDoNotHideCompletedObjectives + AJM.SettingsDoNotHideCompletedObjectives, + L["Do Not Hide An Individuals Completed Objectives"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWatcher.checkBoxSendProgressChatMessages = JambaHelperSettings:CreateCheckBox( @@ -330,7 +347,8 @@ function AJM:SettingsCreateQuestWatcherControl( top ) left, movingTop, L["Send Progress Messages To Message Area"], - AJM.SettingsToggleSendProgressChatMessages + AJM.SettingsToggleSendProgressChatMessages, + L["Send Progress Messages To Message Area/Chat"] ) movingTop = movingTop - checkBoxHeight -- Message area. @@ -339,85 +357,101 @@ function AJM:SettingsCreateQuestWatcherControl( top ) headingWidth, left, movingTop, - L["Send Message Area"] + L["Send Message Area"] ) AJM.settingsControlWatcher.dropdownMessageArea:SetList( JambaApi.MessageAreaList() ) AJM.settingsControlWatcher.dropdownMessageArea:SetCallback( "OnValueChanged", AJM.SettingsSetMessageArea ) movingTop = movingTop - dropdownHeight - movingTop = movingTop - verticalSpacing - movingTop = movingTop - verticalSpacing + JambaHelperSettings:CreateHeading( AJM.settingsControlWatcher, L["Appearance & Layout"], movingTop, true ) + movingTop = movingTop - headingHeight - verticalSpacing + AJM.settingsControlWatcher.displayOptionsQuestWatcherLinesSlider = JambaHelperSettings:CreateSlider( AJM.settingsControlWatcher, - headingWidth, - column1Left, + halfWidthSlider, + left, movingTop, - L["Lines Of Info To Display (Reload UI To See Change)"] + L["Lines Of Info To Display"] ) AJM.settingsControlWatcher.displayOptionsQuestWatcherLinesSlider:SetSliderValues( 5, 50, 1 ) AJM.settingsControlWatcher.displayOptionsQuestWatcherLinesSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeWatchLines ) - movingTop = movingTop - sliderHeight - verticalSpacing AJM.settingsControlWatcher.displayOptionsQuestWatcherFrameWidthSlider = JambaHelperSettings:CreateSlider( AJM.settingsControlWatcher, - headingWidth, - column1Left, + halfWidthSlider, + column2Left, movingTop, - L["Quest Watcher Width (Reload UI To See Change)"] + L["Quest Watcher Width"] ) AJM.settingsControlWatcher.displayOptionsQuestWatcherFrameWidthSlider:SetSliderValues( 250, 600, 5 ) AJM.settingsControlWatcher.displayOptionsQuestWatcherFrameWidthSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeWatchFrameWidth ) movingTop = movingTop - sliderHeight - verticalSpacing AJM.settingsControlWatcher.displayOptionsQuestWatcherMediaBorder = JambaHelperSettings:CreateMediaBorder( AJM.settingsControlWatcher, - headingWidth, - column1Left, + halfWidthSlider, + left, movingTop, L["Border Style"] ) AJM.settingsControlWatcher.displayOptionsQuestWatcherMediaBorder:SetCallback( "OnValueChanged", AJM.SettingsChangeBorderStyle ) - movingTop = movingTop - mediaHeight - verticalSpacing AJM.settingsControlWatcher.questWatchBorderColourPicker = JambaHelperSettings:CreateColourPicker( AJM.settingsControlWatcher, - headingWidth, - column1Left, - movingTop, + halfWidthSlider, + column2Left + 15, + movingTop - 15, L["Border Colour"] ) AJM.settingsControlWatcher.questWatchBorderColourPicker:SetHasAlpha( true ) AJM.settingsControlWatcher.questWatchBorderColourPicker:SetCallback( "OnValueConfirmed", AJM.SettingsQuestWatchBorderColourPickerChanged ) - movingTop = movingTop - checkBoxHeight - verticalSpacing + movingTop = movingTop - mediaHeight - verticalSpacing AJM.settingsControlWatcher.displayOptionsQuestWatcherMediaBackground = JambaHelperSettings:CreateMediaBackground( AJM.settingsControlWatcher, - headingWidth, + halfWidthSlider, column1Left, movingTop, L["Background"] ) AJM.settingsControlWatcher.displayOptionsQuestWatcherMediaBackground:SetCallback( "OnValueChanged", AJM.SettingsChangeBackgroundStyle ) - movingTop = movingTop - mediaHeight - verticalSpacing AJM.settingsControlWatcher.questWatchBackgroundColourPicker = JambaHelperSettings:CreateColourPicker( AJM.settingsControlWatcher, - headingWidth, - column1Left, - movingTop, + halfWidthSlider, + column2Left + 15, + movingTop - 15, L["Background Colour"] ) AJM.settingsControlWatcher.questWatchBackgroundColourPicker:SetHasAlpha( true ) AJM.settingsControlWatcher.questWatchBackgroundColourPicker:SetCallback( "OnValueConfirmed", AJM.SettingsQuestWatchBackgroundColourPickerChanged ) - movingTop = movingTop - checkBoxHeight - verticalSpacing + movingTop = movingTop - mediaHeight - verticalSpacing + AJM.settingsControlWatcher.questWatchMediaFont = JambaHelperSettings:CreateMediaFont( + AJM.settingsControlWatcher, + halfWidthSlider, + left, + movingTop, + L["Font"] + ) + AJM.settingsControlWatcher.questWatchMediaFont:SetCallback( "OnValueChanged", AJM.SettingsChangeFontStyle ) + AJM.settingsControlWatcher.questWatchFontSize = JambaHelperSettings:CreateSlider( + AJM.settingsControlWatcher, + halfWidthSlider, + column2Left, + movingTop, + L["Font Size"] + ) + AJM.settingsControlWatcher.questWatchFontSize:SetSliderValues( 8, 20 , 1 ) + AJM.settingsControlWatcher.questWatchFontSize:SetCallback( "OnValueChanged", AJM.SettingsChangeFontSize ) + movingTop = movingTop - mediaHeight - verticalSpacing AJM.settingsControlWatcher.displayOptionsQuestWatcherScaleSlider = JambaHelperSettings:CreateSlider( AJM.settingsControlWatcher, - headingWidth, + halfWidthSlider, column1Left, movingTop, L["Scale"] ) AJM.settingsControlWatcher.displayOptionsQuestWatcherScaleSlider:SetSliderValues( 0.5, 2, 0.01 ) AJM.settingsControlWatcher.displayOptionsQuestWatcherScaleSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeScale ) - movingTop = movingTop - sliderHeight - verticalSpacing + --movingTop = movingTop - sliderHeight - verticalSpacing AJM.settingsControlWatcher.displayOptionsQuestWatcherTransparencySlider = JambaHelperSettings:CreateSlider( AJM.settingsControlWatcher, - headingWidth, - column1Left, + halfWidthSlider, + column2Left, movingTop, L["Transparency"] ) @@ -498,7 +532,7 @@ function AJM:CreateQuestWatcherFrame() local titleName = frame:CreateFontString( "JambaQuestWatcherWindowFrameTitleText", "OVERLAY", "GameFontNormal" ) titleName:SetPoint( "TOPLEFT", frame, "TOPLEFT", 7, -7 ) titleName:SetTextColor( 1.00, 1.00, 1.00 ) - titleName:SetText( L["Jamba Quest Watcher"] ) + titleName:SetText( L["Jamba Objective Tracker"] ) frame.titleName = titleName -- Update button. local updateButton = CreateFrame( "Button", "JambaQuestWatcherWindowFrameButtonUpdate", frame, "UIPanelButtonGrayTemplate" ) @@ -526,7 +560,7 @@ function AJM:CreateQuestWatcherFrame() list.listTop = topOfList list.listLeft = 2 list.listWidth = AJM.db.watcherFrameWidth - list.rowHeight = 16 + list.rowHeight = 17 list.rowsToDisplay = AJM.db.watcherListLines list.columnsToDisplay = 2 list.columnInformation = {} @@ -558,9 +592,11 @@ function AJM:CreateQuestWatcherFrame() JambaQuestWatcherFrame = frame JambaQuestWatcherFrame.autoQuestPopupsHeight = 0 AJM:SettingsUpdateBorderStyle() + AJM:SettingsUpdateFontStyle() AJM.questWatcherFrameCreated = true end + function AJM:SettingsUpdateBorderStyle() local borderStyle = AJM.SharedMedia:Fetch( "border", AJM.db.borderStyle ) local backgroundStyle = AJM.SharedMedia:Fetch( "background", AJM.db.backgroundStyle ) @@ -575,6 +611,14 @@ function AJM:SettingsUpdateBorderStyle() frame:SetBackdropBorderColor( AJM.db.watchFrameBorderColourR, AJM.db.watchFrameBorderColourG, AJM.db.watchFrameBorderColourB, AJM.db.watchFrameBorderColourA ) end +function AJM:SettingsUpdateFontStyle() + local textFont = AJM.SharedMedia:Fetch( "font", AJM.db.watchFontStyle ) + local textSize = AJM.db.watchFontSize + local frame = JambaQuestWatcherFrame + frame.titleName:SetFont( textFont , textSize , "OUTLINE") +end + + function AJM:UpdateQuestWatcherDimensions() local frame = JambaQuestWatcherFrame frame:SetWidth( frame.questWatchList.listWidth + 4 ) @@ -617,6 +661,10 @@ function AJM:JambaOnSettingsReceived( characterName, settings ) AJM.db.watcherFrameYOffset = settings.watcherFrameYOffset AJM.db.borderStyle = settings.borderStyle AJM.db.backgroundStyle = settings.backgroundStyle + + AJM.db.watchFontStyle = settings.watchFontStyle + AJM.db.watchFontSize = settings.watchFontSize + AJM.db.hideQuestWatcherInCombat = settings.hideQuestWatcherInCombat AJM.db.watcherFrameScale = settings.watcherFrameScale AJM.db.enableQuestWatcherOnMasterOnly = settings.enableQuestWatcherOnMasterOnly @@ -665,6 +713,10 @@ function AJM:SettingsRefresh() AJM.settingsControlWatcher.checkBoxEnableQuestWatcher:SetValue( AJM.db.enableQuestWatcher ) AJM.settingsControlWatcher.displayOptionsQuestWatcherMediaBorder:SetValue( AJM.db.borderStyle ) AJM.settingsControlWatcher.displayOptionsQuestWatcherMediaBackground:SetValue( AJM.db.backgroundStyle ) + + AJM.settingsControlWatcher.questWatchMediaFont:SetValue( AJM.db.watchFontStyle ) + AJM.settingsControlWatcher.questWatchFontSize:SetValue( AJM.db.watchFontSize ) + AJM.settingsControlWatcher.displayOptionsCheckBoxHideQuestWatcherInCombat:SetValue( AJM.db.hideQuestWatcherInCombat ) AJM.settingsControlWatcher.displayOptionsQuestWatcherTransparencySlider:SetValue( AJM.db.watcherFrameAlpha ) AJM.settingsControlWatcher.displayOptionsQuestWatcherScaleSlider:SetValue( AJM.db.watcherFrameScale ) @@ -684,6 +736,9 @@ function AJM:SettingsRefresh() -- Quest watcher state. AJM.settingsControlWatcher.displayOptionsQuestWatcherMediaBorder:SetDisabled( not AJM.db.enableQuestWatcher ) AJM.settingsControlWatcher.displayOptionsQuestWatcherMediaBackground:SetDisabled( not AJM.db.enableQuestWatcher ) + AJM.settingsControlWatcher.questWatchMediaFont:SetDisabled( not AJM.db.enableQuestWatcher ) + AJM.settingsControlWatcher.questWatchFontSize:SetDisabled( not AJM.db.enableQuestWatcher ) + AJM.settingsControlWatcher.displayOptionsCheckBoxHideQuestWatcherInCombat:SetDisabled( not AJM.db.enableQuestWatcher ) AJM.settingsControlWatcher.displayOptionsQuestWatcherTransparencySlider:SetDisabled( not AJM.db.enableQuestWatcher ) AJM.settingsControlWatcher.displayOptionsQuestWatcherScaleSlider:SetDisabled( not AJM.db.enableQuestWatcher ) @@ -702,6 +757,7 @@ function AJM:SettingsRefresh() AJM.settingsControlWatcher.checkBoxSendProgressChatMessages:SetDisabled( not AJM.db.enableQuestWatcher ) if AJM.questWatcherFrameCreated == true then AJM:SettingsUpdateBorderStyle() + AJM:SettingsUpdateFontStyle() AJM:SetQuestWatcherVisibility() end end @@ -725,6 +781,18 @@ function AJM:SettingsChangeBackgroundStyle( event, value ) AJM:SettingsRefresh() end +function AJM:SettingsChangeFontStyle( event, value ) + AJM.db.watchFontStyle = value + AJM:SettingsRefresh() + AJM:JambaQuestWatcherUpdate( false ) +end + +function AJM:SettingsChangeFontSize( event, value ) + AJM.db.watchFontSize = value + AJM:SettingsRefresh() + AJM:JambaQuestWatcherUpdate( false ) +end + function AJM:SettingsToggleHideQuestWatcherInCombat( event, checked ) AJM.db.hideQuestWatcherInCombat = checked AJM:SettingsRefresh() @@ -925,6 +993,28 @@ function AJM:QUEST_LOG_UPDATE( event, ... ) end end + +function AJM:SCENARIO_UPDATE( event, ... ) + if AJM.db.enableQuestWatcher == true then + AJM:JambaQuestWatchListUpdateButtonClicked() + end +end + + +function AJM:SCENARIO_CRITERIA_UPDATE( event, ... ) + if AJM.db.enableQuestWatcher == true then + -- Wait a bit for the correct information to come through from the server... + AJM:ScheduleTimer( "JambaQuestWatcherUpdate", 1, false ) + end +end + +function AJM:PLAYER_ENTERING_WORLD( event, ... ) + if AJM.db.enableQuestWatcher == true then + AJM:JambaQuestWatchListUpdateButtonClicked() + end +end + + function AJM:PLAYER_REGEN_ENABLED( event, ... ) if AJM.db.enableQuestWatcher == false then return @@ -980,6 +1070,9 @@ function AJM:QuestWatchGetObjectiveText( questIndex, objectiveIndex ) return objectiveText end + + + ------------------------------------------------------------------------------------------------------------- -- QUEST WATCH CACHE ------------------------------------------------------------------------------------------------------------- @@ -1124,45 +1217,135 @@ function AJM:JambaQuestWatcherUpdate( useCache ) return end AJM:DebugMessage( "Sending quest watch information...") - -- old wow quests system - for iterateWatchedQuests = 1, GetNumQuestWatches() do - --for iterateQuests = 1, GetNumQuestLogEntries() do - local questIndex = GetQuestIndexForWatch( iterateWatchedQuests ) - --local _, questIndex = GetNumQuestLogEntries() - --local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questIDD, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( iterateWatchedQuests ) - --local questIndex = questIDD - AJM:DebugMessage( "GetQuestIndexForWatch: questIndex: ", questIndex ) - if questIndex ~= nil then - --local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( questIndex ) - local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( questIndex ) - isComplete = AJM:IsCompletedAutoCompleteFieldQuest( questIndex, isComplete ) - local numObjectives = GetNumQuestLeaderBoards( questIndex ) - --local _,_,numObjectives = GetTaskInfo( questIndex ) - AJM:DebugMessage( "NumObjs:", numObjectives ) - for iterateObjectives = 1, numObjectives do - local objectiveFullText, objectiveType, objectiveFinished = GetQuestLogLeaderBoard( iterateObjectives, questIndex ) - --local objectiveFullText, objectiveType, objectiveFinished = GetQuestObjectiveInfo( iterateObjectives, questIndex ) - AJM:DebugMessage( "ObjInfo:", objectiveFullText, objectiveType, objectiveFinished, iterateObjectives, questIndex ) - local amountCompleted, objectiveText = AJM:GetQuestObjectiveCompletion( objectiveFullText ) - AJM:DebugMessage( "SplitObjInfo", amountCompleted, objectiveText ) - if (AJM:QuestCacheUpdate( questID, iterateObjectives, amountCompleted, objectiveFinished ) == true) or (useCache == false) then - --AJM:Print( "UPDATE:", "cache:", useCache, "QuestID", questID, "ObjectID", iterateObjectives ) - AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, title, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete ) - if AJM.db.sendProgressChatMessages == true then - AJM:JambaSendMessageToTeam( AJM.db.messageArea, objectiveText.." "..amountCompleted, false ) - end + -- Scenario information + local isInScenario = C_Scenario.IsInScenario() + if isInScenario == true then + local useCache = false + local scenarioName, currentStage, numStages, flags, _, _, _, xp, money = C_Scenario.GetInfo() + --AJM:Print("scenario", scenarioName, currentStage, numStages) + for StagesIndex = 1, currentStage do + --AJM:Print("Player is on Stage", currentStage) + local stageName, stageDescription, numCriteria, _, _, _, numSpells, spellInfo, weightedProgress = C_Scenario.GetStepInfo() + --AJM:Print("test match", numCriteria) + if numCriteria == 0 then + --AJM:Print("test match 0") + if (weightedProgress) then + --AJM:Print("Checking Progress", weightedProgress) + local questID = 1001 + local criteriaIndex = 0 + local maxProgress = 100 + --Placeholder does not work on borkenshore questlines...... + --local totalQuantity = 100 + local completed = false + local amountCompleted = tostring(weightedProgress).."/"..(maxProgress) + local name = "Scenario:"..stageName.." "..currentStage.."/"..numStages + --AJM:Print("scenarioProgressInfo", questID, name, criteriaIndex, stageDescription , amountCompleted , totalQuantity, completed ) + --if (AJM:QuestCacheUpdate( questID, criteriaIndex, amountCompleted, objectiveFinished ) == true) or (useCache == false) then + AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, name, numCriteria, stageDescription , amountCompleted , totalQuantity, completed ) + --end + else + --AJM:Print("ScenarioDONE", stageDescription) + local questID = 1001 + local criteriaIndex = 1 + local completed = false + local amountCompleted = tostring(0).."/"..(1) + local name = "Scenario:"..stageName.." "..currentStage.."/"..numStages + --AJM:Print("scenarioProgressInfo", questID, name, criteriaIndex, stageDescription , amountCompleted , totalQuantity, completed ) + if (AJM:QuestCacheUpdate( questID, criteriaIndex, amountCompleted, objectiveFinished ) == true) or (useCache == false) then + AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, name, numCriteria, stageDescription , amountCompleted , totalQuantity, completed ) + end + end + + else + for criteriaIndex = 1, numCriteria do + --AJM:Print("Player has", numCriteria, "Criterias", "and is checking", criteriaIndex) + local criteriaString, criteriaType, completed, quantity, totalQuantity, flags, assetID, quantityString, criteriaID, duration, elapsed = C_Scenario.GetCriteriaInfo(criteriaIndex) + --AJM:Print("test", criteriaString, criteriaType, completed, quantity, totalQuantity ) + --Ebony to fix a bug with character trial quest (this might be a blizzard bug) TODO relook at somepoint in beta. + if (criteriaString) then + local questID = 1001 + local amountCompleted = tostring( quantity ).."/"..( totalQuantity ) + --AJM:Print("Stages", numStages) + local name = nil + if (numStages) > 1 then + local textName = "Scenario:"..stageName.." "..currentStage.."/"..numStages + newName = textName + else + local textName = "Scenario:"..stageName + newName = textName + end + local name = newName + if (AJM:QuestCacheUpdate( questID, criteriaIndex, amountCompleted, objectiveFinished ) == true) or (useCache == false) then + --AJM:Print("test", questID, name, criteriaIndex, criteriaString , amountCompleted , completed, completed) + AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, name, criteriaIndex, criteriaString , amountCompleted , completed, completed ) if AJM.db.sendProgressChatMessages == true then + if AJM.db.sendProgressChatMessages == true then + AJM:JambaSendMessageToTeam( AJM.db.messageArea, objectiveText.." "..amountCompleted, false ) + end + end + end + end + end + end + end + -- SCENARIO_BONUS + local tblBonusSteps = C_Scenario.GetBonusSteps() + if #tblBonusSteps > 0 then + --AJM:Print("BonusTest", #tblBonusSteps ) + for i = 1, #tblBonusSteps do + local bonusStepIndex = tblBonusSteps[i] + --AJM:Print("bonusIndex", bonusStepIndex) + local stageName, stageDescription, numCriteria = C_Scenario.GetStepInfo(bonusStepIndex) + --AJM:Print("bonusInfo", numCriteria, stageName, stageDescription) + for criteriaIndex = 1, numCriteria do + --AJM:Print("Player has", numCriteria, "Criterias", "and is checking", criteriaIndex) + local criteriaString, criteriaType, completed, quantity, totalQuantity, flags, assetID, quantityString, criteriaID = C_Scenario.GetCriteriaInfoByStep(bonusStepIndex, criteriaIndex) + local questID = assetID + local amountCompleted = tostring(quantity).."/"..(totalQuantity) + local name = "ScenarioBouns:"..stageName --.." "..currentStage.."/"..numStages + --AJM:Print("scenarioBouns", questID, name, criteriaIndexa, criteriaString , amountCompleted , totalQuantity, completed ) + if (AJM:QuestCacheUpdate( questID, criteriaIndex, amountCompleted, objectiveFinished ) == true) or (useCache == false) then + AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, name, criteriaIndex, criteriaString , amountCompleted , completed, completed ) + if AJM.db.sendProgressChatMessages == true then + AJM:JambaSendMessageToTeam( AJM.db.messageArea, objectiveText.." "..amountCompleted, false ) + end + end end end end end - -- New Bouns Quests! + -- old wow quests system + for iterateWatchedQuests = 1, GetNumQuestWatches() do + --for iterateQuests = 1, GetNumQuestLogEntries() do + local questIndex = GetQuestIndexForWatch( iterateWatchedQuests ) + AJM:DebugMessage( "GetQuestIndexForWatch: questIndex: ", questIndex ) + if questIndex ~= nil then + local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( questIndex ) + isComplete = AJM:IsCompletedAutoCompleteFieldQuest( questIndex, isComplete ) + local numObjectives = GetNumQuestLeaderBoards( questIndex ) + AJM:DebugMessage( "NumObjs:", numObjectives ) + for iterateObjectives = 1, numObjectives do + local objectiveFullText, objectiveType, objectiveFinished = GetQuestLogLeaderBoard( iterateObjectives, questIndex ) + AJM:DebugMessage( "ObjInfo:", objectiveFullText, objectiveType, objectiveFinished, iterateObjectives, questIndex ) + local amountCompleted, objectiveText = AJM:GetQuestObjectiveCompletion( objectiveFullText ) + AJM:DebugMessage( "SplitObjInfo", amountCompleted, objectiveText ) + if (AJM:QuestCacheUpdate( questID, iterateObjectives, amountCompleted, objectiveFinished ) == true) or (useCache == false) then + --AJM:Print( "UPDATE:", questID, title, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete ) + AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, title, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete ) + if AJM.db.sendProgressChatMessages == true then + AJM:JambaSendMessageToTeam( AJM.db.messageArea, objectiveText.." "..amountCompleted, false ) + end + end + end + end + end + -- New Bouns Quests! for iterateWatchedQuests = 1, GetNumQuestLogEntries() do - local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( iterateWatchedQuests ) + local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( iterateWatchedQuests ) --AJM:DebugMessage( "EbonyTest101:", questID) local isInArea, isOnMap, numObjectives = GetTaskInfo(questID); if isInArea and isOnMap then - isComplete = AJM:IsCompletedAutoCompleteFieldQuest( questIndex, isComplete ) - --AJM:Print( "EbonyTestbounsquestID:", questID, numObjectives, isComplete ) + isComplete = AJM:IsCompletedAutoCompleteFieldQuest( questIndex, isComplete ) + --AJM:Print( "EbonyTestbounsquestID:", questID, numObjectives, isComplete ) for iterateObjectives = 1, numObjectives do local objectiveFullText, objectiveType, finished = GetQuestObjectiveInfo( questID, iterateObjectives, isComplete ) --AJM:Print("BonuesQuest", objectiveFullText, objectiveType, finished ) @@ -1175,35 +1358,33 @@ function AJM:JambaQuestWatcherUpdate( useCache ) local amountCompleted = tostring(progress).."/"..(maxProgress) --AJM:Print("BarQuesttext", amountCompleted ) if (AJM:QuestCacheUpdate( questID, iterateObjectives, amountCompleted, objectiveFinished ) == true) or (useCache == false) then - --AJM:Print("QuestPercent", title, objectiveText, amountCompleted ) + --AJM:Print("QuestPercent", title, objectiveText, amountCompleted ) local name = tostring("Bonus:")..(title) - --send command to team - --AJM:Print("BarQuest", questID, title, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete) - AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, name, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete ) - if AJM.db.sendProgressChatMessages == true then - AJM:JambaSendMessageToTeam( AJM.db.messageArea, objectiveText.." "..amountCompleted, false ) - end - end - + --send command to team + --AJM:Print("BarQuest", questID, title, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete) AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, name, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete ) + AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, name, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete ) + if AJM.db.sendProgressChatMessages == true then + AJM:JambaSendMessageToTeam( AJM.db.messageArea, objectiveText.." "..amountCompleted, false ) + end + end -- for other bouns quests EG one time world pop up quests that don't have a npc. else local amountCompleted, objectiveText = AJM:GetQuestObjectiveCompletion( objectiveFullText ) - if (AJM:QuestCacheUpdate( questID, iterateObjectives, amountCompleted, objectiveFinished ) == true) or (useCache == false) then - --AJM:Print("BonusQuest", amountCompleted, objectiveText ) - --AJM:Print( "UPDATE:", "cache:", useCache, "QuestID", questID, "ObjectID", iterateObjectives ) - --AJM:Print("sendingquestdata", objectiveText, amountCompleted, finished ) - local name = gsub(title, "[^|]+:", "Bonus:") - -- send command to team - AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, name, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete ) - if AJM.db.sendProgressChatMessages == true then - AJM:JambaSendMessageToTeam( AJM.db.messageArea, objectiveText.." "..amountCompleted, false ) - end - end + if (AJM:QuestCacheUpdate( questID, iterateObjectives, amountCompleted, objectiveFinished ) == true) or (useCache == false) then + --AJM:Print("BonusQuest", amountCompleted, objectiveText ) + --AJM:Print( "UPDATE:", "cache:", useCache, "QuestID", questID, "ObjectID", iterateObjectives ) + --AJM:Print("sendingquestdata", objectiveText, amountCompleted, finished ) + local name = gsub(title, "[^|]+:", "Bonus:") + -- send command to team + AJM:JambaSendCommandToTeam( AJM.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, name, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete ) + if AJM.db.sendProgressChatMessages == true then + AJM:JambaSendMessageToTeam( AJM.db.messageArea, objectiveText.." "..amountCompleted, false ) + end + end end end end end - end -- Gathers messages from team. @@ -1212,13 +1393,14 @@ function AJM:DoQuestWatchObjectiveUpdate( characterName, questID, questName, obj end function AJM:UpdateQuestWatchList( questID, questName, objectiveIndex, objectiveText, characterName, amountCompleted, objectiveFinished, isComplete ) - AJM:DebugMessage( "UpdateQuestWatchList", questID, questName, objectiveIndex, objectiveText, characterName, amountCompleted, objectiveFinished, isComplete ) + --local characterName = (( Ambiguate( name, "none" ) )) + AJM:DebugMessage( "UpdateQuestWatchList", questID, questName, objectiveIndex, objectiveText, characterName, amountCompleted, objectiveFinished, isComplete ) local questHeaderPosition = AJM:GetQuestHeaderInWatchList( questID, questName, characterName ) local objectiveHeaderPosition = AJM:GetObjectiveHeaderInWatchList( questID, questName, objectiveIndex, objectiveText, "", questHeaderPosition ) local characterPosition = AJM:GetCharacterInWatchList( questID, objectiveIndex, characterName, amountCompleted, objectiveHeaderPosition, objectiveFinished ) local totalAmountCompleted = AJM:GetTotalCharacterAmountFromWatchList( questID, objectiveIndex ) - objectiveHeaderPosition = AJM:GetObjectiveHeaderInWatchList( questID, questName, objectiveIndex, objectiveText, totalAmountCompleted, questHeaderPosition ) --AJM:Print("QuestPosition", objectiveHeaderPosition, questHeaderPosition ) + objectiveHeaderPosition = AJM:GetObjectiveHeaderInWatchList( questID, questName, objectiveIndex, objectiveText, totalAmountCompleted, questHeaderPosition ) -- isComplete piggybacks on the quest watch update, so we are always displaying a complete quest button (in case the QUEST_AUTOCOMPLETE event does not fire). if isComplete == true then AJM:DoAutoQuestFieldComplete( characterName, questID ) @@ -1397,6 +1579,7 @@ function AJM:GetCharacterInWatchList( questID, objectiveIndex, characterName, am end function AJM:GetObjectiveHeaderInWatchList( questID, questName, objectiveIndex, objectiveText, totalAmountCompleted, questHeaderPosition ) + --AJM:Print("testposition", questName, "oT", objectiveText, questHeaderPosition) if strtrim( objectiveText ) == "" then objectiveText = questName end @@ -1417,7 +1600,7 @@ function AJM:GetObjectiveHeaderInWatchList( questID, questName, objectiveIndex, -- Hide the team list by default. questWatchInfo.childrenAreHidden = true AJM:InsertQuestWatchInfoToListAfterPosition( questWatchInfo, questHeaderPosition ) - return questHeaderPosition + 1 + return questHeaderPosition + 1 end function AJM:GetQuestHeaderInWatchList( questID, questName, characterName ) @@ -1426,13 +1609,16 @@ function AJM:GetQuestHeaderInWatchList( questID, questName, characterName ) local position = questWatchInfoContainer.position if questWatchInfo.questID == questID and questWatchInfo.type == "QUEST_HEADER" then AJM:UpdateTeamQuestCountAddCharacter( questWatchInfo, characterName ) + if AJM.db.hideQuestIfAllComplete == true then AJM:CheckQuestForAllObjectivesCompleteAndHide( questID ) end return position end end - local questWatchInfo = AJM:CreateQuestWatchInfo( questID, "QUEST_HEADER", -1, "", questName, L["<Map>"] ) + local iconTexture = ("Interface\\ICONS\\INV_Misc_Map07") + local icon = strconcat(" |T"..iconTexture..":18|t") + local questWatchInfo = AJM:CreateQuestWatchInfo( questID, "QUEST_HEADER", -1, "", questName, icon ) --L["<Map>"] ) AJM:UpdateTeamQuestCountAddCharacter( questWatchInfo, characterName ) if AJM.db.hideQuestIfAllComplete == true then AJM:CheckQuestForAllObjectivesCompleteAndHide( questID ) @@ -1450,9 +1636,10 @@ function AJM:UpdateTeamQuestCount( questWatchInfo, characterName ) questWatchInfo.questTeamCount = count end -function AJM:UpdateTeamQuestCountAddCharacter( questWatchInfo, characterName ) - questWatchInfo.teamCharacters[characterName] = true - AJM:UpdateTeamQuestCount( questWatchInfo, characterName ) +function AJM:UpdateTeamQuestCountAddCharacter( questWatchInfo, name ) + + questWatchInfo.teamCharacters[name] = true + AJM:UpdateTeamQuestCount( questWatchInfo, name ) end function AJM:UpdateTeamQuestCountRemoveCharacter( questWatchInfo, characterName ) @@ -1597,9 +1784,9 @@ end function AJM:CountLinesInQuestWatchList() if AJM.questWatchObjectivesList == nil then - return 0 + return 1 end - local count = 0 + local count = 1 for key, questWatchInfoContainer in pairs( AJM.questWatchObjectivesList ) do count = count + 1 end @@ -1614,6 +1801,8 @@ function AJM:QuestWatcherQuestListDrawLine( frame, iterateDisplayRows, type, inf local toggleDisplay = "" local padding = "" local teamCount = "" + local textFont = AJM.SharedMedia:Fetch( "font", AJM.db.watchFontStyle ) + local textSize = AJM.db.watchFontSize if type == "CHARACTER_AMOUNT" then padding = " " end @@ -1628,31 +1817,81 @@ function AJM:QuestWatcherQuestListDrawLine( frame, iterateDisplayRows, type, inf if type == "QUEST_HEADER" then if questTeamCount ~= 0 then --teamCount = " ("..questTeamCount.."/"..JambaApi.GetTeamListMaximumOrder()..") " - --Ebony Only Shows online character info + --Ebony Only Show online character info teamCount = " ("..questTeamCount.."/"..JambaApi.GetTeamListMaximumOrderOnline()..") " end end - frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetText( padding..toggleDisplay..teamCount..information ) - frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetText( amount ) - -- Turn off the mouse for these buttons. - frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( false ) - frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( false ) + local matchDataScenario = string.find( information, "Scenario:" ) + local matchDataScenarioBouns = string.find( information, "ScenarioBouns:" ) + -- Scenario + if matchDataScenario then + local name = gsub(information, "[^|]+:", "") + frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetText( padding..toggleDisplay..name ) + frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetText( amount ) + frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetFont( textFont , textSize , "OUTLINE") + frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetFont( textFont , textSize , "OUTLINE") + + -- Turn off the mouse for these buttons. + frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( false ) + frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( false ) + -- Scenario Bouns + elseif matchDataScenarioBouns then + local name = gsub(information, "[^|]+:", "") + frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetText( padding..toggleDisplay..name ) + frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetText( amount ) + frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetFont( textFont , textSize , "OUTLINE") + frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetFont( textFont , textSize , "OUTLINE") + -- Turn off the mouse for these buttons. + frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( false ) + frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( false ) + else + frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetText( padding..toggleDisplay..teamCount..information ) + frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetText( amount ) + frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetFont( textFont , textSize , "OUTLINE") + frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetFont( textFont , textSize , "OUTLINE") + -- Turn off the mouse for these buttons. + frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( false ) + frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( false ) + end --AJM:Print("test2343", type, information ) if type == "QUEST_HEADER" then local matchData = string.find( information, "Bonus:" ) - if matchData then - --AJM:Print("Match", information) - frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0, 0, 1.0 ) - frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0, 0, 1.0 ) - -- Turn on the mouse for these buttons. - frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( true ) - frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( true ) - else - frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 ) - frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 ) - -- Turn on the mouse for these buttons. - frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( true ) - frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( true ) + local matchDataScenario = string.find( information, "Scenario:" ) + local matchDataScenarioBouns = string.find( information, "ScenarioBouns:" ) + if matchData then + -- Bonus Quests + --AJM:Print("Match", information) + frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0, 0, 1.0 ) + frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0, 0, 1.0 ) + -- Turn on the mouse for these buttons. + frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( true ) + frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( true ) + -- Scenario Text + + --AJM:Print("Match", information) + elseif matchDataScenario then + + frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0, 1.0, 1.0 ) + frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0, 1.0, 1.0 ) + -- Turn on the mouse for these buttons. + frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( true ) + frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( true ) + --frame.questWatchList.rowHeight = 60 + + elseif matchDataScenarioBouns then + + frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 0, 0.30, 1.0, 1.0 ) + frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 0, 0.30, 1.0, 1.0 ) + -- Turn on the mouse for these buttons. + frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( true ) + frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( true ) + + else + frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 ) + frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 ) + -- Turn on the mouse for these buttons. + frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( true ) + frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( true ) end end if type == "OBJECTIVE_HEADER" then @@ -1862,7 +2101,8 @@ function AJM:DisplayAutoQuestPopUps() local characterName, characterPopUpType, popUpType local characterList = "" for characterName, characterPopUpType in pairs( characterInfo ) do - characterList = characterList..characterName.." " + --characterList = characterList..characterName.." " + characterList = characterList..( Ambiguate( characterName, "none" ) ).." " -- TODO - hack, assuming all characters have the same sort of popup. popUpType = characterPopUpType end @@ -1892,6 +2132,7 @@ function AJM:DisplayAutoQuestPopUps() AJM:JambaRemoveAllAutoQuestPopUps( questID ) AJM:DisplayAutoQuestPopUps() AJM:SettingsUpdateBorderStyle() + AJM:SettingsUpdateFontStyle() end ) elseif popUpType == "OFFER" then frame.TopText:SetText( QUEST_WATCH_POPUP_QUEST_DISCOVERED ) @@ -1903,6 +2144,7 @@ function AJM:DisplayAutoQuestPopUps() AJM:JambaRemoveAllAutoQuestPopUps( questID ) AJM:DisplayAutoQuestPopUps() AJM:SettingsUpdateBorderStyle() + AJM:SettingsUpdateFontStyle() end ) end frame:ClearAllPoints() @@ -1984,3 +2226,6 @@ function AJM:JambaOnCommandReceived( characterName, commandName, ... ) AJM:DoAutoQuestFieldOffer( characterName, ... ) end end + + +JambaApi.ClearAllQuests = ClearAllQuests \ No newline at end of file diff --git a/Jamba-QuestWatcher/Locales/JambaQuestWatcher-Locale-enUS.lua b/Jamba-QuestWatcher/Locales/JambaQuestWatcher-Locale-enUS.lua index a5f8256..fb9b25b 100644 --- a/Jamba-QuestWatcher/Locales/JambaQuestWatcher-Locale-enUS.lua +++ b/Jamba-QuestWatcher/Locales/JambaQuestWatcher-Locale-enUS.lua @@ -8,6 +8,7 @@ local L = LibStub("AceLocale-3.0"):NewLocale( "Jamba-QuestWatcher", "enUS", true L["Slash Commands"] = true L["Quest"] = true L["Quest: Watcher"] = true +L["Quest: Tracker"] = true L["Quest Watcher"] = true L["Push Settings"] = true L["Push the quest settings to all characters in the team."] = true @@ -19,27 +20,45 @@ L["Update"] = true L["Border Colour"] = true L["Background Colour"] = true L["<Map>"] = true +L["Lines Of Info To Display"] = true +L["Lines Of Info To Display (Reload UI To See Change)"] = true +L["Quest Watcher Width"] = true L["Lines Of Info To Display (Reload UI To See Change)"] = true -L["Quest Watcher Width (Reload UI To See Change)"] = true L["DONE"] = true -L["Unlock Quest Watcher Frame (To Move It)"] = true -L["Hide Blizzard's Objectives Watch Frame"] = true -L["Show Completed Objectives As 'DONE'"] = true -L["Do Not Hide An Individuals Completed Objectives"] = true -L["Hide Quests Completed By Team"] = true -L["Enable Team Quest Watcher"] = true -L["Jamba Quest Watcher"] = true L["Blizzard Tooltip"] = true L["Blizzard Dialog Background"] = true -L["Hide Quest Watcher In Combat"] = true -L["Show Team Quest Watcher On Master Only"] = true +L["Arial Narrow"] = true +L["Font"] = true +L["Font Size"] = true L["Border Style"] = true L["Transparency"] = true L["Scale"] = true L["Background"] = true +L["Appearance & Layout"] = true L["Show Quest Watcher"] = true L["Show the quest watcher window."] = true L["Hide Quest Watcher"] = true L["Hide the quest watcher window."] = true L["Send Message Area"] = true -L["Send Progress Messages To Message Area"] = true \ No newline at end of file +L["Send Progress Messages To Message Area"] = true + +--New Help system and changes. + +L["Jamba Objective Tracker"] = true +L["Send Progress Messages To Message Area/Chat"] = true +L["Do Not Hide An Individuals Completed Objectives"] = true +L["Hide Objectives/Quests Completed By Team"] = true +L["Hide objectives Completed By Team"] = true +L["Show Completed objective As 'DONE'"] = true +L["Show Completed Objectives/Quests As 'DONE'"] = true +L["Hide JoT In Combat"] = true +L["Hide Jamba Objective Tracker in Combat"] = true +L["Olny shows Jamba Objective Tracker On Master Character Olny"] = true +L["Show JoT On Master Only"] = true +L["Hide Blizzard's Objectives Tracker"] = true +L["Hides Defualt Objective Tracker"] = true +L["Unlock JoT"] = true +L["Unlocks Jamba Objective Tracker/nTo Move It/nLock to Click Through"] = true +L["Enable JoT"] = true +L["Enables Jamba Objective Tracker"] = true +L["Olny show Jamba Objective Tracker On Master Character Olny"] = true diff --git a/Jamba-Sell/Jamba-Sell.toc b/Jamba-Sell/Jamba-Sell.toc index e76e9c5..aebca63 100644 --- a/Jamba-Sell/Jamba-Sell.toc +++ b/Jamba-Sell/Jamba-Sell.toc @@ -1,8 +1,10 @@ -## Interface: 60200 +## Interface: 70000 ## Title: JambaSell ## Notes: JambaSell ## Author: Ebony, Former Author: Jafula -## Version: 4.2.2 +## Version: 7.0.3-5.0 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba ## Dependencies: Jamba ## SavedVariables: JambaSellProfileDB ## LoadOnDemand: 1 diff --git a/Jamba-Sell/JambaSell.lua b/Jamba-Sell/JambaSell.lua index d71133b..451ca39 100644 --- a/Jamba-Sell/JambaSell.lua +++ b/Jamba-Sell/JambaSell.lua @@ -473,7 +473,7 @@ function AJM:SettingsGreysScrollRefresh() AJM.settingsControlGreys.greys.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) AJM.settingsControlGreys.greys.rows[iterateDisplayRows].columns[2].textString:SetText( "" ) AJM.settingsControlGreys.greys.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControlGreys.greys.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + AJM.settingsControlGreys.greys.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + AJM.settingsControlGreys.greysOffset if dataRowNumber <= AJM:GetGreysMaxPosition() then @@ -483,7 +483,7 @@ function AJM:SettingsGreysScrollRefresh() AJM.settingsControlGreys.greys.rows[iterateDisplayRows].columns[2].textString:SetText( greysInformation.tag ) -- Highlight the selected row. if dataRowNumber == AJM.settingsControlGreys.greysHighlightRow then - AJM.settingsControlGreys.greys.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + AJM.settingsControlGreys.greys.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) end end end @@ -510,7 +510,7 @@ function AJM:SettingsOthersScrollRefresh() AJM.settingsControlOthers.others.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) AJM.settingsControlOthers.others.rows[iterateDisplayRows].columns[2].textString:SetText( "" ) AJM.settingsControlOthers.others.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControlOthers.others.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + AJM.settingsControlOthers.others.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + AJM.settingsControlOthers.othersOffset if dataRowNumber <= AJM:GetOthersMaxPosition() then @@ -520,7 +520,7 @@ function AJM:SettingsOthersScrollRefresh() AJM.settingsControlOthers.others.rows[iterateDisplayRows].columns[2].textString:SetText( othersInformation.tag ) -- Highlight the selected row. if dataRowNumber == AJM.settingsControlOthers.othersHighlightRow then - AJM.settingsControlOthers.others.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + AJM.settingsControlOthers.others.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) end end end diff --git a/Jamba-Talk/Jamba-Talk.toc b/Jamba-Talk/Jamba-Talk.toc index 2b65345..0df5750 100644 --- a/Jamba-Talk/Jamba-Talk.toc +++ b/Jamba-Talk/Jamba-Talk.toc @@ -1,8 +1,10 @@ -## Interface: 60200 +## Interface: 70000 ## Title: JambaTalk ## Notes: JambaTalk ## Author: Ebony, Former Author: Jafula -## Version: 4.2.2 +## Version: 7.0.3-5.0 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba ## Dependencies: Jamba ## SavedVariables: JambaTalkProfileDB ## LoadOnDemand: 1 diff --git a/Jamba-Talk/JambaTalk.lua b/Jamba-Talk/JambaTalk.lua index d576a3f..f2914db 100644 --- a/Jamba-Talk/JambaTalk.lua +++ b/Jamba-Talk/JambaTalk.lua @@ -343,7 +343,7 @@ function AJM:SettingsScrollRefresh() AJM.settingsControl.list.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) AJM.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetText( "" ) AJM.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControl.list.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + AJM.settingsControl.list.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + AJM.settingsControl.offset if dataRowNumber <= AJM:GetItemsMaxPosition() then @@ -353,7 +353,7 @@ function AJM:SettingsScrollRefresh() AJM.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetText( itemInformation.snippet ) -- Highlight the selected row. if dataRowNumber == AJM.settingsControl.highlightRow then - AJM.settingsControl.list.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + AJM.settingsControl.list.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) end end end diff --git a/Jamba-Talk/Locales/JambaTalk-Locale-enUS.lua b/Jamba-Talk/Locales/JambaTalk-Locale-enUS.lua index 677cf2e..ac47052 100644 --- a/Jamba-Talk/Locales/JambaTalk-Locale-enUS.lua +++ b/Jamba-Talk/Locales/JambaTalk-Locale-enUS.lua @@ -37,4 +37,4 @@ L[" (via "] = true L[")"] = true L["Update"] = true L["whispered you."] = true -L["Do Not Forward RealID Whispers"]= true \ No newline at end of file +L["Do Not Forward RealID Whispers"] = true diff --git a/Jamba-Target/Jamba-Target.toc b/Jamba-Target/Jamba-Target.toc index b483447..ba5458a 100644 --- a/Jamba-Target/Jamba-Target.toc +++ b/Jamba-Target/Jamba-Target.toc @@ -1,8 +1,10 @@ -## Interface: 60200 +## Interface: 70000 ## Title: JambaTarget ## Notes: JambaTarget ## Author: Ebony, Former Author: Jafula -## Version: 4.2.2 +## Version: 7.0.3-5.0 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba ## Dependencies: Jamba ## SavedVariables: JambaTargetProfileDB ## LoadOnDemand: 1 diff --git a/Jamba-Taxi/Jamba-Taxi.toc b/Jamba-Taxi/Jamba-Taxi.toc index 48b30e4..90088d1 100644 --- a/Jamba-Taxi/Jamba-Taxi.toc +++ b/Jamba-Taxi/Jamba-Taxi.toc @@ -1,9 +1,10 @@ -## Interface: 60200 +## Interface: 70000 ## Title: Jamba-Taxi ## Notes: Jamba-Taxi ## Author: Ebony, Former Author: Jafula -## Version: 4.2.2 - +## Version: 7.0.3-5.0 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba ## Dependencies: Jamba ## SavedVariables: JambaTaxiProfileDB ## LoadOnDemand: 1 diff --git a/Jamba-Taxi/JambaTaxi.lua b/Jamba-Taxi/JambaTaxi.lua index 9f58e82..f687e3b 100644 --- a/Jamba-Taxi/JambaTaxi.lua +++ b/Jamba-Taxi/JambaTaxi.lua @@ -291,8 +291,15 @@ function AJM:JambaOnCommandReceived( characterName, commandName, ... ) -- If not already on a taxi... if not UnitOnTaxi( "player" ) then -- And if the taxi frame is open... - if TaxiFrame:IsVisible() then - TakeTaxi( characterName, ... ) + -- 7.0.3 Added support for FlightMapFrame for legion flightMastrers. --ebony + if TaxiFrame_ShouldShowOldStyle() == true then + if TaxiFrame:IsVisible() then + TakeTaxi( characterName, ... ) + end + else + if FlightMapFrame:IsVisible() then + TakeTaxi( characterName, ... ) + end end end end diff --git a/Jamba-Toon/Jamba-Toon.toc b/Jamba-Toon/Jamba-Toon.toc index 9b40b29..1639862 100644 --- a/Jamba-Toon/Jamba-Toon.toc +++ b/Jamba-Toon/Jamba-Toon.toc @@ -1,8 +1,10 @@ -## Interface: 60200 +## Interface: 70000 ## Title: JambaToon ## Notes: JambaToon ## Author: Ebony, Former Author: Jafula -## Version: 4.2.2 +## Version: 7.0.3-5.0 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba ## Dependencies: Jamba ## SavedVariables: JambaToonProfileDB ## LoadOnDemand: 1 diff --git a/Jamba-Toon/JambaToon.lua b/Jamba-Toon/JambaToon.lua index dcd99b8..a59b322 100644 --- a/Jamba-Toon/JambaToon.lua +++ b/Jamba-Toon/JambaToon.lua @@ -27,34 +27,8 @@ local L = LibStub( "AceLocale-3.0" ):GetLocale( AJM.moduleName ) AJM.parentDisplayName = L["Toon"] AJM.parentDisplayNameToon = L["Toon"] AJM.parentDisplayNameMerchant = L["Merchant"] -AJM.parentDisplayNameCurrency = L["Toon"] AJM.moduleDisplayName = L["Toon: Warnings"] --- Currency Identifiers. -AJM.CDalaranJewelcraftingToken = 61 -AJM.CValor = 1191 -AJM.CChampionsSeal = 241 -AJM.CIllustriousJewelcraftersToken = 361 -AJM.CConquestPoints = 390 -AJM.CTolBaradCommendation = 391 -AJM.CHonorPoints = 392 -AJM.CIronpawToken = 402 -AJM.CLesserCharmOfGoodFortune = 738 -AJM.CElderCharmOfGoodFortune = 697 -AJM.CMoguRuneOfFate = 752 -AJM.CWarforgedSeal = 776 -AJM.CBloodyCoin = 789 -AJM.CTimelessCoin = 777 ---ebony New WoD Currency -AJM.CGarrisonResources = 824 -AJM.CTemperedFate = 994 -AJM.CApexisCrystal = 823 -AJM.CDarkmoon = 515 -AJM.C = 824 -AJM.COil = 1101 -AJM.CInevitableFate = 1129 -AJM.CTimeWalker = 1166 -AJM.globalCurrencyFramePrefix = "JambaToonCurrencyListFrame" -- Settings - the values to store and their defaults for the settings database. AJM.settings = { @@ -77,6 +51,7 @@ AJM.settings = { CcMessage = L["I Am"], warningArea = JambaApi.DefaultWarningArea(), autoAcceptResurrectRequest = true, + acceptDeathRequests = true, autoDenyDuels = true, autoAcceptSummonRequest = false, autoDenyGuildInvites = false, @@ -86,53 +61,6 @@ AJM.settings = { merchantArea = JambaApi.DefaultMessageArea(), warnAfk = true, afkMessage = L["I am inactive!"], - currGold = true, - currGoldInGuildBank = false, - currHonorPoints = true, - currConquestPoints = true, - --as there not used much now changed to false ebony - currTolBaradCommendation = false, - currChampionsSeal = false, - currIllustriousJewelcraftersToken = false, - currDalaranJewelcraftingToken = false, - currIronpawToken = false, - currValor = false, - currLesserCharmOfGoodFortune = false, - currElderCharmOfGoodFortune = false, - currMoguRuneOfFate = false, - currWarforgedSeal = false, - currBloodyCoin = false, - currTimelessCoin = false, - --ebony New WoD Currency - currGarrisonResources = true, - currTemperedFate = false, - currApexisCrystal = false, - currDarkmoon = false, - currInevitableFate = false, - currOil = false, - currTimeWalker = false, - 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"], - currencyScale = 1, - currencyNameWidth = 50, - currencyPointsWidth = 40, - currencyGoldWidth = 90, - currencySpacingWidth = 3, - currencyLockWindow = false, - currOpenStartUpMaster = false, }, } @@ -143,23 +71,7 @@ function AJM:GetConfiguration() handler = AJM, type = 'group', args = { - currency = { - type = "input", - name = L["Show Currency"], - desc = L["Show the current toon the currency values for all members in the team."], - usage = "/jamba-toon currency", - get = false, - set = "JambaToonRequestCurrency", - }, - currencyhide = { - type = "input", - name = L["Hide Currency"], - desc = L["Hide the currency values for all members in the team."], - usage = "/jamba-toon currencyhide", - get = false, - set = "JambaToonHideCurrency", - }, - push = { + push = { type = "input", name = L["Push Settings"], desc = L["Push the toon settings to all characters in the team."], @@ -180,8 +92,10 @@ end -- Command this module sends. ------------------------------------------------------------------------------------------------------------- -AJM.COMMAND_REQUEST_CURRENCY = "SendCurrency" -AJM.COMMAND_HERE_IS_CURRENCY = "HereIsCurrency" +AJM.COMMAND_TEAM_DEATH = "JambaToonTeamDeath" +AJM.COMMAND_RECOVER_TEAM = "JambaToonRecoverTeam" +AJM.COMMAND_SOUL_STONE = "JambaToonSoulStone" + ------------------------------------------------------------------------------------------------------------- -- Messages module sends. @@ -220,7 +134,8 @@ local function SettingsCreateMerchant( top ) left, movingTop, L["Auto Repair"], - AJM.SettingsToggleAutoRepair + AJM.SettingsToggleAutoRepair, + L["Auto Repairs Toons Items When You Visit a Repair Merchant"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlMerchant.checkBoxAutoRepairUseGuildFunds = JambaHelperSettings:CreateCheckBox( @@ -229,7 +144,8 @@ local function SettingsCreateMerchant( top ) left, movingTop, L["Auto Repair With Guild Funds"], - AJM.SettingsToggleAutoRepairUseGuildFunds + AJM.SettingsToggleAutoRepairUseGuildFunds, + L["Trys to Auto Repair With Guild Bank Funds"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlMerchant.dropdownMerchantArea = JambaHelperSettings:CreateDropdown( @@ -237,7 +153,8 @@ local function SettingsCreateMerchant( top ) headingWidth, left, movingTop, - L["Send Request Message Area"] + L["Send Request Message Area"], + L["Pick a Message Area"] ) AJM.settingsControlMerchant.dropdownMerchantArea:SetList( JambaApi.MessageAreaList() ) AJM.settingsControlMerchant.dropdownMerchantArea:SetCallback( "OnValueChanged", AJM.SettingsSetMerchantArea ) @@ -280,7 +197,8 @@ local function SettingsCreateRequests( top ) left, movingTop, L["Auto Deny Duels"], - AJM.SettingsToggleAutoDenyDuels + AJM.SettingsToggleAutoDenyDuels, + L["Automatically Deny Duels From Players"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlRequests.checkBoxAutoDenyGuildInvites = JambaHelperSettings:CreateCheckBox( @@ -289,7 +207,8 @@ local function SettingsCreateRequests( top ) left, movingTop, L["Auto Deny Guild Invites"], - AJM.SettingsToggleAutoDenyGuildInvites + AJM.SettingsToggleAutoDenyGuildInvites, + L["Automatically Deny All Guild Invites"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlRequests.checkBoxAutoAcceptResurrectRequest = JambaHelperSettings:CreateCheckBox( @@ -298,16 +217,29 @@ local function SettingsCreateRequests( top ) left, movingTop, L["Auto Accept Resurrect Request"], - AJM.SettingsToggleAutoAcceptResurrectRequests + AJM.SettingsToggleAutoAcceptResurrectRequests, + L["Automatically Accept Resurrect Request"] ) movingTop = movingTop - checkBoxHeight + AJM.settingsControlRequests.checkBoxAcceptDeathRequests = JambaHelperSettings:CreateCheckBox( + AJM.settingsControlRequests, + headingWidth, + left, + movingTop, + L["Display Team Release Prompts"], + AJM.SettingsToggleAcceptDeathRequests, + L["Display Team Release Popup Displays when the Team Dies"] + ) + + movingTop = movingTop - checkBoxHeight AJM.settingsControlRequests.checkBoxAutoAcceptSummonRequest = JambaHelperSettings:CreateCheckBox( AJM.settingsControlRequests, headingWidth, left, movingTop, L["Auto Accept Summon Request"], - AJM.SettingsToggleAutoAcceptSummonRequest + AJM.SettingsToggleAutoAcceptSummonRequest, + L["Automatically Accept Summon Requests"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlRequests.dropdownRequestArea = JambaHelperSettings:CreateDropdown( @@ -315,7 +247,8 @@ local function SettingsCreateRequests( top ) headingWidth, left, movingTop, - L["Send Request Message Area"] + L["Send Request Message Area"] , + L["Pick a Message Area"] ) AJM.settingsControlRequests.dropdownRequestArea:SetList( JambaApi.MessageAreaList() ) AJM.settingsControlRequests.dropdownRequestArea:SetCallback( "OnValueChanged", AJM.SettingsSetRequestArea ) @@ -323,366 +256,6 @@ local function SettingsCreateRequests( top ) return movingTop end -local function SettingsCreateCurrency( top ) - -- Get positions. - local checkBoxHeight = JambaHelperSettings:GetCheckBoxHeight() - local sliderHeight = JambaHelperSettings:GetSliderHeight() - local mediaHeight = JambaHelperSettings:GetMediaHeight() - local editBoxHeight = JambaHelperSettings:GetEditBoxHeight() - local buttonHeight = JambaHelperSettings:GetButtonHeight() - local dropdownHeight = JambaHelperSettings:GetDropdownHeight() - local labelHeight = JambaHelperSettings:GetLabelHeight() - local left = JambaHelperSettings:LeftOfSettings() - local headingHeight = JambaHelperSettings:HeadingHeight() - local headingWidth = JambaHelperSettings:HeadingWidth( true ) - local horizontalSpacing = JambaHelperSettings:GetHorizontalSpacing() - local verticalSpacing = JambaHelperSettings:GetVerticalSpacing() - local halfWidth = (headingWidth - horizontalSpacing) / 2 - local thirdWidth = (headingWidth - (horizontalSpacing * 2)) / 3 - local halfWidthSlider = (headingWidth - horizontalSpacing) / 2 - local column2left = left + halfWidthSlider - local left2 = left + thirdWidth - local left3 = left + (thirdWidth * 2) - local movingTop = top - JambaHelperSettings:CreateHeading( AJM.settingsControlCurrency, L["Currency Selection"], movingTop, true ) - movingTop = movingTop - headingHeight - AJM.settingsControlCurrency.checkBoxCurrencyGold = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Gold"], - AJM.SettingsToggleCurrencyGold - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyGoldInGuildBank = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Include Gold In Guild Bank"], - AJM.SettingsToggleCurrencyGoldInGuildBank - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyHonorPoints = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Honor Points"]..L[" ("]..L["HP"]..L[")"], - AJM.SettingsToggleCurrencyHonorPoints - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyConquestPoints = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Conquest Points"]..L[" ("]..L["CP"]..L[")"], - AJM.SettingsToggleCurrencyConquestPoints - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyValor = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Valor Points"]..L[" ("]..L["VP"]..L[")"], - AJM.SettingsToggleCurrencyValor - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyTolBaradCommendation = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Tol Barad Commendation"]..L[" ("]..L["TBC"]..L[")"], - AJM.SettingsToggleCurrencyTolBaradCommendation - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyChampionsSeal = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Champion's Seal"]..L[" ("]..L["CS"]..L[")"], - AJM.SettingsToggleCurrencyChampionsSeal - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyIllustriousJewelcraftersToken = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Illustrious Jewelcrafter's Token"]..L[" ("]..L["IJT"]..L[")"], - AJM.SettingsToggleCurrencyIllustriousJewelcraftersToken - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyDalaranJewelcraftingToken = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Dalaran Jewelcrafting Token"]..L[" ("]..L["DJT"]..L[")"], - AJM.SettingsToggleCurrencyDalaranJewelcraftingToken - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyIronpawToken = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Ironpaw Token"]..L[" ("]..L["IT"]..L[")"], - AJM.SettingsToggleCurrencyIronpawToken - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyLesserCharmOfGoodFortune = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Lesser Charm of Good Fortune"]..L[" ("]..L["LCGF"]..L[")"], - AJM.SettingsToggleCurrencyLesserCharmOfGoodFortune - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyElderCharmOfGoodFortune = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Elder Charm of Good Fortune"]..L[" ("]..L["ECGF"]..L[")"], - AJM.SettingsToggleCurrencyElderCharmOfGoodFortune - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyMoguRuneOfFate = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Mogu Rune Of Fate"]..L[" ("]..L["MROF"]..L[")"], - AJM.SettingsToggleCurrencyMoguRuneOfFate - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyWarforgedSeal = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Warforged Seal"]..L[" ("]..L["WS"]..L[")"], - AJM.SettingsToggleCurrencyWarforgedSeal - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyBloodyCoin = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Bloody Coin"]..L[" ("]..L["BC"]..L[")"], - AJM.SettingsToggleCurrencyBloodyCoin - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyTimelessCoin = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Timeless Coin"]..L[" ("]..L["TC"]..L[")"], - AJM.SettingsToggleCurrencyTimelessCoin - ) - --ebony New WoD Currency - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyGarrisonResources = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Garrison Resources"]..L[" ("]..L["GR"]..L[")"], - AJM.SettingsToggleCurrencyGarrisonResources - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyTemperedFate = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Seal of Tempered Fate"]..L[" ("]..L["SoT"]..L[")"], - AJM.SettingsToggleCurrencyTemperedFate - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyApexisCrystal = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Apexis Crystal"]..L[" ("]..L["AC"]..L[")"], - AJM.SettingsToggleCurrencyApexisCrystal - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyDarkmoon = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Darkmoon Prize Ticket"]..L[" ("]..L["DPT"]..L[")"], - AJM.SettingsToggleCurrencyDarkmoon - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyInevitableFate = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Seal of Inevitable Fate"]..L[" ("]..L["SoI"]..L[")"], - AJM.SettingsToggleCurrencyInevitableFate - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyOil = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["OIL"]..L[" ("]..L["OIL"]..L[")"], - AJM.SettingsToggleCurrencyOil - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.checkBoxCurrencyTimeWalker = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Timewarped Badge"]..L[" ("]..L["TwB"]..L[")"], - AJM.SettingsToggleCurrencyTimeWalker - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.currencyButtonShowList = JambaHelperSettings:CreateButton( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Show Currency"], - AJM.JambaToonRequestCurrency - ) - movingTop = movingTop - buttonHeight - AJM.settingsControlCurrency.checkBoxCurrencyOpenStartUpMaster = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Open Currency List On Start Up (Master Only)"], - AJM.SettingsToggleCurrencyOpenStartUpMaster - ) - movingTop = movingTop - checkBoxHeight - -- Create appearance & layout. - JambaHelperSettings:CreateHeading( AJM.settingsControlCurrency, L["Appearance & Layout"], movingTop, true ) - movingTop = movingTop - headingHeight - AJM.settingsControlCurrency.checkBoxCurrencyLockWindow = JambaHelperSettings:CreateCheckBox( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Lock Currency List (enables mouse click-through)"], - AJM.SettingsToggleCurrencyLockWindow - ) - movingTop = movingTop - checkBoxHeight - AJM.settingsControlCurrency.currencyScaleSlider = JambaHelperSettings:CreateSlider( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Scale"] - ) - AJM.settingsControlCurrency.currencyScaleSlider:SetSliderValues( 0.5, 2, 0.01 ) - AJM.settingsControlCurrency.currencyScaleSlider:SetCallback( "OnValueChanged", AJM.SettingsChangeScale ) - movingTop = movingTop - sliderHeight - verticalSpacing - AJM.settingsControlCurrency.currencyTransparencySlider = JambaHelperSettings:CreateSlider( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Transparency"] - ) - AJM.settingsControlCurrency.currencyTransparencySlider:SetSliderValues( 0, 1, 0.01 ) - AJM.settingsControlCurrency.currencyTransparencySlider:SetCallback( "OnValueChanged", AJM.SettingsChangeTransparency ) - movingTop = movingTop - sliderHeight - verticalSpacing - AJM.settingsControlCurrency.currencyMediaBorder = JambaHelperSettings:CreateMediaBorder( - AJM.settingsControlCurrency, - halfWidthSlider, - left, - movingTop, - L["Border Style"] - ) - AJM.settingsControlCurrency.currencyMediaBorder:SetCallback( "OnValueChanged", AJM.SettingsChangeBorderStyle ) - AJM.settingsControlCurrency.currencyBorderColourPicker = JambaHelperSettings:CreateColourPicker( - AJM.settingsControlCurrency, - halfWidthSlider, - column2left + 15, - movingTop - 15, - L["Border Colour"] - ) - AJM.settingsControlCurrency.currencyBorderColourPicker:SetHasAlpha( true ) - AJM.settingsControlCurrency.currencyBorderColourPicker:SetCallback( "OnValueConfirmed", AJM.SettingsBorderColourPickerChanged ) - movingTop = movingTop - mediaHeight - verticalSpacing - AJM.settingsControlCurrency.currencyMediaBackground = JambaHelperSettings:CreateMediaBackground( - AJM.settingsControlCurrency, - halfWidthSlider, - left, - movingTop, - L["Background"] - ) - AJM.settingsControlCurrency.currencyMediaBackground:SetCallback( "OnValueChanged", AJM.SettingsChangeBackgroundStyle ) - AJM.settingsControlCurrency.currencyBackgroundColourPicker = JambaHelperSettings:CreateColourPicker( - AJM.settingsControlCurrency, - halfWidthSlider, - column2left + 15, - movingTop - 15, - L["Background Colour"] - ) - AJM.settingsControlCurrency.currencyBackgroundColourPicker:SetHasAlpha( true ) - AJM.settingsControlCurrency.currencyBackgroundColourPicker:SetCallback( "OnValueConfirmed", AJM.SettingsBackgroundColourPickerChanged ) - movingTop = movingTop - mediaHeight - verticalSpacing - AJM.settingsControlCurrency.currencySliderSpaceForName = JambaHelperSettings:CreateSlider( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Space For Name"] - ) - AJM.settingsControlCurrency.currencySliderSpaceForName:SetSliderValues( 20, 200, 1 ) - AJM.settingsControlCurrency.currencySliderSpaceForName:SetCallback( "OnValueChanged", AJM.SettingsChangeSliderSpaceForName ) - movingTop = movingTop - sliderHeight - verticalSpacing - AJM.settingsControlCurrency.currencySliderSpaceForGold = JambaHelperSettings:CreateSlider( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Space For Gold"] - ) - AJM.settingsControlCurrency.currencySliderSpaceForGold:SetSliderValues( 20, 200, 1 ) - AJM.settingsControlCurrency.currencySliderSpaceForGold:SetCallback( "OnValueChanged", AJM.SettingsChangeSliderSpaceForGold ) - movingTop = movingTop - sliderHeight - verticalSpacing - AJM.settingsControlCurrency.currencySliderSpaceForPoints = JambaHelperSettings:CreateSlider( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Space For Points"] - ) - AJM.settingsControlCurrency.currencySliderSpaceForPoints:SetSliderValues( 20, 200, 1 ) - AJM.settingsControlCurrency.currencySliderSpaceForPoints:SetCallback( "OnValueChanged", AJM.SettingsChangeSliderSpaceForPoints ) - movingTop = movingTop - sliderHeight - verticalSpacing - AJM.settingsControlCurrency.currencySliderSpaceBetweenValues = JambaHelperSettings:CreateSlider( - AJM.settingsControlCurrency, - headingWidth, - left, - movingTop, - L["Space Between Values"] - ) - AJM.settingsControlCurrency.currencySliderSpaceBetweenValues:SetSliderValues( 0, 20, 1 ) - AJM.settingsControlCurrency.currencySliderSpaceBetweenValues:SetCallback( "OnValueChanged", AJM.SettingsChangeSliderSpaceBetweenValues ) - movingTop = movingTop - sliderHeight - verticalSpacing - return movingTop -end - local function SettingsCreateWarnings( top ) -- Get positions. local checkBoxHeight = JambaHelperSettings:GetCheckBoxHeight() @@ -707,8 +280,9 @@ local function SettingsCreateWarnings( top ) headingWidth, left, movingTop, - L["Warn If Hit First Time In Combat (Minion)"], - AJM.SettingsToggleWarnHitFirstTimeCombat + L["Warn If Hit First Time"], + AJM.SettingsToggleWarnHitFirstTimeCombat, + L["Warn If Hit First Time In Combat (Minion)"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWarnings.editBoxHitFirstTimeMessage = JambaHelperSettings:CreateEditBox( AJM.settingsControlWarnings, @@ -724,8 +298,9 @@ local function SettingsCreateWarnings( top ) headingWidth, left, movingTop, - L["Warn If Target Not Master On Combat (Minion)"], - AJM.SettingsToggleWarnTargetNotMasterEnterCombat + L["Warn If Target Not Master"], + AJM.SettingsToggleWarnTargetNotMasterEnterCombat, + L["Warn If Target Not Master On Combat (Minion)"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWarnings.editBoxWarnTargetNotMasterMessage = JambaHelperSettings:CreateEditBox( AJM.settingsControlWarnings, @@ -741,8 +316,9 @@ local function SettingsCreateWarnings( top ) headingWidth, left, movingTop, - L["Warn If Focus Not Master On Combat (Minion)"], - AJM.SettingsToggleWarnFocusNotMasterEnterCombat + L["Warn If Focus Not Master"], + AJM.SettingsToggleWarnFocusNotMasterEnterCombat, + L["Warn If Focus Not Master On Combat (Minion)"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWarnings.editBoxWarnFocusNotMasterMessage = JambaHelperSettings:CreateEditBox( AJM.settingsControlWarnings, @@ -761,7 +337,8 @@ local function SettingsCreateWarnings( top ) left, movingTop, L["Warn If My Health Drops Below"], - AJM.SettingsToggleWarnWhenHealthDropsBelowX + AJM.SettingsToggleWarnWhenHealthDropsBelowX, + L["Warn If All Minions Health Drops Below"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWarnings.editBoxWarnWhenHealthDropsAmount = JambaHelperSettings:CreateEditBox( AJM.settingsControlWarnings, @@ -786,7 +363,8 @@ local function SettingsCreateWarnings( top ) left, movingTop, L["Warn If My Mana Drops Below"], - AJM.SettingsToggleWarnWhenManaDropsBelowX + AJM.SettingsToggleWarnWhenManaDropsBelowX, + L["Warn If all Minions Mana Drops Below"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWarnings.editBoxWarnWhenManaDropsAmount = JambaHelperSettings:CreateEditBox( AJM.settingsControlWarnings, @@ -812,8 +390,9 @@ local function SettingsCreateWarnings( top ) headingWidth, left, movingTop, - L["Warn If All Regular Bags Are Full"], - AJM.SettingsToggleWarnBagsFull + L["Warn If Bags Are Full"], + AJM.SettingsToggleWarnBagsFull, + L["Warn If All Regular Bags Are Full"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWarnings.editBoxBagsFullMessage = JambaHelperSettings:CreateEditBox( AJM.settingsControlWarnings, @@ -831,8 +410,9 @@ local function SettingsCreateWarnings( top ) headingWidth, left, movingTop, - L["Warn If Toon Goes Inactive (PVP)"], - AJM.SettingsToggleWarnAfk + L["Warn If Toon Goes Inactive"], + AJM.SettingsToggleWarnAfk, + L["Warn If Toon Goes Inactive mosty for PVP"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWarnings.editBoxAfkMessage = JambaHelperSettings:CreateEditBox( AJM.settingsControlWarnings, @@ -850,7 +430,8 @@ local function SettingsCreateWarnings( top ) left, movingTop, L["Warn If Toon Gets Crowd Control"], - AJM.SettingsToggleWarnCC + AJM.SettingsToggleWarnCC, + L["Warn If any Minion Gets Crowd Control"] ) movingTop = movingTop - checkBoxHeight AJM.settingsControlWarnings.editBoxCCMessage = JambaHelperSettings:CreateEditBox( AJM.settingsControlWarnings, @@ -878,7 +459,6 @@ local function SettingsCreate() AJM.settingsControlWarnings = {} AJM.settingsControlRequests = {} AJM.settingsControlMerchant = {} - AJM.settingsControlCurrency = {} JambaHelperSettings:CreateSettings( AJM.settingsControlWarnings, AJM.moduleDisplayName, @@ -897,20 +477,12 @@ local function SettingsCreate() AJM.parentDisplayNameMerchant, AJM.SettingsPushSettingsClick ) - JambaHelperSettings:CreateSettings( - AJM.settingsControlCurrency, - L["Toon"]..L[": "]..L["Currency"], - AJM.parentDisplayNameCurrency, - AJM.SettingsPushSettingsClick - ) local bottomOfWarnings = SettingsCreateWarnings( JambaHelperSettings:TopOfSettings() ) AJM.settingsControlWarnings.widgetSettings.content:SetHeight( -bottomOfWarnings ) local bottomOfRequests = SettingsCreateRequests( JambaHelperSettings:TopOfSettings() ) AJM.settingsControlRequests.widgetSettings.content:SetHeight( -bottomOfRequests ) local bottomOfMerchant = SettingsCreateMerchant( JambaHelperSettings:TopOfSettings() ) - AJM.settingsControlMerchant.widgetSettings.content:SetHeight( -bottomOfMerchant ) - local bottomOfCurrency = SettingsCreateCurrency( JambaHelperSettings:TopOfSettings() ) - AJM.settingsControlCurrency.widgetSettings.content:SetHeight( -bottomOfCurrency ) + AJM.settingsControlMerchant.widgetSettings.content:SetHeight( -bottomOfMerchant ) -- Help local helpTable = {} JambaHelperSettings:CreateHelp( AJM.settingsControlWarnings, helpTable, AJM:GetConfiguration() ) @@ -948,6 +520,7 @@ function AJM:SettingsRefresh() AJM.settingsControlWarnings.editBoxCCMessage:SetText( AJM.db.CcMessage ) AJM.settingsControlWarnings.dropdownWarningArea:SetValue( AJM.db.warningArea ) AJM.settingsControlRequests.checkBoxAutoAcceptResurrectRequest:SetValue( AJM.db.autoAcceptResurrectRequest ) + AJM.settingsControlRequests.checkBoxAcceptDeathRequests:SetValue( AJM.db.acceptDeathRequests ) AJM.settingsControlRequests.checkBoxAutoDenyDuels:SetValue( AJM.db.autoDenyDuels ) AJM.settingsControlRequests.checkBoxAutoAcceptSummonRequest:SetValue( AJM.db.autoAcceptSummonRequest ) AJM.settingsControlRequests.checkBoxAutoDenyGuildInvites:SetValue( AJM.db.autoDenyGuildInvites ) @@ -966,51 +539,6 @@ function AJM:SettingsRefresh() AJM.settingsControlWarnings.editBoxBagsFullMessage:SetDisabled( not AJM.db.warnBagsFull ) AJM.settingsControlWarnings.editBoxAfkMessage:SetDisabled( not AJM.db.warnAfk ) AJM.settingsControlWarnings.editBoxCCMessage:SetDisabled( not AJM.db.warnCC ) - AJM.settingsControlCurrency.checkBoxCurrencyGold:SetValue( AJM.db.currGold ) - AJM.settingsControlCurrency.checkBoxCurrencyGoldInGuildBank:SetValue( AJM.db.currGoldInGuildBank ) - AJM.settingsControlCurrency.checkBoxCurrencyGoldInGuildBank:SetDisabled( not AJM.db.currGold ) - AJM.settingsControlCurrency.checkBoxCurrencyHonorPoints:SetValue( AJM.db.currHonorPoints ) - AJM.settingsControlCurrency.checkBoxCurrencyConquestPoints:SetValue( AJM.db.currConquestPoints ) - AJM.settingsControlCurrency.checkBoxCurrencyValor:SetValue( AJM.db.currValor ) - AJM.settingsControlCurrency.checkBoxCurrencyTolBaradCommendation:SetValue( AJM.db.currTolBaradCommendation ) - AJM.settingsControlCurrency.checkBoxCurrencyChampionsSeal:SetValue( AJM.db.currChampionsSeal ) - AJM.settingsControlCurrency.checkBoxCurrencyIllustriousJewelcraftersToken:SetValue( AJM.db.currIllustriousJewelcraftersToken ) - AJM.settingsControlCurrency.checkBoxCurrencyDalaranJewelcraftingToken:SetValue( AJM.db.currDalaranJewelcraftingToken ) - AJM.settingsControlCurrency.checkBoxCurrencyIronpawToken:SetValue( AJM.db.currIronpawToken ) - AJM.settingsControlCurrency.checkBoxCurrencyLesserCharmOfGoodFortune:SetValue( AJM.db.currLesserCharmOfGoodFortune ) - AJM.settingsControlCurrency.checkBoxCurrencyElderCharmOfGoodFortune:SetValue( AJM.db.currElderCharmOfGoodFortune ) - AJM.settingsControlCurrency.checkBoxCurrencyMoguRuneOfFate:SetValue( AJM.db.currMoguRuneOfFate ) - AJM.settingsControlCurrency.checkBoxCurrencyWarforgedSeal:SetValue( AJM.db.currWarforgedSeal ) - AJM.settingsControlCurrency.checkBoxCurrencyBloodyCoin:SetValue( AJM.db.currBloodyCoin ) - AJM.settingsControlCurrency.checkBoxCurrencyTimelessCoin:SetValue( AJM.db.currTimelessCoin ) - --ebony New WoD Currency - AJM.settingsControlCurrency.checkBoxCurrencyGarrisonResources:SetValue( AJM.db.currGarrisonResources ) - AJM.settingsControlCurrency.checkBoxCurrencyTemperedFate:SetValue( AJM.db.currTemperedFate ) - AJM.settingsControlCurrency.checkBoxCurrencyApexisCrystal:SetValue( AJM.db.currApexisCrystal ) - AJM.settingsControlCurrency.checkBoxCurrencyDarkmoon:SetValue( AJM.db.currDarkmoon ) - AJM.settingsControlCurrency.checkBoxCurrencyInevitableFate:SetValue( AJM.db.currInevitableFate ) - AJM.settingsControlCurrency.checkBoxCurrencyOil:SetValue( AJM.db.currOil ) - AJM.settingsControlCurrency.checkBoxCurrencyTimeWalker:SetValue( AJM.db.currTimeWalker ) - --end - AJM.settingsControlCurrency.checkBoxCurrencyOpenStartUpMaster:SetValue( AJM.db.currOpenStartUpMaster ) - AJM.settingsControlCurrency.currencyTransparencySlider:SetValue( AJM.db.currencyFrameAlpha ) - AJM.settingsControlCurrency.currencyScaleSlider:SetValue( AJM.db.currencyScale ) - AJM.settingsControlCurrency.currencyMediaBorder:SetValue( AJM.db.currencyBorderStyle ) - AJM.settingsControlCurrency.currencyMediaBackground:SetValue( AJM.db.currencyBackgroundStyle ) - AJM.settingsControlCurrency.currencyBackgroundColourPicker:SetColor( AJM.db.currencyFrameBackgroundColourR, AJM.db.currencyFrameBackgroundColourG, AJM.db.currencyFrameBackgroundColourB, AJM.db.currencyFrameBackgroundColourA ) - AJM.settingsControlCurrency.currencyBorderColourPicker:SetColor( AJM.db.currencyFrameBorderColourR, AJM.db.currencyFrameBorderColourG, AJM.db.currencyFrameBorderColourB, AJM.db.currencyFrameBorderColourA ) - AJM.settingsControlCurrency.currencySliderSpaceForName:SetValue( AJM.db.currencyNameWidth ) - AJM.settingsControlCurrency.currencySliderSpaceForGold:SetValue( AJM.db.currencyGoldWidth ) - AJM.settingsControlCurrency.currencySliderSpaceForPoints:SetValue( AJM.db.currencyPointsWidth ) - AJM.settingsControlCurrency.currencySliderSpaceBetweenValues:SetValue( AJM.db.currencySpacingWidth ) - AJM.settingsControlCurrency.checkBoxCurrencyLockWindow:SetValue( AJM.db.currencyLockWindow ) - if AJM.currencyListFrameCreated == true then - AJM:CurrencyListSetColumnWidth() - AJM:CurrencyListSetHeight() - AJM:SettingsUpdateBorderStyle() - AJM:CurrencyUpdateWindowLock() - JambaToonCurrencyListFrame:SetScale( AJM.db.currencyScale ) - end end function AJM:SettingsPushSettingsClick( event ) @@ -1045,6 +573,12 @@ function AJM:SettingsToggleAutoAcceptResurrectRequests( event, checked ) AJM:SettingsRefresh() end + +function AJM:SettingsToggleAcceptDeathRequests( event, checked ) + AJM.db.acceptDeathRequests = checked + AJM:SettingsRefresh() +end + function AJM:SettingsToggleWarnHitFirstTimeCombat( event, checked ) AJM.db.warnHitFirstTimeCombat = checked AJM:SettingsRefresh() @@ -1154,208 +688,18 @@ function AJM:SettingsSetMerchantArea( event, value ) AJM:SettingsRefresh() end -function AJM:SettingsToggleCurrencyGold( event, checked ) - AJM.db.currGold = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyGoldInGuildBank( event, checked ) - AJM.db.currGoldInGuildBank = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyHonorPoints( event, checked ) - AJM.db.currHonorPoints = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyConquestPoints( event, checked ) - AJM.db.currConquestPoints = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyValor( event, checked ) - AJM.db.currValor = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyTolBaradCommendation( event, checked ) - AJM.db.currTolBaradCommendation = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyChampionsSeal( event, checked ) - AJM.db.currChampionsSeal = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyIllustriousJewelcraftersToken( event, checked ) - AJM.db.currIllustriousJewelcraftersToken = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyDalaranJewelcraftingToken( event, checked ) - AJM.db.currDalaranJewelcraftingToken = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyIronpawToken( event, checked ) - AJM.db.currIronpawToken = checked - AJM:SettingsRefresh() -end - - -function AJM:SettingsToggleCurrencyLesserCharmOfGoodFortune( event, checked ) - AJM.db.currLesserCharmOfGoodFortune = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyElderCharmOfGoodFortune( event, checked ) - AJM.db.currElderCharmOfGoodFortune = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyMoguRuneOfFate( event, checked ) - AJM.db.currMoguRuneOfFate = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyWarforgedSeal( event, checked ) - AJM.db.currWarforgedSeal = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyBloodyCoin( event, checked ) - AJM.db.currBloodyCoin = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyTimelessCoin( event, checked ) - AJM.db.currTimelessCoin = checked - AJM:SettingsRefresh() -end - ---ebony New WoD Currency -function AJM:SettingsToggleCurrencyGarrisonResources ( event, checked ) - AJM.db.currGarrisonResources = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyTemperedFate ( event, checked ) - AJM.db.currTemperedFate = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyApexisCrystal ( event, checked ) - AJM.db.currApexisCrystal = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyInevitableFate ( event, checked ) - AJM.db.currInevitableFate = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyOil ( event, checked ) - AJM.db.currOil = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyTimeWalker ( event, checked ) - AJM.db.currTimeWalker = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyDarkmoon ( event, checked ) - AJM.db.currDarkmoon = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyOpenStartUpMaster( event, checked ) - AJM.db.currOpenStartUpMaster = checked - AJM:SettingsRefresh() -end - -function AJM:SettingsChangeScale( event, value ) - AJM.db.currencyScale = tonumber( value ) - AJM:SettingsRefresh() -end - -function AJM:SettingsChangeTransparency( event, value ) - AJM.db.currencyFrameAlpha = tonumber( value ) - AJM:SettingsRefresh() -end - -function AJM:SettingsChangeBorderStyle( event, value ) - AJM.db.currencyBorderStyle = value - AJM:SettingsRefresh() -end - -function AJM:SettingsChangeBackgroundStyle( event, value ) - AJM.db.currencyBackgroundStyle = value - AJM:SettingsRefresh() -end - -function AJM:SettingsBackgroundColourPickerChanged( event, r, g, b, a ) - AJM.db.currencyFrameBackgroundColourR = r - AJM.db.currencyFrameBackgroundColourG = g - AJM.db.currencyFrameBackgroundColourB = b - AJM.db.currencyFrameBackgroundColourA = a - AJM:SettingsRefresh() -end - -function AJM:SettingsBorderColourPickerChanged( event, r, g, b, a ) - AJM.db.currencyFrameBorderColourR = r - AJM.db.currencyFrameBorderColourG = g - AJM.db.currencyFrameBorderColourB = b - AJM.db.currencyFrameBorderColourA = a - AJM:SettingsRefresh() -end - -function AJM:SettingsChangeSliderSpaceForName( event, value ) - AJM.db.currencyNameWidth = tonumber( value ) - AJM:SettingsRefresh() -end - -function AJM:SettingsChangeSliderSpaceForGold( event, value ) - AJM.db.currencyGoldWidth = tonumber( value ) - AJM:SettingsRefresh() -end - -function AJM:SettingsChangeSliderSpaceForPoints( event, value ) - AJM.db.currencyPointsWidth = tonumber( value ) - AJM:SettingsRefresh() -end - -function AJM:SettingsChangeSliderSpaceBetweenValues( event, value ) - AJM.db.currencySpacingWidth = tonumber( value ) - AJM:SettingsRefresh() -end - -function AJM:SettingsToggleCurrencyLockWindow( event, checked ) - AJM.db.currencyLockWindow = checked - AJM:CurrencyUpdateWindowLock() - AJM:SettingsRefresh() -end - ------------------------------------------------------------------------------------------------------------- -- Addon initialization, enabling and disabling. ------------------------------------------------------------------------------------------------------------- -- Initialise the module. function AJM:OnInitialize() - AJM.currencyTotalGold = 0 - AJM.currencyListFrameCreated = false - AJM.currencyFrameCharacterInfo = {} - AJM.currentCurrencyValues = {} -- Create the settings control. SettingsCreate() -- Initialise the JambaModule part of this module. AJM:JambaModuleInitialize( AJM.settingsControlWarnings.widgetSettings.frame ) -- Populate the settings. AJM:SettingsRefresh() - -- Create the currency list frame. - AJM:CreateJambaToonCurrencyListFrame() -- Flag set when told the master about health falling below a certain percentage. AJM.toldMasterAboutHealth = false -- Flag set when told the master about mana falling below a certain percentage. @@ -1376,6 +720,12 @@ function AJM:OnEnable() AJM:RegisterEvent( "MERCHANT_SHOW" ) AJM:RegisterEvent( "UNIT_MANA" ) AJM:RegisterEvent( "RESURRECT_REQUEST" ) + AJM:RegisterEvent( "PLAYER_DEAD" ) + AJM:RegisterEvent( "CORPSE_IN_RANGE" ) + AJM:RegisterEvent( "CORPSE_IN_INSTANCE" ) + AJM:RegisterEvent( "CORPSE_OUT_OF_RANGE" ) + AJM:RegisterEvent( "PLAYER_UNGHOST" ) + AJM:RegisterEvent( "PLAYER_ALIVE" ) AJM:RegisterEvent( "CONFIRM_SUMMON") AJM:RegisterEvent( "DUEL_REQUESTED" ) AJM:RegisterEvent( "GUILD_INVITE_REQUEST" ) @@ -1383,18 +733,11 @@ function AJM:OnEnable() --test --AJM:RegisterEvent("LOSS_OF_CONTROL_UPDATE") AJM:RegisterEvent("LOSS_OF_CONTROL_ADDED") - - --TODO: this might need chaning like in jamba-display as does not work very well with a lot of RED UI updates. (EG spamBAR?) AJM:RegisterEvent( "UI_ERROR_MESSAGE", "ITEM_PUSH" ) AJM:RegisterEvent( "UNIT_AURA" ) AJM:RegisterMessage( JambaApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" ) AJM:RegisterMessage( JambaApi.MESSAGE_CHARACTER_ONLINE, "OnCharactersChanged" ) AJM:RegisterMessage( JambaApi.MESSAGE_CHARACTER_OFFLINE, "OnCharactersChanged" ) - if AJM.db.currOpenStartUpMaster == true then - if JambaApi.IsCharacterTheMaster( self.characterName ) == true then - AJM:ScheduleTimer( "JambaToonRequestCurrency", 2 ) - end - end end -- Called when the addon is disabled. @@ -1424,6 +767,7 @@ function AJM:JambaOnSettingsReceived( characterName, settings ) AJM.db.warnCC = settings.warnCC AJM.db.CcMessage = settings.CcMessage AJM.db.autoAcceptResurrectRequest = settings.autoAcceptResurrectRequest + AJM.db.acceptDeathRequests = settings.acceptDeathRequests AJM.db.autoDenyDuels = settings.autoDenyDuels --ebonnysum AJM.db.autoAcceptSummonRequest = settings.autoAcceptSummonRequest @@ -1433,51 +777,6 @@ function AJM:JambaOnSettingsReceived( characterName, settings ) AJM.db.warningArea = settings.warningArea AJM.db.requestArea = settings.requestArea AJM.db.merchantArea = settings.merchantArea - AJM.db.currGold = settings.currGold - AJM.db.currGoldInGuildBank = settings.currGoldInGuildBank - AJM.db.currHonorPoints = settings.currHonorPoints - AJM.db.currConquestPoints = settings.currConquestPoints - AJM.db.currValor = settings.currValor - AJM.db.currTolBaradCommendation = settings.currTolBaradCommendation - AJM.db.currChampionsSeal = settings.currChampionsSeal - AJM.db.currIllustriousJewelcraftersToken = settings.currIllustriousJewelcraftersToken - AJM.db.currDalaranJewelcraftingToken = settings.currDalaranJewelcraftingToken - AJM.db.currIronpawToken = settings.currIronpawToken - AJM.db.currLesserCharmOfGoodFortune = settings.currLesserCharmOfGoodFortune - AJM.db.currElderCharmOfGoodFortune = settings.currElderCharmOfGoodFortune - AJM.db.currMoguRuneOfFate = settings.currMoguRuneOfFate - AJM.db.currWarforgedSeal = settings.currWarforgedSeal - AJM.db.currBloodyCoin = settings.currBloodyCoin - AJM.db.currTimelessCoin = settings.currTimelessCoin - --ebony New WoD Currency - AJM.db.currGarrisonResources = settings.currGarrisonResources - AJM.db.currTemperedFate = settings.currTemperedFate - AJM.db.currApexisCrystal = settings.currApexisCrystal - AJM.db.currDarkmoon = settings.currDarkmoon - AJM.db.currInevitableFate = settings.currInevitableFate - AJM.db.currOil = settings.currOil - AJM.db.currTimeWalker = settings.currTimeWalker --- END - AJM.db.currOpenStartUpMaster = settings.currOpenStartUpMaster - AJM.db.currencyScale = settings.currencyScale - AJM.db.currencyFrameAlpha = settings.currencyFrameAlpha - AJM.db.currencyFramePoint = settings.currencyFramePoint - AJM.db.currencyFrameRelativePoint = settings.currencyFrameRelativePoint - AJM.db.currencyFrameXOffset = settings.currencyFrameXOffset - AJM.db.currencyFrameYOffset = settings.currencyFrameYOffset - AJM.db.currencyFrameBackgroundColourR = settings.currencyFrameBackgroundColourR - AJM.db.currencyFrameBackgroundColourG = settings.currencyFrameBackgroundColourG - AJM.db.currencyFrameBackgroundColourB = settings.currencyFrameBackgroundColourB - AJM.db.currencyFrameBackgroundColourA = settings.currencyFrameBackgroundColourA - AJM.db.currencyFrameBorderColourR = settings.currencyFrameBorderColourR - AJM.db.currencyFrameBorderColourG = settings.currencyFrameBorderColourG - AJM.db.currencyFrameBorderColourB = settings.currencyFrameBorderColourB - AJM.db.currencyFrameBorderColourA = settings.currencyFrameBorderColourA - AJM.db.currencyNameWidth = settings.currencyNameWidth - AJM.db.currencyPointsWidth = settings.currencyPointsWidth - AJM.db.currencyGoldWidth = settings.currencyGoldWidth - AJM.db.currencySpacingWidth = settings.currencySpacingWidth - AJM.db.currencyLockWindow = settings.currencyLockWindow -- Refresh the settings. AJM:SettingsRefresh() -- Tell the player. @@ -1518,6 +817,192 @@ function AJM:DUEL_REQUESTED( event, challenger, ... ) end end +function AJM:PLAYER_UNGHOST(event, ...) + StaticPopup_Hide( "RECOVER_CORPSE" ) + StaticPopup_Hide( "RECOVER_CORPSE_INSTANCE" ) + StaticPopup_Hide( "XP_LOSS" ) + StaticPopup_Hide( "RECOVER_TEAM") + StaticPopup_Hide( "TEAMDEATH" ) +end + +function AJM:PLAYER_ALIVE(event, ...) + StaticPopup_Hide( "RECOVER_CORPSE" ) + StaticPopup_Hide( "RECOVER_CORPSE_INSTANCE" ) + StaticPopup_Hide( "XP_LOSS" ) + StaticPopup_Hide( "RECOVER_TEAM" ) + StaticPopup_Hide( "TEAMDEATH" ) +end + + +function AJM:CORPSE_IN_RANGE(event, ...) + local teamMembers = JambaApi.GetTeamListMaximumOrderOnline() + if teamMembers > 1 and AJM.db.acceptDeathRequests == true then + StaticPopup_Show("RECOVER_TEAM") + end +end + +function AJM:CORPSE_IN_INSTANCE(event, ...) + StaticPopup_Show("RECOVER_CORPSE_INSTANCE") + StaticPopup_Hide("RECOVER_TEAM") +end + +function AJM:CORPSE_OUT_OF_RANGE(event, ...) + StaticPopup_Hide("RECOVER_CORPSE") + StaticPopup_Hide("RECOVER_CORPSE_INSTANCE") + StaticPopup_Hide("XP_LOSS") + StaticPopup_Hide("RECOVER_TEAM") +end + +function AJM:PLAYER_DEAD( event, ...) + -- jamba Team Stuff. + local teamMembers = JambaApi.GetTeamListMaximumOrderOnline() + if teamMembers > 1 and AJM.db.acceptDeathRequests == true then + StaticPopup_Show( "TEAMDEATH" ) + end +end +-- Mosty taken from blizzard StaticPopup Code + +StaticPopupDialogs["TEAMDEATH"] = { + --local resTime = GetReleaseTimeRemaining(), + text = L["Release Team?"], --..resTime, + button1 = DEATH_RELEASE, + button2 = USE_SOULSTONE, + button3 = CANCEL, + OnShow = function(self) + self.timeleft = GetReleaseTimeRemaining() + local text = HasSoulstone() + if ( text ) then + self.button2:SetText(text) + end + if ( self.timeleft == -1 ) then + self.text:SetText(DEATH_RELEASE_NOTIMER) + end + self.button1:SetText(L["Release Team"]) + end, + OnAccept = function(self) + --RepopMe(); + AJM.teamDeath() + if ( CannotBeResurrected() ) then + return 1 + end + end, + OnCancel = function(self, data, reason) + if ( reason == "override" ) then + return; + end + if ( reason == "timeout" ) then + return; + end + if ( reason == "clicked" ) then + if ( HasSoulstone() ) then + AJM.teamSS() + else + AJM.teamRes() + end + if ( CannotBeResurrected() ) then + return 1 + end + end + end, + OnUpdate = function(self, elapsed) + if ( IsFalling() and not IsOutOfBounds()) then + self.button1:Disable() + self.button2:Disable() + self.button3:Disable() + return; + end + + local b1_enabled = self.button1:IsEnabled() + self.button1:SetEnabled(not IsEncounterInProgress()) + + if ( b1_enabled ~= self.button1:IsEnabled() ) then + if ( b1_enabled ) then + self.text:SetText(CAN_NOT_RELEASE_IN_COMBAT) + else + self.text:SetText(""); + StaticPopupDialogs[self.which].OnShow(self) + end + StaticPopup_Resize(dialog, which) + end + if( HasSoulstone() and CanUseSoulstone() ) then + self.button2:Enable() + else + self.button2:Disable() + end + end, + DisplayButton2 = function(self) + return HasSoulstone() + end, + timeout = 0, + whileDead = 1, + interruptCinematic = 1, + notClosableByLogout = 1, + noCancelOnReuse = 1, + cancels = "RECOVER_TEAM" +} + +StaticPopupDialogs["RECOVER_TEAM"] = { + text = L["Recover All Team Corpses?"], + button1 = ACCEPT, + OnAccept = function(self) + AJM:relaseTeam(); + return 1; + end, + timeout = 0, + whileDead = 1, + interruptCinematic = 1, + notClosableByLogout = 1 +}; + +function AJM:relaseTeam() + --AJM:Print("going to release team WIP") + AJM:JambaSendCommandToTeam( AJM.COMMAND_RECOVER_TEAM ) +end + +function AJM:teamDeath() + --AJM:Print("going to res team WIP") + AJM:JambaSendCommandToTeam( AJM.COMMAND_TEAM_DEATH ) +end + +function AJM:teamSS() + --AJM:Print("going to res team WIP") + AJM:JambaSendCommandToTeam( AJM.COMMAND_SOUL_STONE ) + --UseSoulstone() +end + +function AJM:doRecoverTeam() + RetrieveCorpse() + if UnitIsGhost("player") then + local delay = GetCorpseRecoveryDelay() + if delay > 0 then + AJM:JambaSendMessageToTeam( AJM.db.requestArea, L["I can not release to my Corpse for:"]..L[" "]..delay..L[" Seconds"], false ) + StaticPopup_Show("RECOVER_TEAM") + else + RetrieveCorpse() + StaticPopup_Hide("RECOVER_TEAM") + end + end +end + +function AJM:doTeamDeath() + if UnitIsDead("player") and not UnitIsGhost("player") then + RepopMe() + StaticPopup_Hide("TEAMDEATH") + end +end + +function AJM:doSoulStone() + if UnitIsDead("player") and not UnitIsGhost("player") then + if HasSoulstone() then + UseSoulstone() + StaticPopup_Hide("TEAMDEATH") + else + AJM:JambaSendMessageToTeam( AJM.db.warningArea, L["I Do not have a SoulStone"], false ) + RepopMe() + end + end +end + function AJM:RESURRECT_REQUEST( event, ... ) if AJM.db.autoAcceptResurrectRequest == true then AcceptResurrect() @@ -1527,6 +1012,8 @@ function AJM:RESURRECT_REQUEST( event, ... ) StaticPopup_Hide( "SKINNED" ) StaticPopup_Hide( "SKINNED_REPOP" ) StaticPopup_Hide( "DEATH" ) + StaticPopup_Hide( "RECOVER_TEAM" ) + StaticPopup_Hide( "TEAMDEATH" ) end end @@ -1697,1299 +1184,16 @@ function AJM:LOSS_OF_CONTROL_ADDED( event, ... ) end end -function AJM:CreateJambaToonCurrencyListFrame() - -- The frame. - local frame = CreateFrame( "Frame", "JambaToonCurrencyListWindowFrame", UIParent ) - frame.obj = AJM - frame:SetFrameStrata( "BACKGROUND" ) - 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() - AJM.db.currencyFramePoint = point - AJM.db.currencyFrameRelativePoint = relativePoint - AJM.db.currencyFrameXOffset = xOffset - AJM.db.currencyFrameYOffset = yOffset - end ) - frame:SetWidth( 500 ) - frame:SetHeight( 200 ) - frame:ClearAllPoints() - frame:SetPoint( AJM.db.currencyFramePoint, UIParent, AJM.db.currencyFrameRelativePoint, AJM.db.currencyFrameXOffset, AJM.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( "JambaToonCurrencyListWindowFrameTitleText", "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 = AJM.globalCurrencyFramePrefix.."TitleCharacterName" - local frameCharacterNameText = parentFrame:CreateFontString( frameCharacterName.."Text", "OVERLAY", "GameFontNormal" ) - frameCharacterNameText:SetText( L["Toon"] ) - 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 = AJM.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 HonorPoints font string. - local frameHonorPoints = AJM.globalCurrencyFramePrefix.."TitleHonorPoints" - local frameHonorPointsText = parentFrame:CreateFontString( frameHonorPoints.."Text", "OVERLAY", "GameFontNormal" ) - frameHonorPointsText:SetText( L["HP"] ) - frameHonorPointsText:SetTextColor( r, g, b, a ) - frameHonorPointsText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameHonorPointsText:SetWidth( width ) - frameHonorPointsText:SetJustifyH( "CENTER" ) - frame.HonorPointsText = frameHonorPointsText - left = left + spacing - -- Set the ConquestPoints font string. - local frameConquestPoints = AJM.globalCurrencyFramePrefix.."TitleConquestPoints" - local frameConquestPointsText = parentFrame:CreateFontString( frameConquestPoints.."Text", "OVERLAY", "GameFontNormal" ) - frameConquestPointsText:SetText( L["CP"] ) - frameConquestPointsText:SetTextColor( r, g, b, a ) - frameConquestPointsText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameConquestPointsText:SetWidth( width ) - frameConquestPointsText:SetJustifyH( "CENTER" ) - frame.ConquestPointsText = frameConquestPointsText - left = left + spacing - -- Set the Valor font string. - local frameValor = AJM.globalCurrencyFramePrefix.."Valor" - local frameValorText = parentFrame:CreateFontString( frameValor.."Text", "OVERLAY", "GameFontNormal" ) - frameValorText:SetText( L["VP"] ) - frameValorText:SetTextColor( r, g, b, a ) - frameValorText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameValorText:SetWidth( width ) - frameValorText:SetJustifyH( "CENTER" ) - frame.ValorText = frameValorText - left = left + spacing - -- Set the TolBaradCommendation font string. - local frameTolBaradCommendation = AJM.globalCurrencyFramePrefix.."TitleTolBaradCommendation" - local frameTolBaradCommendationText = parentFrame:CreateFontString( frameTolBaradCommendation.."Text", "OVERLAY", "GameFontNormal" ) - frameTolBaradCommendationText:SetText( L["TBC"] ) - frameTolBaradCommendationText:SetTextColor( r, g, b, a ) - frameTolBaradCommendationText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameTolBaradCommendationText:SetWidth( width ) - frameTolBaradCommendationText:SetJustifyH( "CENTER" ) - frame.TolBaradCommendationText = frameTolBaradCommendationText - left = left + spacing - -- Set the ChampionsSeal font string. - local frameChampionsSeal = AJM.globalCurrencyFramePrefix.."TitleChampionsSeal" - local frameChampionsSealText = parentFrame:CreateFontString( frameChampionsSeal.."Text", "OVERLAY", "GameFontNormal" ) - frameChampionsSealText:SetText( L["CS"] ) - frameChampionsSealText:SetTextColor( r, g, b, a ) - frameChampionsSealText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameChampionsSealText:SetWidth( width ) - frameChampionsSealText:SetJustifyH( "CENTER" ) - frame.ChampionsSealText = frameChampionsSealText - left = left + spacing - -- Set the IllustriousJewelcraftersToken font string. - local frameIllustriousJewelcraftersToken = AJM.globalCurrencyFramePrefix.."TitleIllustriousJewelcraftersToken" - local frameIllustriousJewelcraftersTokenText = parentFrame:CreateFontString( frameIllustriousJewelcraftersToken.."Text", "OVERLAY", "GameFontNormal" ) - frameIllustriousJewelcraftersTokenText:SetText( L["IJT"] ) - frameIllustriousJewelcraftersTokenText:SetTextColor( r, g, b, a ) - frameIllustriousJewelcraftersTokenText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameIllustriousJewelcraftersTokenText:SetWidth( width ) - frameIllustriousJewelcraftersTokenText:SetJustifyH( "CENTER" ) - frame.IllustriousJewelcraftersTokenText = frameIllustriousJewelcraftersTokenText - left = left + spacing - -- Set the DalaranJewelcraftingToken font string. - local frameDalaranJewelcraftingToken = AJM.globalCurrencyFramePrefix.."TitleDalaranJewelcraftingToken" - local frameDalaranJewelcraftingTokenText = parentFrame:CreateFontString( frameDalaranJewelcraftingToken.."Text", "OVERLAY", "GameFontNormal" ) - frameDalaranJewelcraftingTokenText:SetText( L["DJT"] ) - frameDalaranJewelcraftingTokenText:SetTextColor( r, g, b, a ) - frameDalaranJewelcraftingTokenText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameDalaranJewelcraftingTokenText:SetWidth( width ) - frameDalaranJewelcraftingTokenText:SetJustifyH( "CENTER" ) - frame.DalaranJewelcraftingTokenText = frameDalaranJewelcraftingTokenText - left = left + spacing - -- Set the IronpawToken font string. - local frameIronpawToken = AJM.globalCurrencyFramePrefix.."TitleIronpawToken" - local frameIronpawTokenText = parentFrame:CreateFontString( frameIronpawToken.."Text", "OVERLAY", "GameFontNormal" ) - frameIronpawTokenText:SetText( L["IT"] ) - frameIronpawTokenText:SetTextColor( r, g, b, a ) - frameIronpawTokenText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameIronpawTokenText:SetWidth( width ) - frameIronpawTokenText:SetJustifyH( "CENTER" ) - frame.IronpawTokenText = frameIronpawTokenText - left = left + spacing - -- Set the LesserCharmOfGoodFortune font string. - local frameLesserCharmOfGoodFortune = AJM.globalCurrencyFramePrefix.."TitleLesserCharmOfGoodFortune" - local frameLesserCharmOfGoodFortuneText = parentFrame:CreateFontString( frameLesserCharmOfGoodFortune.."Text", "OVERLAY", "GameFontNormal" ) - frameLesserCharmOfGoodFortuneText:SetText( L["LCGF"] ) - frameLesserCharmOfGoodFortuneText:SetTextColor( r, g, b, a ) - frameLesserCharmOfGoodFortuneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameLesserCharmOfGoodFortuneText:SetWidth( width ) - frameLesserCharmOfGoodFortuneText:SetJustifyH( "CENTER" ) - frame.LesserCharmOfGoodFortuneText = frameLesserCharmOfGoodFortuneText - left = left + spacing - -- Set the ElderCharmOfGoodFortune font string. - local frameElderCharmOfGoodFortune = AJM.globalCurrencyFramePrefix.."TitleElderCharmOfGoodFortune" - local frameElderCharmOfGoodFortuneText = parentFrame:CreateFontString( frameElderCharmOfGoodFortune.."Text", "OVERLAY", "GameFontNormal" ) - frameElderCharmOfGoodFortuneText:SetText( L["ECGF"] ) - frameElderCharmOfGoodFortuneText:SetTextColor( r, g, b, a ) - frameElderCharmOfGoodFortuneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameElderCharmOfGoodFortuneText:SetWidth( width ) - frameElderCharmOfGoodFortuneText:SetJustifyH( "CENTER" ) - frame.ElderCharmOfGoodFortuneText = frameElderCharmOfGoodFortuneText - left = left + spacing - -- Set the MoguRuneOfFate font string. - local frameMoguRuneOfFate = AJM.globalCurrencyFramePrefix.."TitleMoguRuneOfFate" - local frameMoguRuneOfFateText = parentFrame:CreateFontString( frameMoguRuneOfFate.."Text", "OVERLAY", "GameFontNormal" ) - frameMoguRuneOfFateText:SetText( L["MROF"] ) - frameMoguRuneOfFateText:SetTextColor( r, g, b, a ) - frameMoguRuneOfFateText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameMoguRuneOfFateText:SetWidth( width ) - frameMoguRuneOfFateText:SetJustifyH( "CENTER" ) - frame.MoguRuneOfFateText = frameMoguRuneOfFateText - left = left + spacing - -- Set the WarforgedSeal font string. - local frameWarforgedSeal = AJM.globalCurrencyFramePrefix.."TitleWarforgedSeal" - local frameWarforgedSealText = parentFrame:CreateFontString( frameWarforgedSeal.."Text", "OVERLAY", "GameFontNormal" ) - frameWarforgedSealText:SetText( L["WS"] ) - frameWarforgedSealText:SetTextColor( r, g, b, a ) - frameWarforgedSealText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameWarforgedSealText:SetWidth( width ) - frameWarforgedSealText:SetJustifyH( "CENTER" ) - frame.WarforgedSealText = frameWarforgedSealText - left = left + spacing - -- Set the BloodyCoin font string. - local frameBloodyCoin = AJM.globalCurrencyFramePrefix.."TitleBloodyCoin" - local frameBloodyCoinText = parentFrame:CreateFontString( frameBloodyCoin.."Text", "OVERLAY", "GameFontNormal" ) - frameBloodyCoinText:SetText( L["BC"] ) - frameBloodyCoinText:SetTextColor( r, g, b, a ) - frameBloodyCoinText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameBloodyCoinText:SetWidth( width ) - frameBloodyCoinText:SetJustifyH( "CENTER" ) - frame.BloodyCoinText = frameBloodyCoinText - left = left + spacing - -- Set the TimelessCoin font string. - local frameTimelessCoin = AJM.globalCurrencyFramePrefix.."TitleTimelessCoin" - local frameTimelessCoinText = parentFrame:CreateFontString( frameTimelessCoin.."Text", "OVERLAY", "GameFontNormal" ) - frameTimelessCoinText:SetText( L["TC"] ) - frameTimelessCoinText:SetTextColor( r, g, b, a ) - frameTimelessCoinText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameTimelessCoinText:SetWidth( width ) - frameTimelessCoinText:SetJustifyH( "CENTER" ) - frame.TimelessCoinText = frameTimelessCoinText - left = left + spacing - --ebony New WoD Currency - -- Set the GarrisonResources font string. - local frameGarrisonResources = AJM.globalCurrencyFramePrefix.."TitleGarrisonResources" - local frameGarrisonResourcesText = parentFrame:CreateFontString( frameGarrisonResources .."Text", "OVERLAY", "GameFontNormal" ) - frameGarrisonResourcesText:SetText( L["GR"] ) - frameGarrisonResourcesText:SetTextColor( r, g, b, a ) - frameGarrisonResourcesText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameGarrisonResourcesText:SetWidth( width ) - frameGarrisonResourcesText:SetJustifyH( "CENTER" ) - frame.GarrisonResourcesText = frameGarrisonResourcesText - left = left + spacing - -- Set the Tempered Fate font string. - local frameTemperedFate = AJM.globalCurrencyFramePrefix.."TitleTemperedFate" - local frameTemperedFateText = parentFrame:CreateFontString( frameTemperedFate .."Text", "OVERLAY", "GameFontNormal" ) - frameTemperedFateText:SetText( L["SoT"] ) - frameTemperedFateText:SetTextColor( r, g, b, a ) - frameTemperedFateText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameTemperedFateText:SetWidth( width ) - frameTemperedFateText:SetJustifyH( "CENTER" ) - frame.TemperedFateText = frameTemperedFateText - left = left + spacing - -- Set the Apexis Crystal font string. - local frameApexisCrystal = AJM.globalCurrencyFramePrefix.."TitleApexisCrystal" - local frameApexisCrystalText = parentFrame:CreateFontString( frameApexisCrystal .."Text", "OVERLAY", "GameFontNormal" ) - frameApexisCrystalText:SetText( L["AC"] ) - frameApexisCrystalText:SetTextColor( r, g, b, a ) - frameApexisCrystalText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameApexisCrystalText:SetWidth( width ) - frameApexisCrystalText:SetJustifyH( "CENTER" ) - frame.ApexisCrystalText = frameApexisCrystalText - left = left + spacing - -- Set the Darkmoon Prize font string. - local frameDarkmoon = AJM.globalCurrencyFramePrefix.."TitleDarkmoon" - local frameDarkmoonText = parentFrame:CreateFontString( frameDarkmoon .."Text", "OVERLAY", "GameFontNormal" ) - frameDarkmoonText:SetText( L["DPT"] ) - frameDarkmoonText:SetTextColor( r, g, b, a ) - frameDarkmoonText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameDarkmoonText:SetWidth( width ) - frameDarkmoonText:SetJustifyH( "CENTER" ) - frame.DarkmoonText = frameDarkmoonText - left = left + spacing - -- Set the Oil font string. - local frameOil = AJM.globalCurrencyFramePrefix.."TitleOil" - local frameOilText = parentFrame:CreateFontString( frameOil .."Text", "OVERLAY", "GameFontNormal" ) - frameOilText:SetText( L["OIL"] ) - frameOilText:SetTextColor( r, g, b, a ) - frameOilText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameOilText:SetWidth( width ) - frameOilText:SetJustifyH( "CENTER" ) - frame.OilText = frameOilText - left = left + spacing - -- Set the InevitableFate Prize font string. - local frameInevitableFate = AJM.globalCurrencyFramePrefix.."TitleInevitableFate" - local frameInevitableFateText = parentFrame:CreateFontString( frameInevitableFate .."Text", "OVERLAY", "GameFontNormal" ) - frameInevitableFateText:SetText( L["SoI"] ) - frameInevitableFateText:SetTextColor( r, g, b, a ) - frameInevitableFateText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameInevitableFateText:SetWidth( width ) - frameInevitableFateText:SetJustifyH( "CENTER" ) - frame.InevitableFateText = frameInevitableFateText - left = left + spacing - -- Set the Time Walker font string. - local frameTimeWalker = AJM.globalCurrencyFramePrefix.."TitleTimewalker" - local frameTimeWalkerText = parentFrame:CreateFontString( frameTimeWalker .."Text", "OVERLAY", "GameFontNormal" ) - frameTimeWalkerText:SetText( L["SoI"] ) - frameTimeWalkerText:SetTextColor( r, g, b, a ) - frameTimeWalkerText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameTimeWalkerText:SetWidth( width ) - frameTimeWalkerText:SetJustifyH( "CENTER" ) - frame.TimeWalkerText = frameTimeWalkerText - left = left + spacing - - -- Set the Total Gold font string. - left = 10 - top = -50 - - - local frameTotalGoldTitle = AJM.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 frameTotalGoldGuildTitle = AJM.globalCurrencyFramePrefix.."TitleTotalGoldGuild" - local frameTotalGoldGuildTitleText = parentFrame:CreateFontString( frameTotalGoldGuildTitle.."Text", "OVERLAY", "GameFontNormal" ) - frameTotalGoldGuildTitleText:SetText( L["Guild"] ) - frameTotalGoldGuildTitleText:SetTextColor( r, g, b, a ) - frameTotalGoldGuildTitleText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameTotalGoldGuildTitleText:SetWidth( width ) - frameTotalGoldGuildTitleText:SetJustifyH( "LEFT" ) - frame.TotalGoldGuildTitleText = frameTotalGoldGuildTitleText - - local frameTotalGold = AJM.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 - - local frameTotalGoldGuild = AJM.globalCurrencyFramePrefix.."TotalGoldGuild" - local frameTotalGoldGuildText = parentFrame:CreateFontString( frameTotalGoldGuild.."Text", "OVERLAY", "GameFontNormal" ) - frameTotalGoldGuildText:SetText( "0" ) - frameTotalGoldGuildText:SetTextColor( r, g, b, a ) - frameTotalGoldGuildText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameTotalGoldGuildText:SetWidth( width ) - frameTotalGoldGuildText:SetJustifyH( "RIGHT" ) - frame.TotalGoldGuildText = frameTotalGoldGuildText - - -- Set frame width. - frame:SetWidth( left + 10 ) - - -- Set transparency of the the frame (and all its children). - frame:SetAlpha( AJM.db.currencyFrameAlpha ) - - -- Set scale. - frame:SetScale( AJM.db.currencyScale ) - - -- Set the global frame reference for this frame. - JambaToonCurrencyListFrame = frame - - -- Close. - local closeButton = CreateFrame( "Button", AJM.globalCurrencyFramePrefix.."ButtonClose", frame, "UIPanelCloseButton" ) - closeButton:SetScript( "OnClick", function() JambaToonCurrencyListFrame:Hide() end ) - closeButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", 0, 0 ) - frame.closeButton = closeButton - - -- Update. - local updateButton = CreateFrame( "Button", AJM.globalCurrencyFramePrefix.."ButtonUpdate", frame, "UIPanelButtonTemplate" ) - updateButton:SetScript( "OnClick", function() AJM:JambaToonRequestCurrency() end ) - updateButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", -30, -4 ) - updateButton:SetHeight( 22 ) - updateButton:SetWidth( 55 ) - updateButton:SetText( L["Update"] ) - frame.updateButton = updateButton - - AJM:CurrencyListSetHeight() - AJM:SettingsUpdateBorderStyle() - AJM:CurrencyUpdateWindowLock() - JambaToonCurrencyListFrame:Hide() - AJM.currencyListFrameCreated = true -end - -function AJM:CurrencyUpdateWindowLock() - if AJM.db.currencyLockWindow == false then - JambaToonCurrencyListFrame:EnableMouse( true ) - else - JambaToonCurrencyListFrame:EnableMouse( false ) - end -end - -function AJM:SettingsUpdateBorderStyle() - local borderStyle = AJM.SharedMedia:Fetch( "border", AJM.db.currencyBorderStyle ) - local backgroundStyle = AJM.SharedMedia:Fetch( "background", AJM.db.currencyBackgroundStyle ) - local frame = JambaToonCurrencyListFrame - frame:SetBackdrop( { - bgFile = backgroundStyle, - edgeFile = borderStyle, - tile = true, tileSize = frame:GetWidth(), edgeSize = 10, - insets = { left = 3, right = 3, top = 3, bottom = 3 } - } ) - frame:SetBackdropColor( AJM.db.currencyFrameBackgroundColourR, AJM.db.currencyFrameBackgroundColourG, AJM.db.currencyFrameBackgroundColourB, AJM.db.currencyFrameBackgroundColourA ) - frame:SetBackdropBorderColor( AJM.db.currencyFrameBorderColourR, AJM.db.currencyFrameBorderColourG, AJM.db.currencyFrameBorderColourB, AJM.db.currencyFrameBorderColourA ) - frame:SetAlpha( AJM.db.currencyFrameAlpha ) -end - -function AJM:CurrencyListSetHeight() - local additionalLines = 0 - local addHeight = 0 - if AJM.db.currGold == true then - if AJM.db.currGoldInGuildBank == true then - additionalLines = 2 - addHeight = 7 - else - additionalLines = 1 - addHeight = 5 - end - end - JambaToonCurrencyListFrame:SetHeight( 56 + (( JambaApi.GetTeamListMaximumOrderOnline() + additionalLines) * 15) + addHeight ) -end - -function AJM:CurrencyListSetColumnWidth() - local nameWidth = AJM.db.currencyNameWidth - local pointsWidth = AJM.db.currencyPointsWidth - local goldWidth = AJM.db.currencyGoldWidth - local spacingWidth = AJM.db.currencySpacingWidth - local frameHorizontalSpacing = 10 - local numberOfPointsColumns = 0 - local parentFrame = JambaToonCurrencyListFrame - 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 AJM.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 AJM.db.currHonorPoints == true then - parentFrame.HonorPointsText:SetWidth( pointsWidth ) - parentFrame.HonorPointsText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.HonorPointsText:Show() - else - parentFrame.HonorPointsText:Hide() - end - if AJM.db.currConquestPoints == true then - parentFrame.ConquestPointsText:SetWidth( pointsWidth ) - parentFrame.ConquestPointsText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.ConquestPointsText:Show() - else - parentFrame.ConquestPointsText:Hide() - end - if AJM.db.currValor == true then - parentFrame.ValorText:SetWidth( pointsWidth ) - parentFrame.ValorText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.ValorText:Show() - else - parentFrame.ValorText:Hide() - end - if AJM.db.currTolBaradCommendation == true then - parentFrame.TolBaradCommendationText:SetWidth( pointsWidth ) - parentFrame.TolBaradCommendationText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.TolBaradCommendationText:Show() - else - parentFrame.TolBaradCommendationText:Hide() - end - if AJM.db.currChampionsSeal == true then - parentFrame.ChampionsSealText:SetWidth( pointsWidth ) - parentFrame.ChampionsSealText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.ChampionsSealText:Show() - else - parentFrame.ChampionsSealText:Hide() - end - if AJM.db.currIllustriousJewelcraftersToken == true then - parentFrame.IllustriousJewelcraftersTokenText:SetWidth( pointsWidth ) - parentFrame.IllustriousJewelcraftersTokenText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.IllustriousJewelcraftersTokenText:Show() - else - parentFrame.IllustriousJewelcraftersTokenText:Hide() - end - if AJM.db.currDalaranJewelcraftingToken == true then - parentFrame.DalaranJewelcraftingTokenText:SetWidth( pointsWidth ) - parentFrame.DalaranJewelcraftingTokenText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.DalaranJewelcraftingTokenText:Show() - else - parentFrame.DalaranJewelcraftingTokenText:Hide() - end - if AJM.db.currIronpawToken == true then - parentFrame.IronpawTokenText:SetWidth( pointsWidth ) - parentFrame.IronpawTokenText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.IronpawTokenText:Show() - else - parentFrame.IronpawTokenText:Hide() - end - if AJM.db.currLesserCharmOfGoodFortune == true then - parentFrame.LesserCharmOfGoodFortuneText:SetWidth( pointsWidth ) - parentFrame.LesserCharmOfGoodFortuneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.LesserCharmOfGoodFortuneText:Show() - else - parentFrame.LesserCharmOfGoodFortuneText:Hide() - end - if AJM.db.currElderCharmOfGoodFortune == true then - parentFrame.ElderCharmOfGoodFortuneText:SetWidth( pointsWidth ) - parentFrame.ElderCharmOfGoodFortuneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.ElderCharmOfGoodFortuneText:Show() - else - parentFrame.ElderCharmOfGoodFortuneText:Hide() - end - if AJM.db.currMoguRuneOfFate == true then - parentFrame.MoguRuneOfFateText:SetWidth( pointsWidth ) - parentFrame.MoguRuneOfFateText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.MoguRuneOfFateText:Show() - else - parentFrame.MoguRuneOfFateText:Hide() - end - if AJM.db.currWarforgedSeal == true then - parentFrame.WarforgedSealText:SetWidth( pointsWidth ) - parentFrame.WarforgedSealText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.WarforgedSealText:Show() - else - parentFrame.WarforgedSealText:Hide() - end - if AJM.db.currBloodyCoin == true then - parentFrame.BloodyCoinText:SetWidth( pointsWidth ) - parentFrame.BloodyCoinText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.BloodyCoinText:Show() - else - parentFrame.BloodyCoinText:Hide() - end - if AJM.db.currTimelessCoin == true then - parentFrame.TimelessCoinText:SetWidth( pointsWidth ) - parentFrame.TimelessCoinText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.TimelessCoinText:Show() - else - parentFrame.TimelessCoinText:Hide() - end - --ebony New WoD Currency - if AJM.db.currGarrisonResources == true then - parentFrame.GarrisonResourcesText:SetWidth( pointsWidth ) - parentFrame.GarrisonResourcesText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.GarrisonResourcesText:Show() - else - parentFrame.GarrisonResourcesText:Hide() - end - if AJM.db.currTemperedFate == true then - parentFrame.TemperedFateText:SetWidth( pointsWidth ) - parentFrame.TemperedFateText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.TemperedFateText:Show() - else - parentFrame.TemperedFateText:Hide() - end - if AJM.db.currApexisCrystal == true then - parentFrame.ApexisCrystalText:SetWidth( pointsWidth ) - parentFrame.ApexisCrystalText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.ApexisCrystalText:Show() - else - parentFrame.ApexisCrystalText:Hide() - end - if AJM.db.currDarkmoon == true then - parentFrame.DarkmoonText:SetWidth( pointsWidth ) - parentFrame.DarkmoonText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.DarkmoonText:Show() - else - parentFrame.DarkmoonText:Hide() - end - if AJM.db.currInevitableFate == true then - parentFrame.InevitableFateText:SetWidth( pointsWidth ) - parentFrame.InevitableFateText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.InevitableFateText:Show() - else - parentFrame.InevitableFateText:Hide() - end - if AJM.db.currOil == true then - parentFrame.OilText:SetWidth( pointsWidth ) - parentFrame.OilText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.OilText:Show() - else - parentFrame.OilText:Hide() - end - if AJM.db.currTimeWalker == true then - parentFrame.TimeWalkerText:SetWidth( pointsWidth ) - parentFrame.TimeWalkerText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint ) - left = left + pointsWidth + spacingWidth - numberOfPointsColumns = numberOfPointsColumns + 1 - parentFrame.TimeWalkerText:Show() - else - parentFrame.TimeWalkerText:Hide() - end - - -- Character rows. - for characterName, currencyFrameCharacterInfo in pairs( AJM.currencyFrameCharacterInfo ) do - --if JambaPrivate.Team.GetCharacterOnlineStatus (characterName) == false then - --AJM.Print("offline", characterName) - -- currencyFrameCharacterInfo.characterNameText:hide() - --end - local left = frameHorizontalSpacing - local characterRowTopPoint = currencyFrameCharacterInfo.characterRowTopPoint - currencyFrameCharacterInfo.characterNameText:SetWidth( nameWidth ) - currencyFrameCharacterInfo.characterNameText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + nameWidth + spacingWidth - if AJM.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 AJM.db.currHonorPoints == true then - currencyFrameCharacterInfo.HonorPointsText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.HonorPointsText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.HonorPointsText:Show() - else - currencyFrameCharacterInfo.HonorPointsText:Hide() - end - if AJM.db.currConquestPoints == true then - currencyFrameCharacterInfo.ConquestPointsText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.ConquestPointsText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.ConquestPointsText:Show() - else - currencyFrameCharacterInfo.ConquestPointsText:Hide() - end - if AJM.db.currValor == true then - currencyFrameCharacterInfo.ValorText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.ValorText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.ValorText:Show() - else - currencyFrameCharacterInfo.ValorText:Hide() - end - if AJM.db.currTolBaradCommendation == true then - currencyFrameCharacterInfo.TolBaradCommendationText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.TolBaradCommendationText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.TolBaradCommendationText:Show() - else - currencyFrameCharacterInfo.TolBaradCommendationText:Hide() - end - if AJM.db.currChampionsSeal == true then - currencyFrameCharacterInfo.ChampionsSealText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.ChampionsSealText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.ChampionsSealText:Show() - else - currencyFrameCharacterInfo.ChampionsSealText:Hide() - end - if AJM.db.currIllustriousJewelcraftersToken == true then - currencyFrameCharacterInfo.IllustriousJewelcraftersTokenText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.IllustriousJewelcraftersTokenText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.IllustriousJewelcraftersTokenText:Show() - else - currencyFrameCharacterInfo.IllustriousJewelcraftersTokenText:Hide() - end - if AJM.db.currDalaranJewelcraftingToken == true then - currencyFrameCharacterInfo.DalaranJewelcraftingTokenText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.DalaranJewelcraftingTokenText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.DalaranJewelcraftingTokenText:Show() - else - currencyFrameCharacterInfo.DalaranJewelcraftingTokenText:Hide() - end - if AJM.db.currIronpawToken == true then - currencyFrameCharacterInfo.IronpawTokenText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.IronpawTokenText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.IronpawTokenText:Show() - else - currencyFrameCharacterInfo.IronpawTokenText:Hide() - end - if AJM.db.currLesserCharmOfGoodFortune == true then - currencyFrameCharacterInfo.LesserCharmOfGoodFortuneText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.LesserCharmOfGoodFortuneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.LesserCharmOfGoodFortuneText:Show() - else - currencyFrameCharacterInfo.LesserCharmOfGoodFortuneText:Hide() - end - if AJM.db.currElderCharmOfGoodFortune == true then - currencyFrameCharacterInfo.ElderCharmOfGoodFortuneText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.ElderCharmOfGoodFortuneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.ElderCharmOfGoodFortuneText:Show() - else - currencyFrameCharacterInfo.ElderCharmOfGoodFortuneText:Hide() - end - if AJM.db.currMoguRuneOfFate == true then - currencyFrameCharacterInfo.MoguRuneOfFateText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.MoguRuneOfFateText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.MoguRuneOfFateText:Show() - else - currencyFrameCharacterInfo.MoguRuneOfFateText:Hide() - end - if AJM.db.currWarforgedSeal == true then - currencyFrameCharacterInfo.WarforgedSealText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.WarforgedSealText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.WarforgedSealText:Show() - else - currencyFrameCharacterInfo.WarforgedSealText:Hide() - end - if AJM.db.currBloodyCoin == true then - currencyFrameCharacterInfo.BloodyCoinText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.BloodyCoinText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.BloodyCoinText:Show() - else - currencyFrameCharacterInfo.BloodyCoinText:Hide() - end - if AJM.db.currTimelessCoin == true then - currencyFrameCharacterInfo.TimelessCoinText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.TimelessCoinText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.TimelessCoinText:Show() - else - currencyFrameCharacterInfo.TimelessCoinText:Hide() - end ---ebony New WoD Currency - if AJM.db.currGarrisonResources == true then - currencyFrameCharacterInfo.GarrisonResourcesText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.GarrisonResourcesText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.GarrisonResourcesText:Show() - else - currencyFrameCharacterInfo.GarrisonResourcesText:Hide() - end - if AJM.db.currTemperedFate == true then - currencyFrameCharacterInfo.TemperedFateText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.TemperedFateText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.TemperedFateText:Show() - else - currencyFrameCharacterInfo.TemperedFateText:Hide() - end - if AJM.db.currApexisCrystal == true then - currencyFrameCharacterInfo.ApexisCrystalText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.ApexisCrystalText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.ApexisCrystalText:Show() - else - currencyFrameCharacterInfo.ApexisCrystalText:Hide() - end - if AJM.db.currDarkmoon == true then - currencyFrameCharacterInfo.DarkmoonText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.DarkmoonText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.DarkmoonText:Show() - else - currencyFrameCharacterInfo.DarkmoonText:Hide() - end - if AJM.db.currInevitableFate == true then - currencyFrameCharacterInfo.InevitableFateText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.InevitableFateText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.InevitableFateText:Show() - else - currencyFrameCharacterInfo.InevitableFateText:Hide() - end - if AJM.db.currOil == true then - currencyFrameCharacterInfo.OilText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.OilText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.OilText:Show() - else - currencyFrameCharacterInfo.OilText:Hide() - end - if AJM.db.currTimeWalker == true then - currencyFrameCharacterInfo.TimeWalkerText:SetWidth( pointsWidth ) - currencyFrameCharacterInfo.TimeWalkerText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint ) - left = left + pointsWidth + spacingWidth - currencyFrameCharacterInfo.TimeWalkerText:Show() - else - currencyFrameCharacterInfo.TimeWalkerText:Hide() - 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 AJM.db.currGold == true then - if numberOfPointsColumns > 1 then - parentFrame.titleName:SetText( L["Jamba 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["Jamba Currency"] ) - end - end - parentFrame:SetWidth( finalParentWidth ) - -- Total Gold. - local nameLeft = frameHorizontalSpacing - local goldLeft = frameHorizontalSpacing + nameWidth + spacingWidth - --local guildTop = -35 - ((JambaApi.GetTeamListMaximumOrder() + 1) * 15) - 5 - --local goldTop = -35 - ((JambaApi.GetTeamListMaximumOrder() + 1) * 15) - 7 - local guildTop = -35 - ((JambaApi.GetTeamListMaximumOrderOnline() + 1) * 15) - 5 - local goldTop = -35 - ((JambaApi.GetTeamListMaximumOrderOnline() + 1) * 15) - 7 - if AJM.db.currGold == true then - if AJM.db.currGoldInGuildBank == true then - parentFrame.TotalGoldGuildTitleText:SetWidth( nameWidth ) - parentFrame.TotalGoldGuildTitleText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", nameLeft, guildTop ) - parentFrame.TotalGoldGuildTitleText:Show() - parentFrame.TotalGoldGuildText:SetWidth( goldWidth ) - parentFrame.TotalGoldGuildText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", goldLeft, guildTop ) - parentFrame.TotalGoldGuildText:Show() - --goldTop = -35 - ((JambaApi.GetTeamListMaximumOrder() + 2) * 15) - 5 - goldTop = -35 - ((JambaApi.GetTeamListMaximumOrderOnline() + 2) * 15) - 5 - else - parentFrame.TotalGoldGuildTitleText:Hide() - parentFrame.TotalGoldGuildText:Hide() - end - 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() - parentFrame.TotalGoldGuildTitleText:Hide() - parentFrame.TotalGoldGuildText:Hide() - - end -end - -function AJM:CreateJambaCurrencyFrameInfo( characterName, parentFrame ) - --AJM.Print("makelist", characterName) - local left = 10 - local spacing = 50 - local width = 50 - --local top = -35 + (-15 * JambaApi.GetPositionForCharacterName( characterName )) - local top = -35 + (-15 * JambaApi.GetPositionForCharacterNameOnline( characterName) ) - -- Create the table to hold the status bars for this character. - AJM.currencyFrameCharacterInfo[characterName] = {} - -- Get the character info table. - local currencyFrameCharacterInfo = AJM.currencyFrameCharacterInfo[characterName] - currencyFrameCharacterInfo.characterRowTopPoint = top - -- Set the characters name font string. - local frameCharacterName = AJM.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 = AJM.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 HonorPoints font string. - local frameHonorPoints = AJM.globalCurrencyFramePrefix.."HonorPoints" - local frameHonorPointsText = parentFrame:CreateFontString( frameHonorPoints.."Text", "OVERLAY", "GameFontNormal" ) - frameHonorPointsText:SetText( "0" ) - frameHonorPointsText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameHonorPointsText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameHonorPointsText:SetWidth( width ) - frameHonorPointsText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.HonorPointsText = frameHonorPointsText - left = left + spacing - -- Set the ConquestPoints font string. - local frameConquestPoints = AJM.globalCurrencyFramePrefix.."ConquestPoints" - local frameConquestPointsText = parentFrame:CreateFontString( frameConquestPoints.."Text", "OVERLAY", "GameFontNormal" ) - frameConquestPointsText:SetText( "0" ) - frameConquestPointsText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameConquestPointsText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameConquestPointsText:SetWidth( width ) - frameConquestPointsText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.ConquestPointsText = frameConquestPointsText - left = left + spacing - -- Set the Valor font string. - local frameValor = AJM.globalCurrencyFramePrefix.."Valor" - local frameValorText = parentFrame:CreateFontString( frameValor.."Text", "OVERLAY", "GameFontNormal" ) - frameValorText:SetText( "0" ) - frameValorText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameValorText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameValorText:SetWidth( width ) - frameValorText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.ValorText = frameValorText - left = left + spacing - -- Set the TolBaradCommendation font string. - local frameTolBaradCommendation = AJM.globalCurrencyFramePrefix.."TolBaradCommendation" - local frameTolBaradCommendationText = parentFrame:CreateFontString( frameTolBaradCommendation.."Text", "OVERLAY", "GameFontNormal" ) - frameTolBaradCommendationText:SetText( "0" ) - frameTolBaradCommendationText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameTolBaradCommendationText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameTolBaradCommendationText:SetWidth( width ) - frameTolBaradCommendationText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.TolBaradCommendationText = frameTolBaradCommendationText - left = left + spacing - -- Set the ChampionsSeal font string. - local frameChampionsSeal = AJM.globalCurrencyFramePrefix.."ChampionsSeal" - local frameChampionsSealText = parentFrame:CreateFontString( frameChampionsSeal.."Text", "OVERLAY", "GameFontNormal" ) - frameChampionsSealText:SetText( "0" ) - frameChampionsSealText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameChampionsSealText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameChampionsSealText:SetWidth( width ) - frameChampionsSealText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.ChampionsSealText = frameChampionsSealText - left = left + spacing - -- Set the IllustriousJewelcraftersToken font string. - local frameIllustriousJewelcraftersToken = AJM.globalCurrencyFramePrefix.."IllustriousJewelcraftersToken" - local frameIllustriousJewelcraftersTokenText = parentFrame:CreateFontString( frameIllustriousJewelcraftersToken.."Text", "OVERLAY", "GameFontNormal" ) - frameIllustriousJewelcraftersTokenText:SetText( "0" ) - frameIllustriousJewelcraftersTokenText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameIllustriousJewelcraftersTokenText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameIllustriousJewelcraftersTokenText:SetWidth( width ) - frameIllustriousJewelcraftersTokenText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.IllustriousJewelcraftersTokenText = frameIllustriousJewelcraftersTokenText - left = left + spacing - -- Set the DalaranJewelcraftingToken font string. - local frameDalaranJewelcraftingToken = AJM.globalCurrencyFramePrefix.."DalaranJewelcraftingToken" - local frameDalaranJewelcraftingTokenText = parentFrame:CreateFontString( frameDalaranJewelcraftingToken.."Text", "OVERLAY", "GameFontNormal" ) - frameDalaranJewelcraftingTokenText:SetText( "0" ) - frameDalaranJewelcraftingTokenText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameDalaranJewelcraftingTokenText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameDalaranJewelcraftingTokenText:SetWidth( width ) - frameDalaranJewelcraftingTokenText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.DalaranJewelcraftingTokenText = frameDalaranJewelcraftingTokenText - left = left + spacing - -- Set the IronpawToken font string. - local frameIronpawToken = AJM.globalCurrencyFramePrefix.."IronpawToken" - local frameIronpawTokenText = parentFrame:CreateFontString( frameIronpawToken.."Text", "OVERLAY", "GameFontNormal" ) - frameIronpawTokenText:SetText( "0" ) - frameIronpawTokenText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameIronpawTokenText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameIronpawTokenText:SetWidth( width ) - frameIronpawTokenText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.IronpawTokenText = frameIronpawTokenText - left = left + spacing - -- Set the LesserCharmOfGoodFortune font string. - local frameLesserCharmOfGoodFortune = AJM.globalCurrencyFramePrefix.."LesserCharmOfGoodFortune" - local frameLesserCharmOfGoodFortuneText = parentFrame:CreateFontString( frameLesserCharmOfGoodFortune.."Text", "OVERLAY", "GameFontNormal" ) - frameLesserCharmOfGoodFortuneText:SetText( "0" ) - frameLesserCharmOfGoodFortuneText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameLesserCharmOfGoodFortuneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameLesserCharmOfGoodFortuneText:SetWidth( width ) - frameLesserCharmOfGoodFortuneText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.LesserCharmOfGoodFortuneText = frameLesserCharmOfGoodFortuneText - left = left + spacing - -- Set the ElderCharmOfGoodFortune font string. - local frameElderCharmOfGoodFortune = AJM.globalCurrencyFramePrefix.."ElderCharmOfGoodFortune" - local frameElderCharmOfGoodFortuneText = parentFrame:CreateFontString( frameElderCharmOfGoodFortune.."Text", "OVERLAY", "GameFontNormal" ) - frameElderCharmOfGoodFortuneText:SetText( "0" ) - frameElderCharmOfGoodFortuneText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameElderCharmOfGoodFortuneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameElderCharmOfGoodFortuneText:SetWidth( width ) - frameElderCharmOfGoodFortuneText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.ElderCharmOfGoodFortuneText = frameElderCharmOfGoodFortuneText - left = left + spacing - -- Set the MoguRuneOfFate font string. - local frameMoguRuneOfFate = AJM.globalCurrencyFramePrefix.."MoguRuneOfFate" - local frameMoguRuneOfFateText = parentFrame:CreateFontString( frameMoguRuneOfFate.."Text", "OVERLAY", "GameFontNormal" ) - frameMoguRuneOfFateText:SetText( "0" ) - frameMoguRuneOfFateText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameMoguRuneOfFateText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameMoguRuneOfFateText:SetWidth( width ) - frameMoguRuneOfFateText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.MoguRuneOfFateText = frameMoguRuneOfFateText - left = left + spacing - -- Set the WarforgedSeal font string. - local frameWarforgedSeal = AJM.globalCurrencyFramePrefix.."WarforgedSeal" - local frameWarforgedSealText = parentFrame:CreateFontString( frameWarforgedSeal.."Text", "OVERLAY", "GameFontNormal" ) - frameWarforgedSealText:SetText( "0" ) - frameWarforgedSealText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameWarforgedSealText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameWarforgedSealText:SetWidth( width ) - frameWarforgedSealText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.WarforgedSealText = frameWarforgedSealText - left = left + spacing - -- Set the BloodyCoin font string. - local frameBloodyCoin = AJM.globalCurrencyFramePrefix.."BloodyCoin" - local frameBloodyCoinText = parentFrame:CreateFontString( frameBloodyCoin.."Text", "OVERLAY", "GameFontNormal" ) - frameBloodyCoinText:SetText( "0" ) - frameBloodyCoinText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameBloodyCoinText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameBloodyCoinText:SetWidth( width ) - frameBloodyCoinText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.BloodyCoinText = frameBloodyCoinText - left = left + spacing - -- Set the TimelessCoin font string. - local frameTimelessCoin = AJM.globalCurrencyFramePrefix.."TimelessCoin" - local frameTimelessCoinText = parentFrame:CreateFontString( frameTimelessCoin.."Text", "OVERLAY", "GameFontNormal" ) - frameTimelessCoinText:SetText( "0" ) - frameTimelessCoinText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameTimelessCoinText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameTimelessCoinText:SetWidth( width ) - frameTimelessCoinText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.TimelessCoinText = frameTimelessCoinText - left = left + spacing - --ebony New WoD Currency - -- Set the GarrisonResources font string. - local frameGarrisonResources = AJM.globalCurrencyFramePrefix.."GarrisonResources" - local frameGarrisonResourcesText = parentFrame:CreateFontString( frameGarrisonResources .."Text", "OVERLAY", "GameFontNormal" ) - frameGarrisonResourcesText:SetText( "0" ) - frameGarrisonResourcesText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameGarrisonResourcesText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameGarrisonResourcesText:SetWidth( width ) - frameGarrisonResourcesText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.GarrisonResourcesText = frameGarrisonResourcesText - left = left + spacing - -- Set the TemperedFate font string. - local frameTemperedFate = AJM.globalCurrencyFramePrefix.."TemperedFate" - local frameTemperedFateText = parentFrame:CreateFontString( frameTemperedFate .."Text", "OVERLAY", "GameFontNormal" ) - frameTemperedFateText:SetText( "0" ) - frameTemperedFateText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameTemperedFateText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameTemperedFateText:SetWidth( width ) - frameTemperedFateText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.TemperedFateText = frameTemperedFateText - left = left + spacing - -- Set the ApexisCrystal font string. - local frameApexisCrystal = AJM.globalCurrencyFramePrefix.."ApexisCrystal" - local frameApexisCrystalText = parentFrame:CreateFontString( frameApexisCrystal .."Text", "OVERLAY", "GameFontNormal" ) - frameApexisCrystalText:SetText( "0" ) - frameApexisCrystalText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameApexisCrystalText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameApexisCrystalText:SetWidth( width ) - frameApexisCrystalText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.ApexisCrystalText = frameApexisCrystalText - left = left + spacing - -- Set the Darkmoon font string. - local frameDarkmoon = AJM.globalCurrencyFramePrefix.."Darkmoon" - local frameDarkmoonText = parentFrame:CreateFontString( frameDarkmoon .."Text", "OVERLAY", "GameFontNormal" ) - frameDarkmoonText:SetText( "0" ) - frameDarkmoonText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameDarkmoonText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameDarkmoonText:SetWidth( width ) - frameDarkmoonText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.DarkmoonText = frameDarkmoonText - left = left + spacing - -- Set the InevitableFate font string. - local frameInevitableFate = AJM.globalCurrencyFramePrefix.."InevitableFate" - local frameInevitableFateText = parentFrame:CreateFontString( frameInevitableFate .."Text", "OVERLAY", "GameFontNormal" ) - frameInevitableFateText:SetText( "0" ) - frameInevitableFateText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameInevitableFateText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameInevitableFateText:SetWidth( width ) - frameInevitableFateText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.InevitableFateText = frameInevitableFateText - left = left + spacing - -- Set the Oil font string. - local frameOil = AJM.globalCurrencyFramePrefix.."Oil" - local frameOilText = parentFrame:CreateFontString( frameOil .."Text", "OVERLAY", "GameFontNormal" ) - frameOilText:SetText( "0" ) - frameOilText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameOilText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameOilText:SetWidth( width ) - frameOilText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.OilText = frameOilText - left = left + spacing - -- Set the TimeWalker font string. - local frameTimeWalker = AJM.globalCurrencyFramePrefix.."TimeWalker" - local frameTimeWalkerText = parentFrame:CreateFontString( frameTimeWalker .."Text", "OVERLAY", "GameFontNormal" ) - frameTimeWalkerText:SetText( "0" ) - frameTimeWalkerText:SetTextColor( 1.00, 1.00, 1.00, 1.00 ) - frameTimeWalkerText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top ) - frameTimeWalkerText:SetWidth( width ) - frameTimeWalkerText:SetJustifyH( "CENTER" ) - currencyFrameCharacterInfo.TimeWalkerText = frameTimeWalkerText - left = left + spacing -end - -function AJM:JambaToonHideCurrency() - JambaToonCurrencyListFrame:Hide() -end - -function AJM:JambaToonRequestCurrency() - --AJM.Print("DoRequestCurrency", characterName) - -- Colour red. - local r = 1.0 - local g = 0.0 - local b = 0.0 - local a = 0.6 - for characterName, currencyFrameCharacterInfo in pairs( AJM.currencyFrameCharacterInfo ) do - if JambaApi.GetCharacterOnlineStatus ( characterName ) == true then - -- AJM.Print("offlineRemove") - -- AJM.currencyFrameCharacterInfo[characterName] = nil - -- return - --else - currencyFrameCharacterInfo.GoldText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.characterNameText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.HonorPointsText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.ConquestPointsText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.ValorText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.TolBaradCommendationText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.ChampionsSealText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.IllustriousJewelcraftersTokenText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.DalaranJewelcraftingTokenText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.IronpawTokenText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.LesserCharmOfGoodFortuneText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.ElderCharmOfGoodFortuneText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.MoguRuneOfFateText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.WarforgedSealText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.BloodyCoinText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.TimelessCoinText:SetTextColor( r, g, b, a ) - --ebony New WoD Currency - currencyFrameCharacterInfo.GarrisonResourcesText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.TemperedFateText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.ApexisCrystalText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.DarkmoonText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.InevitableFateText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.OilText:SetTextColor( r, g, b, a ) - else - --AJM.currencyFrameCharacterInfo[characterName] = nil - --table.wipe( AJM.currentCurrencyValues ) - --AJM.currencyFrameCharacterInfo = {} - end - end - AJM.currencyTotalGold = 0 - if AJM.db.currGoldInGuildBank == true then - if IsInGuild() then - AJM.currencyTotalGold = GetGuildBankMoney() - end - end - AJM:JambaSendCommandToTeam( AJM.COMMAND_REQUEST_CURRENCY, "" ) - AJM.SettingsRefresh() -end - -function AJM:DoSendCurrency( characterName, dummyValue ) - table.wipe( AJM.currentCurrencyValues ) - AJM.currentCurrencyValues.currGold = GetMoney() - AJM.currentCurrencyValues.currHonorPoints = select( 2, GetCurrencyInfo( AJM.CHonorPoints ) ) - AJM.currentCurrencyValues.currConquestPoints = select( 2, GetCurrencyInfo( AJM.CConquestPoints ) ) - AJM.currentCurrencyValues.currValor = select( 2, GetCurrencyInfo( AJM.CValor ) ) - AJM.currentCurrencyValues.currTolBaradCommendation = select( 2, GetCurrencyInfo( AJM.CTolBaradCommendation ) ) - AJM.currentCurrencyValues.currChampionsSeal = select( 2, GetCurrencyInfo(AJM.CChampionsSeal ) ) - AJM.currentCurrencyValues.currIllustriousJewelcraftersToken = select( 2, GetCurrencyInfo( AJM.CIllustriousJewelcraftersToken ) ) - AJM.currentCurrencyValues.currDalaranJewelcraftingToken = select( 2, GetCurrencyInfo( AJM.CDalaranJewelcraftingToken ) ) - AJM.currentCurrencyValues.currIronpawToken = select( 2, GetCurrencyInfo( AJM.CIronpawToken ) ) - AJM.currentCurrencyValues.currLesserCharmOfGoodFortune = select( 2, GetCurrencyInfo( AJM.CLesserCharmOfGoodFortune ) ) - AJM.currentCurrencyValues.currElderCharmOfGoodFortune = select( 2, GetCurrencyInfo( AJM.CElderCharmOfGoodFortune ) ) - AJM.currentCurrencyValues.currMoguRuneOfFate = select( 2, GetCurrencyInfo( AJM.CMoguRuneOfFate ) ) - AJM.currentCurrencyValues.currWarforgedSeal = select( 2, GetCurrencyInfo( AJM.CWarforgedSeal ) ) - AJM.currentCurrencyValues.currBloodyCoin = select( 2, GetCurrencyInfo( AJM.CBloodyCoin ) ) - AJM.currentCurrencyValues.currTimelessCoin = select( 2, GetCurrencyInfo( AJM.CTimelessCoin ) ) - --ebony New WoD Currency - AJM.currentCurrencyValues.currGarrisonResources = select( 2, GetCurrencyInfo( AJM.CGarrisonResources ) ) - AJM.currentCurrencyValues.currTemperedFate = select( 2, GetCurrencyInfo( AJM.CTemperedFate ) ) - AJM.currentCurrencyValues.currApexisCrystal = select( 2, GetCurrencyInfo( AJM.CApexisCrystal ) ) - AJM.currentCurrencyValues.currDarkmoon = select( 2, GetCurrencyInfo( AJM.CDarkmoon ) ) - AJM.currentCurrencyValues.currInevitableFate = select( 2, GetCurrencyInfo( AJM.CInevitableFate ) ) - AJM.currentCurrencyValues.currOil = select( 2, GetCurrencyInfo( AJM.COil ) ) - AJM.currentCurrencyValues.currTimeWalker = select( 2, GetCurrencyInfo( AJM.CTimeWalker ) ) - AJM:JambaSendCommandToToon( characterName, AJM.COMMAND_HERE_IS_CURRENCY, AJM.currentCurrencyValues ) -end - -function AJM:DoShowToonsCurrency( characterName, currencyValues ) - --AJM.Print("DoShowCurrency", characterName) - --if JambaPrivate.Team.GetCharacterOnlineStatus( characterName ) == true then - local parentFrame = JambaToonCurrencyListFrame - -- Get (or create and get) the character information. - local currencyFrameCharacterInfo = AJM.currencyFrameCharacterInfo[characterName] - if currencyFrameCharacterInfo == nil then - AJM:CreateJambaCurrencyFrameInfo( characterName, parentFrame ) - currencyFrameCharacterInfo = AJM.currencyFrameCharacterInfo[characterName] - end - -- Colour white. - local r = 1.0 - local g = 1.0 - local b = 1.0 - local a = 1.0 - currencyFrameCharacterInfo.GoldText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.characterNameText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.HonorPointsText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.ConquestPointsText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.ValorText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.TolBaradCommendationText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.ChampionsSealText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.IllustriousJewelcraftersTokenText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.DalaranJewelcraftingTokenText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.IronpawTokenText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.LesserCharmOfGoodFortuneText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.ElderCharmOfGoodFortuneText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.MoguRuneOfFateText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.WarforgedSealText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.BloodyCoinText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.TimelessCoinText:SetTextColor( r, g, b, a ) - --ebony New WoD Currency - currencyFrameCharacterInfo.GarrisonResourcesText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.TemperedFateText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.ApexisCrystalText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.DarkmoonText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.InevitableFateText:SetTextColor( r, g, b, a ) - currencyFrameCharacterInfo.OilText:SetTextColor( r, g, b, a ) - -- Information. - currencyFrameCharacterInfo.GoldText:SetText( JambaUtilities:FormatMoneyString( currencyValues.currGold ) ) - currencyFrameCharacterInfo.HonorPointsText:SetText( currencyValues.currHonorPoints ) - currencyFrameCharacterInfo.ConquestPointsText:SetText( currencyValues.currConquestPoints ) - currencyFrameCharacterInfo.ValorText:SetText( currencyValues.currValor ) - currencyFrameCharacterInfo.TolBaradCommendationText:SetText( currencyValues.currTolBaradCommendation ) - currencyFrameCharacterInfo.ChampionsSealText:SetText( currencyValues.currChampionsSeal ) - currencyFrameCharacterInfo.IllustriousJewelcraftersTokenText:SetText( currencyValues.currIllustriousJewelcraftersToken ) - currencyFrameCharacterInfo.DalaranJewelcraftingTokenText:SetText( currencyValues.currDalaranJewelcraftingToken ) - currencyFrameCharacterInfo.IronpawTokenText:SetText( currencyValues.currIronpawToken ) - currencyFrameCharacterInfo.LesserCharmOfGoodFortuneText:SetText( currencyValues.currLesserCharmOfGoodFortune ) - currencyFrameCharacterInfo.ElderCharmOfGoodFortuneText:SetText( currencyValues.currElderCharmOfGoodFortune ) - currencyFrameCharacterInfo.MoguRuneOfFateText:SetText( currencyValues.currMoguRuneOfFate ) - currencyFrameCharacterInfo.WarforgedSealText:SetText( currencyValues.currWarforgedSeal ) - currencyFrameCharacterInfo.BloodyCoinText:SetText( currencyValues.currBloodyCoin ) - currencyFrameCharacterInfo.TimelessCoinText:SetText( currencyValues.currTimelessCoin ) - --ebony New WoD Currency - currencyFrameCharacterInfo.GarrisonResourcesText:SetText( currencyValues.currGarrisonResources ) - currencyFrameCharacterInfo.TemperedFateText:SetText( currencyValues.currTemperedFate ) - currencyFrameCharacterInfo.ApexisCrystalText:SetText( currencyValues.currApexisCrystal ) - currencyFrameCharacterInfo.DarkmoonText:SetText( currencyValues.currDarkmoon ) - currencyFrameCharacterInfo.InevitableFateText:SetText( currencyValues.currInevitableFate ) - currencyFrameCharacterInfo.OilText:SetText( currencyValues.currOil ) - currencyFrameCharacterInfo.TimeWalkerText:SetText( currencyValues.currTimeWalker ) - -- Total gold. - AJM.currencyTotalGold = AJM.currencyTotalGold + currencyValues.currGold - parentFrame.TotalGoldText:SetText( JambaUtilities:FormatMoneyString( AJM.currencyTotalGold ) ) - if IsInGuild() then - parentFrame.TotalGoldGuildText:SetText( JambaUtilities:FormatMoneyString( GetGuildBankMoney() ) ) - end - -- Update width of currency list. - AJM:CurrencyListSetColumnWidth() - JambaToonCurrencyListFrame:Show() - --end -end - -- A Jamba command has been received. function AJM:JambaOnCommandReceived( characterName, commandName, ... ) - if commandName == AJM.COMMAND_REQUEST_CURRENCY then - AJM:DoSendCurrency( characterName, ... ) + --AJM:Print("Test", characterName, commandName) + if commandName == AJM.COMMAND_RECOVER_TEAM then + AJM:doRecoverTeam() end - if commandName == AJM.COMMAND_HERE_IS_CURRENCY then - AJM:DoShowToonsCurrency( characterName, ... ) + if commandName == AJM.COMMAND_TEAM_DEATH then + AJM:doTeamDeath() end -end - -local function test2() - JambaUtilities:ClearTable( AJM.currencyFrameCharacterInfo ) - --AJM:CreateJambaToonCurrencyListFrame() - AJM.Print("clearTable") -end - -local function test() - --for characterName, currencyFrameCharacterInfo in pairs( AJM.currencyFrameCharacterInfo ) do - return pairs( AJM.currencyFrameCharacterInfo) -end -JambaApi.test = test -JambaApi.test2 = test2 \ No newline at end of file + if commandName == AJM.COMMAND_SOUL_STONE then + AJM:doSoulStone() + end +end \ No newline at end of file diff --git a/Jamba-Toon/Locales/JambaToon-Locale-enUS.lua b/Jamba-Toon/Locales/JambaToon-Locale-enUS.lua index 2127845..29bcd08 100644 --- a/Jamba-Toon/Locales/JambaToon-Locale-enUS.lua +++ b/Jamba-Toon/Locales/JambaToon-Locale-enUS.lua @@ -33,13 +33,13 @@ L["Combat"] = true L["Health / Mana"] = true L["Bag Space"] = true L["Bags Full!"] = true -L["Warn If All Regular Bags Are Full"] = true +L["Warn If Bags Are Full"] = true L["Bags Full Message"] = true -L["Warn If Hit First Time In Combat (Minion)"] = true +L["Warn If Hit First Time"] = true L["Hit First Time Message"] = true -L["Warn If Target Not Master On Combat (Minion)"] = true +L["Warn If Target Not Master"] = true L["Warn Target Not Master Message"] = true -L["Warn If Focus Not Master On Combat (Minion)"] = true +L["Warn If Focus Not Master"] = true L["Warn Focus Not Master Message"] = true L["Warn If My Health Drops Below"] = true L["Health Amount - Percentage Allowed Before Warning"] = true @@ -63,7 +63,7 @@ L["Repairing cost me: X"] = function( costString ) return string.format( "Repairing cost me: %s", costString ) end L["I am inactive!"] = true -L["Warn If Toon Goes Inactive (PVP)"] = true +L["Warn If Toon Goes Inactive"] = true L["Inactive Message"] = true -- Brgin special. -- This is the inactive buff - you need to make sure it is localized correctly. @@ -74,77 +74,30 @@ L["Crowd Control Message"] = true L["Warn If Toon Gets Crowd Control"] = true L["I Am"] = true L[" "] = true -L["Currency"] = true -L["Honor Points"] = true -L["HP"] = true -L["Conquest Points"] = true -L["CP"] = true -L["Valor Points"] = true -L["VP"] = true -L["TBC"] = true -L["Tol Barad Commendation"] = true -L["TBC"] = true -L["Champion's Seal"] = true -L["CS"] = true -L["Illustrious Jewelcrafter's Token"] = true -L["IJT"] = true -L["Dalaran Jewelcrafting Token"] = true -L["DJT"] = true -L["Ironpaw Token"] = true -L["IT"] = true -L["Epicurean's Award"] = true -L["EA"] = true -L["Lesser Charm of Good Fortune"] = true -L["LCGF"] = true -L["Elder Charm of Good Fortune"] = true -L["ECGF"] = true -L["Mogu Rune Of Fate"] = true -L["MROF"] = true -L["Timeless Coin"] = true -L["TC"] = true -L["Garrison Resources"] = true -L["GR"] = true -L["Seal of Tempered Fate"] = true -L["SoT"] = true -L["Apexis Crystal"] = true -L["AC"] = true -L["Darkmoon Prize Ticket"] = true -L["DPT"] = true -L["Bloody Coin"] = true -L["BC"] = true -L["Warforged Seal"] = true -L["WS"] = true -L["Seal of Inevitable Fate"] = true -L["SoI"] = true -L["OIL"] = true -L["Timewarped Badge"] = true -L["TwB"] = true -L["Show Currency"] = true -L["Show the current toon the currency values for all members in the team."] = true -L["Blizzard Tooltip"] = true -L["Blizzard Dialog Background"] = true -L["Curr"] = true -L["Jamba Currency"] = true -L["Update"] = true -L["Gold"] = true -L["Include Gold In Guild Bank"] = true -L["Total"] = true -L["Guild"] = true -L[" ("] = true -L[")"] = true -L["Currency Selection"] = true -L["Scale"] = true -L["Transparency"] = true -L["Border Style"] = true -L["Border Colour"] = true -L["Background"] = true -L["Background Colour"] = true -L["Appearance & Layout"] = true -L["Space For Name"] = true -L["Space For Gold"] = true -L["Space For Points"] = true -L["Space Between Values"] = true -L["Lock Currency List (enables mouse click-through)"] = true -L["Open Currency List On Start Up (Master Only)"] = true -L["Hide Currency"] = true -L["Hide the currency values for all members in the team."] = true \ No newline at end of file +L["Display Team Release Prompts"] = true +L["Release Team?"] = true +L["Release Team"] = true +L["Recover All Team Corpses?"] = true +L["I can not release to my Corpse for:"] = true +L[" Seconds"] = true +L["I Do not have a SoulStone"] = true + +--Jamba Help Tooltips +L["Display Team Release Popups when the Team Dies"] = true +L["Auto Repairs Toons Items When You Visit a Repair Merchant"] = true +L["Trys to Auto Repair With Guild Bank Funds"] = true +L["Pick a Message Area"] = true +L["Auto Deny All Guild Invites"] = true +L["Automatically Deny Duels From Players"] = true +L["Automatically Accept Resurrect Request"] = true +L["Display Team Release Popup Displays when the Team Dies"] = true +L["Automatically Accept Summon Requests"] = true +L["Warn If Hit First Time In Combat (Minion)"] = true +L["Warn If Target Not Master On Combat (Minion)"] = true +L["Warn If Focus Not Master On Combat (Minion)"] = true +L["Warn If All Minions Health Drops Below"] = true +L["Warn If all Minions Mana Drops Below"] = true +L["Warn If All Regular Bags Are Full"] = true +L["Warn If Toon Goes Inactive mosty for PVP"] = true +L["Warn If any Minion Gets Crowd Control"] = true +L["Automatically Deny All Guild Invites"] = true diff --git a/Jamba-Trade/Jamba-Trade.toc b/Jamba-Trade/Jamba-Trade.toc index 7d17337..43ce6e0 100644 --- a/Jamba-Trade/Jamba-Trade.toc +++ b/Jamba-Trade/Jamba-Trade.toc @@ -1,8 +1,10 @@ -## Interface: 60200 +## Interface: 70000 ## Title: JambaTrade ## Notes: JambaTrade ## Author: Ebony, Former Author: Jafula -## Version: 4.2.2 +## Version: 7.0.3-5.0 +## X-Category: Interface Enhancements +## X-Child-Of: Jamba ## Dependencies: Jamba ## SavedVariables: JambaTradeProfileDB ## LoadOnDemand: 1 diff --git a/Jamba-Trade/JambaTrade.lua b/Jamba-Trade/JambaTrade.lua index f0208fb..54492c8 100644 --- a/Jamba-Trade/JambaTrade.lua +++ b/Jamba-Trade/JambaTrade.lua @@ -40,7 +40,7 @@ AJM.settings = { frameRelativePoint = "CENTER", frameXOffset = 0, frameYOffset = 0, - showJambaTradeWindow = true, + showJambaTradeWindow = false, adjustMoneyWithGuildBank = false, goldAmountToKeepOnToon = 200, adjustMoneyWithMasterOnTrade = false, diff --git a/Jamba/AceGUIContainer-JambaWindow.lua b/Jamba/AceGUIContainer-JambaWindow.lua index a321f57..2906b35 100644 --- a/Jamba/AceGUIContainer-JambaWindow.lua +++ b/Jamba/AceGUIContainer-JambaWindow.lua @@ -3,17 +3,27 @@ Jamba4 - Jafula's Awesome Multi-Boxer Assistant Copyright 2008 - 2016 Michael "Jafula" Miller License: The MIT License +Changed to a Newer Ace3 By Ebony ]]-- --[[ File modified from AceGUI Window container. Used under Ace3 modified BSD licence. + +Really the olny thing changed is to lower the setframestata for InitializePopupDialogs. + ]]-- -local AceGUI = LibStub("AceGUI-3.0") +--[[----------------------------------------------------------------------------- +Frame Container +-------------------------------------------------------------------------------]] +local Type, Version = "JambaWindow", 2 +local AceGUI = LibStub and LibStub("AceGUI-3.0", true) +if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end -- Lua APIs local pairs, assert, type = pairs, assert, type +local wipe = table.wipe -- WoW APIs local PlaySound = PlaySound @@ -21,120 +31,83 @@ local CreateFrame, UIParent = CreateFrame, UIParent -- Global vars/functions that we don't upvalue since they might get hooked, or upgraded -- List them here for Mikk's FindGlobals script --- GLOBALS: GameFontNormal +-- GLOBALS: CLOSE ----------------- --- Main Frame -- ----------------- ---[[ - Events : - OnClose +--[[----------------------------------------------------------------------------- +Scripts +-------------------------------------------------------------------------------]] +local function Button_OnClick(frame) + PlaySound("gsTitleOptionExit") + frame.obj:Hide() +end -]] -do - local Type = "JambaWindow" - local Version = 1 +local function Frame_OnClose(frame) + frame.obj:Fire("OnClose") +end - local function frameOnClose(this) - this.obj:Fire("OnClose") - end - - local function closeOnClick(this) - PlaySound("gsTitleOptionExit") - this.obj:Hide() - end - - local function frameOnMouseDown(this) - AceGUI:ClearFocus() - end - - local function titleOnMouseDown(this) - this:GetParent():StartMoving() - AceGUI:ClearFocus() - end - - local function frameOnMouseUp(this) - local frame = this:GetParent() - frame:StopMovingOrSizing() - local self = frame.obj - local status = self.status or self.localstatus - status.width = frame:GetWidth() - status.height = frame:GetHeight() - status.top = frame:GetTop() - status.left = frame:GetLeft() - end - - local function sizerseOnMouseDown(this) - this:GetParent():StartSizing("BOTTOMRIGHT") - AceGUI:ClearFocus() - end - - local function sizersOnMouseDown(this) - this:GetParent():StartSizing("BOTTOM") - AceGUI:ClearFocus() - end - - local function sizereOnMouseDown(this) - this:GetParent():StartSizing("RIGHT") - AceGUI:ClearFocus() - end - - local function sizerOnMouseUp(this) - this:GetParent():StopMovingOrSizing() - end +local function Frame_OnMouseDown(frame) + AceGUI:ClearFocus() +end - local function SetTitle(self,title) - self.titletext:SetText(title) - end - - local function SetStatusText(self,text) - -- self.statustext:SetText(text) - end - - local function Hide(self) - self.frame:Hide() - end - - local function Show(self) - self.frame:Show() - end - - local function OnAcquire(self) +local function Title_OnMouseDown(frame) + frame:GetParent():StartMoving() + AceGUI:ClearFocus() +end + +local function MoverSizer_OnMouseUp(mover) + local frame = mover:GetParent() + frame:StopMovingOrSizing() + local self = frame.obj + local status = self.status or self.localstatus + status.width = frame:GetWidth() + status.height = frame:GetHeight() + status.top = frame:GetTop() + status.left = frame:GetLeft() +end + +local function SizerSE_OnMouseDown(frame) + frame:GetParent():StartSizing("BOTTOMRIGHT") + AceGUI:ClearFocus() +end + +local function SizerS_OnMouseDown(frame) + frame:GetParent():StartSizing("BOTTOM") + AceGUI:ClearFocus() +end + +local function SizerE_OnMouseDown(frame) + frame:GetParent():StartSizing("RIGHT") + AceGUI:ClearFocus() +end + +local function StatusBar_OnEnter(frame) + frame.obj:Fire("OnEnterStatusBar") +end + +local function StatusBar_OnLeave(frame) + frame.obj:Fire("OnLeaveStatusBar") +end + +--[[----------------------------------------------------------------------------- +Methods +-------------------------------------------------------------------------------]] +local methods = { + ["OnAcquire"] = function(self) self.frame:SetParent(UIParent) - self.frame:SetFrameStrata("LOW") + self.frame:SetFrameStrata("HIGH") + self:SetTitle() + self:SetStatusText() self:ApplyStatus() - --self:EnableResize(true) self:Show() - end - - local function OnRelease(self) + self:EnableResize(true) + end, + + ["OnRelease"] = function(self) self.status = nil - for k in pairs(self.localstatus) do - self.localstatus[k] = nil - end - end - - -- called to set an external table to store status in - local function SetStatusTable(self, status) - assert(type(status) == "table") - self.status = status - self:ApplyStatus() - end - - local function ApplyStatus(self) - local status = self.status or self.localstatus - local frame = self.frame - self:SetWidth(status.width or 760) - self:SetHeight(status.height or 660) - if status.top and status.left then - frame:SetPoint("TOP",UIParent,"BOTTOM",0,status.top) - frame:SetPoint("LEFT",UIParent,"LEFT",status.left,0) - else - frame:SetPoint("CENTER",UIParent,"CENTER") - end - end - - local function OnWidthSet(self, width) + wipe(self.localstatus) + end, + + ["OnWidthSet"] = function(self, width) local content = self.content local contentwidth = width - 34 if contentwidth < 0 then @@ -142,10 +115,9 @@ do end content:SetWidth(contentwidth) content.width = contentwidth - end - - - local function OnHeightSet(self, height) + end, + + ["OnHeightSet"] = function(self, height) local content = self.content local contentheight = height - 57 if contentheight < 0 then @@ -153,191 +125,204 @@ do end content:SetHeight(contentheight) content.height = contentheight + end, + + ["SetTitle"] = function(self, title) + self.titletext:SetText(title) + self.titlebg:SetWidth((self.titletext:GetWidth() or 0) + 10) + end, + + ["SetStatusText"] = function(self, text) + self.statustext:SetText(text) + end, + + ["Hide"] = function(self) + self.frame:Hide() + end, + + ["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") + self.status = status + self:ApplyStatus() + end, + + ["ApplyStatus"] = function(self) + local status = self.status or self.localstatus + local frame = self.frame + self:SetWidth(status.width or 700) + self:SetHeight(status.height or 500) + frame:ClearAllPoints() + if status.top and status.left then + frame:SetPoint("TOP", UIParent, "BOTTOM", 0, status.top) + frame:SetPoint("LEFT", UIParent, "LEFT", status.left, 0) + else + frame:SetPoint("CENTER") + end end - - --local function EnableResize(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 - - local function Constructor() - local frame = CreateFrame("Frame","JambaSettingsWindowsFrame",UIParent) - local self = {} - self.type = Type - - self.Hide = Hide - self.Show = Show - self.SetTitle = SetTitle - self.OnRelease = OnRelease - self.OnAcquire = OnAcquire - self.SetStatusText = SetStatusText - self.SetStatusTable = SetStatusTable - self.ApplyStatus = ApplyStatus - self.OnWidthSet = OnWidthSet - self.OnHeightSet = OnHeightSet - --self.EnableResize = EnableResize - - self.localstatus = {} - - self.frame = frame - frame.obj = self - frame:SetWidth(760) - frame:SetHeight(660) - frame:SetPoint("CENTER",UIParent,"CENTER",0,0) - frame:EnableMouse(true) - frame:SetMovable(true) - frame:SetResizable(true) - frame:SetFrameStrata("LOW") - frame:SetScript("OnMouseDown", frameOnMouseDown) - - frame:SetScript("OnHide",frameOnClose) - frame:SetMinResize(240,240) - frame:SetToplevel(true) - - local titlebg = frame:CreateTexture(nil, "BACKGROUND") - titlebg:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Title-Background]]) - titlebg:SetPoint("TOPLEFT", 9, -6) - titlebg:SetPoint("BOTTOMRIGHT", frame, "TOPRIGHT", -28, -24) - - local dialogbg = frame:CreateTexture(nil, "BACKGROUND") - dialogbg:SetTexture([[Interface\Tooltips\UI-Tooltip-Background]]) - dialogbg:SetPoint("TOPLEFT", 8, -24) - dialogbg:SetPoint("BOTTOMRIGHT", -6, 8) - dialogbg:SetVertexColor(0, 0, 0, .75) - - local topleft = frame:CreateTexture(nil, "BORDER") - topleft:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) - topleft:SetWidth(64) - topleft:SetHeight(64) - topleft:SetPoint("TOPLEFT") - topleft:SetTexCoord(0.501953125, 0.625, 0, 1) - - local topright = frame:CreateTexture(nil, "BORDER") - topright:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) - topright:SetWidth(64) - topright:SetHeight(64) - topright:SetPoint("TOPRIGHT") - topright:SetTexCoord(0.625, 0.75, 0, 1) - - local top = frame:CreateTexture(nil, "BORDER") - top:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) - top:SetHeight(64) - top:SetPoint("TOPLEFT", topleft, "TOPRIGHT") - top:SetPoint("TOPRIGHT", topright, "TOPLEFT") - top:SetTexCoord(0.25, 0.369140625, 0, 1) - - local bottomleft = frame:CreateTexture(nil, "BORDER") - bottomleft:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) - bottomleft:SetWidth(64) - bottomleft:SetHeight(64) - bottomleft:SetPoint("BOTTOMLEFT") - bottomleft:SetTexCoord(0.751953125, 0.875, 0, 1) - - local bottomright = frame:CreateTexture(nil, "BORDER") - bottomright:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) - bottomright:SetWidth(64) - bottomright:SetHeight(64) - bottomright:SetPoint("BOTTOMRIGHT") - bottomright:SetTexCoord(0.875, 1, 0, 1) - - local bottom = frame:CreateTexture(nil, "BORDER") - bottom:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) - bottom:SetHeight(64) - bottom:SetPoint("BOTTOMLEFT", bottomleft, "BOTTOMRIGHT") - bottom:SetPoint("BOTTOMRIGHT", bottomright, "BOTTOMLEFT") - bottom:SetTexCoord(0.376953125, 0.498046875, 0, 1) - - local left = frame:CreateTexture(nil, "BORDER") - left:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) - left:SetWidth(64) - left:SetPoint("TOPLEFT", topleft, "BOTTOMLEFT") - left:SetPoint("BOTTOMLEFT", bottomleft, "TOPLEFT") - left:SetTexCoord(0.001953125, 0.125, 0, 1) - - local right = frame:CreateTexture(nil, "BORDER") - right:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]]) - right:SetWidth(64) - right:SetPoint("TOPRIGHT", topright, "BOTTOMRIGHT") - right:SetPoint("BOTTOMRIGHT", bottomright, "TOPRIGHT") - right:SetTexCoord(0.1171875, 0.2421875, 0, 1) - - local close = CreateFrame("Button", nil, frame, "UIPanelCloseButton") - close:SetPoint("TOPRIGHT", 2, 1) - close:SetScript("OnClick", closeOnClick) - self.closebutton = close - close.obj = self - - local titletext = frame:CreateFontString(nil, "ARTWORK") - titletext:SetFontObject(GameFontNormal) - titletext:SetPoint("TOPLEFT", 12, -8) - titletext:SetPoint("TOPRIGHT", -32, -8) - self.titletext = titletext - - local title = CreateFrame("Button", nil, frame) - title:SetPoint("TOPLEFT", titlebg) - title:SetPoint("BOTTOMRIGHT", titlebg) - title:EnableMouse() - title:SetScript("OnMouseDown",titleOnMouseDown) - title:SetScript("OnMouseUp", frameOnMouseUp) - self.title = title - - --local sizer_se = CreateFrame("Frame",nil,frame) - --sizer_se:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,0) - --sizer_se:SetWidth(25) - --sizer_se:SetHeight(25) - --sizer_se:EnableMouse() - --sizer_se:SetScript("OnMouseDown",sizerseOnMouseDown) - --sizer_se:SetScript("OnMouseUp", sizerOnMouseUp) - --self.sizer_se = sizer_se - -- - --local line1 = sizer_se:CreateTexture(nil, "BACKGROUND") - --self.line1 = line1 - --line1:SetWidth(14) - --line1:SetHeight(14) - --line1:SetPoint("BOTTOMRIGHT", -8, 8) - --line1:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border") - --local x = 0.1 * 14/17 - --line1:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5) - -- - --local line2 = sizer_se:CreateTexture(nil, "BACKGROUND") - --self.line2 = line2 - --line2:SetWidth(8) - --line2:SetHeight(8) - --line2:SetPoint("BOTTOMRIGHT", -8, 8) - --line2:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border") - --local x = 0.1 * 8/17 - --line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5) - -- - --local sizer_s = CreateFrame("Frame",nil,frame) - --sizer_s:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-25,0) - --sizer_s:SetPoint("BOTTOMLEFT",frame,"BOTTOMLEFT",0,0) - --sizer_s:SetHeight(25) - --sizer_s:EnableMouse() - --sizer_s:SetScript("OnMouseDown",sizersOnMouseDown) - --sizer_s:SetScript("OnMouseUp", sizerOnMouseUp) - --self.sizer_s = sizer_s - -- - --local sizer_e = CreateFrame("Frame",nil,frame) - --sizer_e:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,25) - --sizer_e:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,0) - --sizer_e:SetWidth(25) - --sizer_e:EnableMouse() - --sizer_e:SetScript("OnMouseDown",sizereOnMouseDown) - --sizer_e:SetScript("OnMouseUp", sizerOnMouseUp) - --self.sizer_e = sizer_e - - --Container Support - local content = CreateFrame("Frame",nil,frame) - self.content = content - content.obj = self - content:SetPoint("TOPLEFT",frame,"TOPLEFT",12,-32) - content:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-12,13) - - AceGUI:RegisterAsContainer(self) - return self +} + +--[[----------------------------------------------------------------------------- +Constructor +-------------------------------------------------------------------------------]] +local FrameBackdrop = { + bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", + edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", + tile = true, tileSize = 32, edgeSize = 32, + insets = { left = 8, right = 8, top = 8, bottom = 8 } +} + +local PaneBackdrop = { + bgFile = "Interface\\ChatFrame\\ChatFrameBackground", + edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", + tile = true, tileSize = 16, edgeSize = 16, + insets = { left = 3, right = 3, top = 5, bottom = 3 } +} + +local function Constructor() + local frame = CreateFrame("Frame", nil, UIParent) + frame:Hide() + + frame:EnableMouse(true) + frame:SetMovable(true) + frame:SetResizable(true) + --frame:SetFrameStrata("FULLSCREEN_DIALOG") + frame:SetFrameStrata("HIGH") + frame:SetBackdrop(FrameBackdrop) + frame:SetBackdropColor(0, 0, 0, 1) + frame:SetMinResize(400, 200) + frame:SetToplevel(true) + frame:SetScript("OnHide", Frame_OnClose) + frame:SetScript("OnMouseDown", Frame_OnMouseDown) + + local closebutton = CreateFrame("Button", nil, frame, "UIPanelButtonTemplate") + closebutton:SetScript("OnClick", Button_OnClick) + closebutton:SetPoint("BOTTOMRIGHT", -27, 17) + closebutton:SetHeight(20) + closebutton:SetWidth(100) + closebutton:SetText(CLOSE) + + local statusbg = CreateFrame("Button", nil, frame) + statusbg:SetPoint("BOTTOMLEFT", 15, 15) + statusbg:SetPoint("BOTTOMRIGHT", -132, 15) + statusbg:SetHeight(24) + statusbg:SetBackdrop(PaneBackdrop) + statusbg:SetBackdropColor(0.1,0.1,0.1) + statusbg:SetBackdropBorderColor(0.4,0.4,0.4) + statusbg:SetScript("OnEnter", StatusBar_OnEnter) + statusbg:SetScript("OnLeave", StatusBar_OnLeave) + + local statustext = statusbg:CreateFontString(nil, "OVERLAY", "GameFontNormal") + statustext:SetPoint("TOPLEFT", 7, -2) + statustext:SetPoint("BOTTOMRIGHT", -7, 2) + statustext:SetHeight(20) + statustext:SetJustifyH("LEFT") + statustext:SetText("") + + local titlebg = frame:CreateTexture(nil, "OVERLAY") + titlebg:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header") + titlebg:SetTexCoord(0.31, 0.67, 0, 0.63) + titlebg:SetPoint("TOP", 0, 12) + titlebg:SetWidth(100) + titlebg:SetHeight(40) + + local title = CreateFrame("Frame", nil, frame) + title:EnableMouse(true) + title:SetScript("OnMouseDown", Title_OnMouseDown) + title:SetScript("OnMouseUp", MoverSizer_OnMouseUp) + title:SetAllPoints(titlebg) + + local titletext = title:CreateFontString(nil, "OVERLAY", "GameFontNormal") + titletext:SetPoint("TOP", titlebg, "TOP", 0, -14) + + local titlebg_l = frame:CreateTexture(nil, "OVERLAY") + titlebg_l:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header") + titlebg_l:SetTexCoord(0.21, 0.31, 0, 0.63) + titlebg_l:SetPoint("RIGHT", titlebg, "LEFT") + titlebg_l:SetWidth(30) + titlebg_l:SetHeight(40) + + local titlebg_r = frame:CreateTexture(nil, "OVERLAY") + titlebg_r:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header") + titlebg_r:SetTexCoord(0.67, 0.77, 0, 0.63) + titlebg_r:SetPoint("LEFT", titlebg, "RIGHT") + titlebg_r:SetWidth(30) + titlebg_r:SetHeight(40) + + local sizer_se = CreateFrame("Frame", nil, frame) + sizer_se:SetPoint("BOTTOMRIGHT") + sizer_se:SetWidth(25) + sizer_se:SetHeight(25) + sizer_se:EnableMouse() + sizer_se:SetScript("OnMouseDown",SizerSE_OnMouseDown) + sizer_se:SetScript("OnMouseUp", MoverSizer_OnMouseUp) + + local line1 = sizer_se:CreateTexture(nil, "BACKGROUND") + line1:SetWidth(14) + line1:SetHeight(14) + line1:SetPoint("BOTTOMRIGHT", -8, 8) + line1:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border") + local x = 0.1 * 14/17 + line1:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5) + + local line2 = sizer_se:CreateTexture(nil, "BACKGROUND") + line2:SetWidth(8) + line2:SetHeight(8) + line2:SetPoint("BOTTOMRIGHT", -8, 8) + line2:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border") + local x = 0.1 * 8/17 + line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5) + + local sizer_s = CreateFrame("Frame", nil, frame) + sizer_s:SetPoint("BOTTOMRIGHT", -25, 0) + sizer_s:SetPoint("BOTTOMLEFT") + sizer_s:SetHeight(25) + sizer_s:EnableMouse(true) + sizer_s:SetScript("OnMouseDown", SizerS_OnMouseDown) + sizer_s:SetScript("OnMouseUp", MoverSizer_OnMouseUp) + + local sizer_e = CreateFrame("Frame", nil, frame) + sizer_e:SetPoint("BOTTOMRIGHT", 0, 25) + sizer_e:SetPoint("TOPRIGHT") + sizer_e:SetWidth(25) + sizer_e:EnableMouse(true) + sizer_e:SetScript("OnMouseDown", SizerE_OnMouseDown) + sizer_e:SetScript("OnMouseUp", MoverSizer_OnMouseUp) + + --Container Support + local content = CreateFrame("Frame", nil, frame) + content:SetPoint("TOPLEFT", 17, -27) + content:SetPoint("BOTTOMRIGHT", -17, 40) + + local widget = { + localstatus = {}, + titletext = titletext, + statustext = statustext, + titlebg = titlebg, + sizer_se = sizer_se, + sizer_s = sizer_s, + sizer_e = sizer_e, + content = content, + frame = frame, + type = Type + } + for method, func in pairs(methods) do + widget[method] = func end - - AceGUI:RegisterWidgetType(Type,Constructor,Version) + closebutton.obj, statusbg.obj = widget, widget + + return AceGUI:RegisterAsContainer(widget) end + +AceGUI:RegisterWidgetType(Type, Constructor, Version) diff --git a/Jamba/CHANGELOG.txt b/Jamba/CHANGELOG.txt index 889c175..0c71037 100644 --- a/Jamba/CHANGELOG.txt +++ b/Jamba/CHANGELOG.txt @@ -1,18 +1,135 @@ -Jamba Version: 4.2.2 -WoW Game Version: 6.2.4 -Release Date: 21/1/2016 -Modules: AdvancedLoot, Core, Display-Team, Follow, FTL, ItemUse, Macro, Proc, Purchase, Quest, Sell, Talk, Target, Taxi, Toon, Trade +--------------------------- +ChangeLogs: +--------------------------- +Jamba Version: 5.0.1 +WoW Game Version: 7.0.3 +Release Date: 19/07/2016 +Modules: AdvancedLoot, Core, Display-Team, Follow, FTL, ItemUse, Macro, Purchase, Quest, Sell, Talk, Target, Taxi, Toon, Curr, Trade -- Jamba-team - Fixed Battle.net changes for Patch 6.2.4 +Initial Legion Release. -* Jamba-Macro - - Tag Sould nolonger set the realm name if playing from the same realm. thanks to Sonof from dual-boxing for the bug report. +*Jamba-Proc + -Removed + -As it's not updated anymore and I don't feel i can do it any better than other addons out there. ( i feel my time can be spent better somewhere else on the project) + -You can download this as a separate Download. + -See information at http://www.dual-boxing.com/threads/52151-Addon-Jamba-4-0-An-assistant-for-Multiboxers-Release-for-WoW-6?p=402394&viewfull=1#post402394 + +*Jamba-Core + - Some Back-End Work for Legion/7.0.x + - New tooltips on the options config to help make it easier to understand what some buttons to do and to clean up some of the long line texts. + - Changed Help to Commands - as it shows more of the command Line stuff. + - If a Module is not loaded on all characters then it no longer Lua-Error and tells the client what Module will need to be loaded. + - Updated LibActionButton + - Updated AceGUI-3.0-SharedMediaWidgets + - Updated settings Frame for config. Resize and close button. + - added some News to the GUIConfig page. + +*Jamba-Team + - Added two new ways to add team members to the team with the command line and GUI. + @target will add your current target to the team list + @mouseOver Will add your current MouseOver to the team list. + - cleaned up some loot code. and some offline code. + - Loot can olny be set to Group/FFA/Personal. ( Olny works in a Instances ) + + +* Jamba-Quest-Tracker + -Renamed from Jamba Quest Watcher to Jamba Objective Tracker(To fit in line with blizzards own naming) + - Now Shows Scenario Objective on the watcher. + - Shows Bouns Scenario Objective. + - Fixed with Broken Shore QuestLines a % bar needed coding in. + - Only Show stage if there is more the one stage (so does not show in dungeons.) + - Added support to change the font And text size + - Now automatically sets the frame to the Right Hand Side of the UI. + +* Jamba-Quest + - A big thanks to Schilm from dual-boxing.com to the new changes. little edited by me + - Added buttons to blizzard Quest Rightclick Dropdown Menu to Track and un-track and to abandon all quests. + -New Bar Now part of the QuestMap Frame. with new buttons + -Abandon All + -Works just like it used to. It loops through all of your toons and abandons all the quests on each toon. + -Now ignores quests that cannot be abandoned, such as the Account Wide quests Luxlunae mentioned. + -Share All + -Used to just loop through the current toons quests and just shared those, NOW loops through all toons and attempts to share all Quests from all toons. + -Track All + -Back from the abyss!!! + -Used to just loop through the current toons quests and just tracked those, NOW loops through all toons and attempts to track all Quests from all toons. + -Untrack All + -Back from the abyss!!! + -Used to just loop through the current toons quests and just untracked those, NOW loops through all toons and attempts to un-tracks all Quests from all toons. + + +*Jamba-Display-Team + - Values are now Abbreviated to smaller Numbers. + - No longer Shows max Value when showing Percentage + - Added support to change the font And text size + - Added a NewTooltip when you hover over Follow bar to show + - Level of minion If not level capped. + - ItemLevel of minion. + - Durability of the minion. + - Bag Space of the minion. + - Gold of the minion. + - Mail if the minion has mail and who it is from (Same as minimap) + - Tooltip should no longer show in combat. + - Removed the old Display Bag Space Bar added to tooltips + - Renamed "Combo PointBar" to "Class Power Bar" + - Added Support for Other class Power + -Warlocks - Soul Shards + -Paladin - Holy Power + -DeathKight - Runes + -Mage - ARCANE CHARGES + -Monk - CHI + + - Removed the Old Reputation bar. + - Changes to the XP bar. + - Your can show up for four XP Bars For the 4 XP type each bar is on the same XP frame and makes each bar a little smaller. + - Xp, Players XP. + - Artifact XP, Show the players weapon Artifact XP. + - Show Honor XP, Show a bar for the new honor xp bar. + - Show Reputation, show a bar for Reputation + - Added new checks to fix The FollowDance when spamming follow key. + - You can now specify the number of characters per row up to 10. + +*Jamba-Toon + - Removed Jamba-Currency From the toon module + - Added Team Release Prompts when you die to Release the spirits of all minions. And release back to the minions bodies. + +* New Module Jamba-Curr + - All Currency Information + **- You can now add Currency IDs with one line in the config file if you need to. + - There is a now a DropDown Box to show the Currency's you like to show + - You can Have a max of 6 Currencies. + - Now shows Currency Icon Then The Three Letters of text. + - Now shows the Currency Gold Icons when showing gold/Sliver/Copper + - No Longer Shows Currency for Offline minions. + - Should Now Order minions That are Offline/Online correctly. + - Added support to change the font And text size. + +* Jamba-Taxi + - Fixed a Frame Bug with The new flight maps in broken island (Legion Zones) + +* Jamba-AdvancedLoot + - Fixed a text bug that was not working with trade goods. (cloth) + - Personal-Loot OverRights The Advanced Loot list. + +* Jamba-ItemUse + - You can now Use spells on the item bar without errors. + - Now Automatically sets to the Bottom Right then the center of the UI. +* Jamba-Follow + - Made some backend checks to make sure follow has been really been broken. (spamming follow key should not spam "follow Borken") + - NoLonger warns if the player is on a taxi +* Jamba-FTL + - Added an option to turn of the Messages in chat when updating FTL... + +* Jamba-Message + - Moved in options to Chat from Advanced + ----------------------- -Jamba Version: 4.2.2 + + +Jamba Version: 4.2.1 WoW Game Version: 6.2.3 Release Date: 21/1/2016 Modules: AdvancedLoot, Core, Display-Team, Follow, FTL, ItemUse, Macro, Proc, Purchase, Quest, Sell, Talk, Target, Taxi, Toon, Trade diff --git a/Jamba/Jamba.toc b/Jamba/Jamba.toc index b29ac68..3572ec1 100644 --- a/Jamba/Jamba.toc +++ b/Jamba/Jamba.toc @@ -1,8 +1,8 @@ -## Interface: 60200 +## Interface: 70000 ## Title: Jamba ## Notes: Jamba ## Author: Ebony, Former Author: Jafula -## Version: 4.2.2 +## Version: 7.0.3-5.0 ## SavedVariables: JambaCoreProfileDB, JambaCommunicationsProfileDB, JambaTeamProfileDB, JambaTagProfileDB, JambaMessageProfileDB JambaEmbeds.xml JambaUtilities.lua diff --git a/Jamba/JambaCore.lua b/Jamba/JambaCore.lua index 25b8bb5..3e23291 100644 --- a/Jamba/JambaCore.lua +++ b/Jamba/JambaCore.lua @@ -39,7 +39,11 @@ local AceGUI = LibStub("AceGUI-3.0") -- Create frame for Jamba Settings. JambaPrivate.SettingsFrame = {} JambaPrivate.SettingsFrame.Widget = AceGUI:Create( "JambaWindow" ) -JambaPrivate.SettingsFrame.Widget:SetTitle( L["Jamba"].." "..GetAddOnMetadata("Jamba", "version").." - "..L["Jafula's Awesome Multi-Boxer Assistant"] ) +--JambaPrivate.SettingsFrame.Widget = AceGUI:Create( "Frame" ) +JambaPrivate.SettingsFrame.Widget:SetTitle( L["Jamba"].." "..L["Version"] ) +JambaPrivate.SettingsFrame.Widget:SetStatusText(L["The Awesome Multi-Boxer Assistant"]) +JambaPrivate.SettingsFrame.Widget:SetWidth(800) +JambaPrivate.SettingsFrame.Widget:SetHeight(650) JambaPrivate.SettingsFrame.Widget:SetLayout( "Fill" ) JambaPrivate.SettingsFrame.WidgetTree = AceGUI:Create( "TreeGroup" ) JambaPrivate.SettingsFrame.TreeGroupStatus = { treesizable = false, groups = {} } @@ -50,7 +54,7 @@ JambaPrivate.SettingsFrame.WidgetTree:SetLayout( "Fill" ) function AJM:OnEnable() if AJM.db.showStartupMessage4000 then - JambaStartupMessageFrameTitle:SetText( L["Jamba"].." "..GetAddOnMetadata("Jamba", "version").." - "..L["Release Notes / News"] ) + JambaStartupMessageFrameTitle:SetText( L["Jamba"].." "..GetAddOnMetadata("Jamba", "version").." - "..L["Full Change Log"] ) --JambaStartupMessageFrame:Show() AJM.db.showStartupMessage4000 = false end @@ -59,6 +63,11 @@ end function AJM:OnDisable() end +function AJM:ShowChangeLog() + JambaStartupMessageFrameTitle:SetText( L["Jamba"].." "..GetAddOnMetadata("Jamba", "version").." - "..L["Full Change Log"] ) + JambaStartupMessageFrame:Show() +end + local function JambaSettingsTreeSort( a, b ) local aText = "" local bText = "" @@ -312,13 +321,18 @@ end -- Settings are received, pass them to the relevant module. local function OnSettingsReceived( sender, moduleName, settings ) - sender = JambaUtilities:AddRealmToNameIfMissing( sender ) --AJM:Print("onsettings", sender, moduleName ) -- Get the address of the module. local moduleAddress = AJM.registeredModulesByName[moduleName] - -- Pass the module its settings. - moduleAddress:JambaOnSettingsReceived( sender, settings ) + -- can not receive a message from a Module not Loaded so ignore it. Better tell them its not loaded --ebony. + if moduleAddress == nil then + AJM:Print(L["Module Not Loaded:"], moduleName) + return + else + -- loaded? Pass the module its settings. + moduleAddress:JambaOnSettingsReceived( sender, settings ) + end end function AJM:SendSettingsAllModules() @@ -329,6 +343,7 @@ function AJM:SendSettingsAllModules() end end + ------------------------------------------------------------------------------------------------------------- -- Commands sending and receiving. ------------------------------------------------------------------------------------------------------------- @@ -507,8 +522,7 @@ function AJM:OnInitialize() -- Register the chat command. AJM:RegisterChatCommand( AJM.chatCommand, "JambaChatCommand" ) -- Attempt to load modules, if they are disabled, they won't be loaded. - -- TODO: This kinda defeats the purpose of the module system if we have to update core each time a module is added - -- TODO: Also, did the load on demand stuff actually work? + -- TODO: This kinda defeats the purpose of the module system if we have to update core each time a module is added. AJM:LoadJambaModule( "Jamba-AdvancedLoot" ) AJM:LoadJambaModule( "Jamba-DisplayTeam" ) AJM:LoadJambaModule( "Jamba-Follow" ) @@ -526,6 +540,8 @@ function AJM:OnInitialize() AJM:LoadJambaModule( "Jamba-Toon" ) AJM:LoadJambaModule( "Jamba-Trade" ) AJM:LoadJambaModule( "Jamba-Video" ) + AJM:LoadJambaModule( "Jamba-Curr" ) + AJM:LoadJambaModule( "Jamba-Mount" ) end function AJM:LoadJambaModule( moduleName ) @@ -539,7 +555,7 @@ end function AJM:CoreSettingsCreateInfo( top ) -- Get positions and dimensions. - local buttonPushAllSettingsWidth = 300 + local buttonPushAllSettingsWidth = 200 local buttonHeight = JambaHelperSettings:GetButtonHeight() local checkBoxHeight = JambaHelperSettings:GetCheckBoxHeight() local radioBoxHeight = JambaHelperSettings:GetRadioBoxHeight() @@ -555,144 +571,180 @@ function AJM:CoreSettingsCreateInfo( top ) local indentSpecial = indentContinueLabel + 9 local checkBoxThirdWidth = (headingWidth - indentContinueLabel) / 3 local column1Left = left + local column2Left = column1Left + checkBoxThirdWidth + horizontalSpacing local column1LeftIndent = left + indentContinueLabel local column2LeftIndent = column1LeftIndent + checkBoxThirdWidth + horizontalSpacing local column3LeftIndent = column2LeftIndent + checkBoxThirdWidth + horizontalSpacing local movingTop = top - - JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Jafula's Awesome Multi-Boxer Assistant"], movingTop, false ) + --Main Heading + JambaHelperSettings:CreateHeading( AJM.settingsControl, L["The Awesome Multi-Boxer Assistant"], movingTop, false ) movingTop = movingTop - headingHeight - AJM.settingsControl.labelInformation1 = JambaHelperSettings:CreateContinueLabel( AJM.settingsControl, headingWidth, column1Left, movingTop, - L["Copyright 2008-2016 Michael 'Jafula' Miller, Now managed By Ebony"] + L["Current Project Manager - Jennifer 'Ebony'"] ) - movingTop = movingTop - labelContinueHeight - - AJM.settingsControl.labelInformation2 = JambaHelperSettings:CreateContinueLabel( + movingTop = movingTop + movingTop * 2 + JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Release Notes / News: "]..GetAddOnMetadata("jamba", "version") , movingTop, false ) + movingTop = movingTop - headingHeight + AJM.settingsControl.labelInformation10 = JambaHelperSettings:CreateContinueLabel( AJM.settingsControl, headingWidth, column1Left, movingTop, - L["Made For MultiBoxing"] - ) + L["Text1"] + ) movingTop = movingTop - labelContinueHeight - - AJM.settingsControl.labelInformation3 = JambaHelperSettings:CreateContinueLabel( + AJM.settingsControl.labelInformation11 = JambaHelperSettings:CreateContinueLabel( AJM.settingsControl, headingWidth, column1Left, movingTop, - "" + L["Text2"] ) movingTop = movingTop - labelContinueHeight - - AJM.settingsControl.labelInformation4 = JambaHelperSettings:CreateContinueLabel( + AJM.settingsControl.labelInformation12 = JambaHelperSettings:CreateContinueLabel( AJM.settingsControl, headingWidth, column1Left, movingTop, - L["For user manuals and documentation please visit:"] + L["Text3"] ) movingTop = movingTop - labelContinueHeight - - AJM.settingsControl.labelInformation5 = JambaHelperSettings:CreateContinueLabel( + AJM.settingsControl.labelInformation13 = JambaHelperSettings:CreateContinueLabel( AJM.settingsControl, headingWidth, column1Left, movingTop, - L["Other useful websites:"] + L["Text4"] ) movingTop = movingTop - labelContinueHeight - - AJM.settingsControl.labelInformation6 = JambaHelperSettings:CreateContinueLabel( + AJM.settingsControl.labelInformation14 = JambaHelperSettings:CreateContinueLabel( AJM.settingsControl, headingWidth, column1Left, movingTop, - L["http://dual-boxing.com/"] + L["Text5"] ) movingTop = movingTop - labelContinueHeight - - AJM.settingsControl.labelInformation7 = JambaHelperSettings:CreateContinueLabel( + AJM.settingsControl.labelInformation15 = JambaHelperSettings:CreateContinueLabel( AJM.settingsControl, headingWidth, column1Left, movingTop, - "" + L["Text6"] ) movingTop = movingTop - labelContinueHeight - - AJM.settingsControl.labelInformation8 = JambaHelperSettings:CreateContinueLabel( + AJM.settingsControl.labelInformation16 = JambaHelperSettings:CreateContinueLabel( AJM.settingsControl, headingWidth, column1Left, movingTop, - "" + L["Text7"] ) movingTop = movingTop - labelContinueHeight - - AJM.settingsControl.labelInformation9 = JambaHelperSettings:CreateContinueLabel( + AJM.settingsControl.labelInformation17 = JambaHelperSettings:CreateContinueLabel( AJM.settingsControl, headingWidth, column1Left, movingTop, - "" + L["Text8"] ) movingTop = movingTop - labelContinueHeight - - AJM.settingsControl.labelInformation10 = JambaHelperSettings:CreateContinueLabel( + AJM.settingsControl.labelInformation18 = JambaHelperSettings:CreateContinueLabel( AJM.settingsControl, headingWidth, column1Left, movingTop, - "" + L["Text9"] ) movingTop = movingTop - labelContinueHeight - - AJM.settingsControl.labelInformation12 = JambaHelperSettings:CreateContinueLabel( + AJM.settingsControl.labelInformation19 = JambaHelperSettings:CreateContinueLabel( AJM.settingsControl, headingWidth, column1Left, movingTop, - L["Special thanks to Michael 'Jafula' Miller who made Jamba"] + L["Text10"] ) - movingTop = movingTop - labelContinueHeight + --movingTop = movingTop - labelContinueHeight + movingTop = movingTop - buttonHeight * 3 + AJM.settingsControl.buttonPushSettingsForAllModules = JambaHelperSettings:CreateButton( + AJM.settingsControl, + buttonPushAllSettingsWidth, + column2Left, + movingTop, + L["Full ChangeLog"], + AJM.ShowChangeLog, + L["Shows the Full changelog\nOpens a new Frame."] + ) + -- Special thanks Heading - AJM.settingsControl.labelInformation13 = JambaHelperSettings:CreateContinueLabel( + movingTop = movingTop - buttonHeight + JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Special thanks:"], movingTop, false ) + movingTop = movingTop - headingHeight + AJM.settingsControl.labelInformation20 = JambaHelperSettings:CreateContinueLabel( AJM.settingsControl, headingWidth, column1Left, movingTop, - L["Special thanks to olipcs on dual-boxing.com for writing the FTL Helper module."] + L["To Michael 'Jafula' Miller who made Jamba"] ) movingTop = movingTop - labelContinueHeight - - AJM.settingsControl.labelInformation14 = JambaHelperSettings:CreateContinueLabel( + AJM.settingsControl.labelInformation21 = JambaHelperSettings:CreateContinueLabel( AJM.settingsControl, headingWidth, column1Left, movingTop, - L["Advanced Loot by schilm (Max Schilling) - modified by Tehtsuo and Jafula."] + L["To Olipcs on dual-boxing.com for writing the FTL Helper module."] + ) movingTop = movingTop - labelContinueHeight - - -- Extra space. + AJM.settingsControl.labelInformation22 = JambaHelperSettings:CreateContinueLabel( + AJM.settingsControl, + headingWidth, + column1Left, + movingTop, + L["To Schilm (Max Schilling) for Advanced Loot and Jamba-Quest for 4.3"] + ) + -- Useful websites Heading + movingTop = movingTop - labelContinueHeight * 2 + JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Useful websites:"], movingTop, false ) + movingTop = movingTop - headingHeight + AJM.settingsControl.labelInformation30 = JambaHelperSettings:CreateContinueLabel( + AJM.settingsControl, + headingWidth, + column2Left, + movingTop, + L["www.twitter.com/jenn_ebony"] + + ) movingTop = movingTop - labelContinueHeight - - AJM.settingsControl.buttonPushSettingsForAllModules = JambaHelperSettings:CreateButton( + AJM.settingsControl.labelInformation21 = JambaHelperSettings:CreateContinueLabel( AJM.settingsControl, - buttonPushAllSettingsWidth, + headingWidth, + column2Left, + movingTop, + L["www.dual-boxing.com"] + ) + movingTop = movingTop - labelContinueHeight + AJM.settingsControl.labelInformation22 = JambaHelperSettings:CreateContinueLabel( + AJM.settingsControl, + headingWidth, + column2Left, + movingTop, + L["www.isboxer.com"] + ) + --CopyRight heading + movingTop = movingTop - labelContinueHeight * 4 + AJM.settingsControl.labelInformation30 = JambaHelperSettings:CreateContinueLabel( + AJM.settingsControl, + headingWidth, column1Left, - movingTop, - L["Push Settings For All The Modules"], - AJM.SendSettingsAllModules + movingTop, + L["Copyright 2008-2016 Michael 'Jafula' Miller, Released Under The MIT License"] ) - movingTop = movingTop - buttonHeight - return movingTop end diff --git a/Jamba/JambaHelperSettings.lua b/Jamba/JambaHelperSettings.lua index a36ed66..3f34930 100644 --- a/Jamba/JambaHelperSettings.lua +++ b/Jamba/JambaHelperSettings.lua @@ -80,7 +80,7 @@ function JambaHelperSettings:CreateSettings( settingsControl, displayName, paren local tabGroupWidgetSettings = AceGUI:Create( "TabGroup" ) -- Was 'Fill', which causes lockup, started at patch 4.1 (40100). Similar to http://forums.wowace.com/showthread.php?t=17872 tabGroupWidgetSettings:SetLayout( "JambaFillAce3Fix" ) - tabGroupWidgetSettings:SetTabs( { {text=L["Options"], value="options"}, {text=L["Help"], value="help"} } ) + tabGroupWidgetSettings:SetTabs( { {text=L["Options"], value="options"}, {text=L["Commands"], value="help"} } ) containerWidgetSettings:AddChild( tabGroupWidgetSettings ) tabGroupWidgetSettings:AddChild( widgetSettings ) @@ -217,6 +217,21 @@ function JambaHelperSettings:CreateBackdrop() end ------------------------------------------------------------------------------------------------------------- +-- ToolTip. +------------------------------------------------------------------------------------------------------------- + + +local function onControlEnter(widget, event, value) + GameTooltip:ClearLines() + GameTooltip:SetOwner(widget.frame, "ANCHOR_TOP") + GameTooltip:AddLine(widget.text and widget.text:GetText() or widget.label:GetText()) + GameTooltip:AddLine(widget:GetUserData("tooltip"), 1, 1, 1, 1) + GameTooltip:Show() +end + +local function onControlLeave() GameTooltip:Hide() end + +------------------------------------------------------------------------------------------------------------- -- Button. ------------------------------------------------------------------------------------------------------------- @@ -225,13 +240,17 @@ function JambaHelperSettings:GetButtonHeight() return 24 end -function JambaHelperSettings:CreateButton( settingsControl, width, left, top, text, buttonCallback ) +function JambaHelperSettings:CreateButton( settingsControl, width, left, top, text, buttonCallback, toolTip ) local button = AceGUI:Create( "Button" ) button:SetText( text ) settingsControl.widgetSettings:AddChild( button ) button:SetWidth( width ) button:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top ) - button:SetCallback( "OnClick", buttonCallback ) + button:SetCallback( "OnClick", buttonCallback ) + --button:SetUserData("key", "keyword") -- needed/?? + button:SetUserData("tooltip", toolTip) + button:SetCallback("OnEnter", onControlEnter) + button:SetCallback("OnLeave", onControlLeave) return button end @@ -249,13 +268,16 @@ function JambaHelperSettings:GetRadioBoxHeight() return 20 end -function JambaHelperSettings:CreateCheckBox( settingsControl, width, left, top, text, checkBoxCallback ) +function JambaHelperSettings:CreateCheckBox( settingsControl, width, left, top, text, checkBoxCallback, toolTip ) local button = AceGUI:Create( "CheckBox" ) button:SetLabel( text ) settingsControl.widgetSettings:AddChild( button ) button:SetWidth( width ) button:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top ) button:SetCallback( "OnValueChanged", checkBoxCallback ) + button:SetUserData("tooltip", toolTip) + button:SetCallback("OnEnter", onControlEnter) + button:SetCallback("OnLeave", onControlLeave) return button end @@ -268,12 +290,15 @@ function JambaHelperSettings:GetEditBoxHeight() return 44 end -function JambaHelperSettings:CreateEditBox( settingsControl, width, left, top, text ) +function JambaHelperSettings:CreateEditBox( settingsControl, width, left, top, text, toolTip ) local editBox = AceGUI:Create( "EditBox" ) editBox:SetLabel( text ) settingsControl.widgetSettings:AddChild( editBox ) editBox:SetWidth( width ) editBox:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top ) + editBox:SetUserData("tooltip", toolTip) + editBox:SetCallback("OnEnter", onControlEnter) + editBox:SetCallback("OnLeave", onControlLeave) return editBox end @@ -281,13 +306,16 @@ end -- Multi EditBox. ------------------------------------------------------------------------------------------------------------- -function JambaHelperSettings:CreateMultiEditBox( settingsControl, width, left, top, text, lines ) +function JambaHelperSettings:CreateMultiEditBox( settingsControl, width, left, top, text, lines, toolTip ) local editBox = AceGUI:Create( "MultiLineEditBox" ) editBox:SetLabel( text ) settingsControl.widgetSettings:AddChild( editBox ) editBox:SetWidth( width ) editBox:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top ) editBox:SetNumLines( lines ) + editBox:SetUserData("tooltip", toolTip) + editBox:SetCallback("OnEnter", onControlEnter) + editBox:SetCallback("OnLeave", onControlLeave) return editBox end @@ -318,12 +346,16 @@ function JambaHelperSettings:GetDropdownHeight() return 44 end -function JambaHelperSettings:CreateDropdown( settingsControl, width, left, top, text ) +function JambaHelperSettings:CreateDropdown( settingsControl, width, left, top, text, toolTip ) local dropdown = AceGUI:Create( "Dropdown" ) + --dropdown:ClearAllPoints() dropdown:SetLabel( text ) settingsControl.widgetSettings:AddChild( dropdown ) dropdown:SetWidth( width ) dropdown:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top ) + --dropdown:SetUserData("tooltip", toolTip) + --dropdown:SetCallback("OnEnter", onControlEnter) + --dropdown:SetCallback("OnLeave", onControlLeave) return dropdown end @@ -471,7 +503,7 @@ function JambaHelperSettings:CreateMediaSound( settingsControl, width, left, top local media = AceGUI:Create( "LSM30_Sound" ) media:SetLabel( text ) media:SetWidth( width ) - media:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top ) + media:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content , "TOPLEFT", left, top ) media:SetList() settingsControl.widgetSettings:AddChild( media ) return media diff --git a/Jamba/JambaMessage.lua b/Jamba/JambaMessage.lua index 54ae245..4d84ada 100644 --- a/Jamba/JambaMessage.lua +++ b/Jamba/JambaMessage.lua @@ -29,8 +29,8 @@ AJM.moduleName = "Jamba-Message" AJM.settingsDatabaseName = "JambaMessageProfileDB" AJM.chatCommand = "jamba-message" local L = LibStub( "AceLocale-3.0" ):GetLocale( AJM.moduleName ) -AJM.parentDisplayName = L["Advanced"] -AJM.moduleDisplayName = L["Core: Message Display"] +AJM.parentDisplayName = L["Chat"] +AJM.moduleDisplayName = L["Message Display"] ------------------------------------------------------------------------------------------------------------- -- Message area management. @@ -481,6 +481,8 @@ local function SettingsCreateAreaTypes( top ) AJM.settingsControl.areaOnScreenDropdown:SetCallback( "OnValueChanged", AJM.UpdateAreaOnScreenControls ) areaConfigurationTop = areaConfigurationTop - dropdownHeight areaConfigurationTop = areaConfigurationTop - verticalSpacing - verticalSpacing +--TODO add back in! + AJM.settingsControl.areaSoundDropdown = JambaHelperSettings:CreateMediaSound( AJM.settingsControl, headingWidth, @@ -489,6 +491,7 @@ local function SettingsCreateAreaTypes( top ) L["Sound To Play"] ) AJM.settingsControl.areaSoundDropdown:SetCallback( "OnValueChanged", AJM.UpdateSoundControls ) + areaConfigurationTop = areaConfigurationTop - dropdownHeight areaConfigurationTop = areaConfigurationTop - verticalSpacing - verticalSpacing AJM.settingsControl.areaListButtonUpdate = JambaHelperSettings:CreateButton( @@ -551,7 +554,7 @@ function AJM:SettingsAreaListScrollRefresh() AJM.settingsControl.areaList.rows[iterateDisplayRows].columns[2].textString:SetText( "" ) AJM.settingsControl.areaList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) AJM.settingsControl.areaList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControl.areaList.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + AJM.settingsControl.areaList.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + AJM.settingsControl.areaListOffset if dataRowNumber <= GetAreaListMaxPosition() then @@ -563,7 +566,7 @@ function AJM:SettingsAreaListScrollRefresh() AJM.settingsControl.areaList.rows[iterateDisplayRows].columns[2].textString:SetText( areaType ) -- Highlight the selected row. if dataRowNumber == AJM.settingsControl.areaListHighlightRow then - AJM.settingsControl.areaList.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + AJM.settingsControl.areaList.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) end end end diff --git a/Jamba/JambaTag.lua b/Jamba/JambaTag.lua index e606aa8..d50ac39 100644 --- a/Jamba/JambaTag.lua +++ b/Jamba/JambaTag.lua @@ -620,7 +620,7 @@ function AJM:SettingsTeamListScrollRefresh() -- Reset. AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetText( "" ) AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + AJM.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + AJM.settingsControl.teamListOffset if dataRowNumber <= JambaPrivate.Team.GetTeamListMaximumOrder() then @@ -629,7 +629,7 @@ function AJM:SettingsTeamListScrollRefresh() AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetText( characterName ) -- Highlight the selected row. if dataRowNumber == AJM.settingsControl.teamListHighlightRow then - AJM.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + AJM.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) end end end @@ -658,7 +658,7 @@ function AJM:SettingsTagListScrollRefresh() -- Reset. AJM.settingsControl.tagList.rows[iterateDisplayRows].columns[1].textString:SetText( "" ) AJM.settingsControl.tagList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControl.tagList.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + AJM.settingsControl.tagList.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + AJM.settingsControl.tagListOffset if dataRowNumber <= GetTagListMaxPosition() then @@ -671,7 +671,7 @@ function AJM:SettingsTagListScrollRefresh() end -- Highlight the selected row. if dataRowNumber == AJM.settingsControl.tagListHighlightRow then - AJM.settingsControl.tagList.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + AJM.settingsControl.tagList.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) end end end diff --git a/Jamba/JambaTeam.lua b/Jamba/JambaTeam.lua index 9321527..99e8dba 100644 --- a/Jamba/JambaTeam.lua +++ b/Jamba/JambaTeam.lua @@ -49,11 +49,11 @@ AJM.settings = { inviteConvertToRaid = true, lootSetAutomatically = false, lootSetFreeForAll = true, - lootSetMasterLooter = false, + lootSetGroupLoot = false, lootSetPersLooter = false, - lootSlavesOptOutOfLoot = false, - lootToGroupIfStrangerPresent = true, - lootToGroupFriendsAreNotStrangers = false, + -- lootSlavesOptOutOfLoot = false, + -- lootToGroupIfStrangerPresent = true, + -- lootToGroupFriendsAreNotStrangers = false, masterChangeClickToMove = false, }, } @@ -74,15 +74,7 @@ function AJM:GetConfiguration() usage = "/jamba-team add <name>", get = false, set = "AddMemberCommand", - }, - --setoffline = { TODO CLKAN UP> - -- type = "input", - -- name = L["Set Offline"], - -- desc = L["Sets a member offline"], - -- usage = "/jamba-team setoffline <name>", - -- get = false, - -- set = "SetMemberOfflineCommand", - --}, + }, remove = { type = "input", name = L["Remove"], @@ -169,7 +161,6 @@ function AJM:GetConfiguration() end -- Create the character online table and ordered characters tables. ---AJM.characterOnline = {} AJM.orderedCharacters = {} AJM.orderedCharactersOnline = {} @@ -209,9 +200,6 @@ AJM.MESSAGE_CHARACTER_OFFLINE = "JmbTmChrOf" AJM.PARTY_LOOT_FREEFORALL = "freeforall" AJM.PARTY_LOOT_GROUP = "group" -AJM.PARTY_LOOT_MASTER = "master" -AJM.PARTY_LOOT_NEEDBEFOREGREED = "needbeforegreed" -AJM.PARTY_LOOT_ROUNDROBIN = "roundrobin" AJM.PARTY_LOOT_PERSONAL = "personalloot" ------------------------------------------------------------------------------------------------------------- @@ -269,15 +257,17 @@ local function SettingsCreateTeamList() rightOfList, topOfList, L["Up"], - AJM.SettingsMoveUpClick - ) + AJM.SettingsMoveUpClick, + L["Move the character up a place in the team list"] + ) AJM.settingsControl.teamListButtonMoveDown = JambaHelperSettings:CreateButton( AJM.settingsControl, teamListButtonControlWidth, rightOfList, topOfList - verticalSpacing - buttonHeight, L["Down"], - AJM.SettingsMoveDownClick + AJM.SettingsMoveDownClick, + L["Move the character down a place in the team list"] ) AJM.settingsControl.teamListButtonAdd = JambaHelperSettings:CreateButton( AJM.settingsControl, @@ -285,7 +275,8 @@ local function SettingsCreateTeamList() rightOfList, topOfList - verticalSpacing - buttonHeight - verticalSpacing - buttonHeight, L["Add"], - AJM.SettingsAddClick + AJM.SettingsAddClick, + L["Adds a member to the team list\nYou can Use:\nCharacterName\nCharacterName-realm\n@Target\n@Mouseover"] ) AJM.settingsControl.teamListButtonParty = JambaHelperSettings:CreateButton( AJM.settingsControl, @@ -293,7 +284,8 @@ local function SettingsCreateTeamList() rightOfList, topOfList - verticalSpacing - buttonHeight - verticalSpacing - buttonHeight - verticalSpacing - buttonHeight, L["Add Party"], - AJM.SettingsAddPartyClick + AJM.SettingsAddPartyClick, + L["Adds all Party members to the team list"] ) AJM.settingsControl.teamListButtonRemove = JambaHelperSettings:CreateButton( AJM.settingsControl, @@ -301,7 +293,8 @@ local function SettingsCreateTeamList() rightOfList, topOfList - verticalSpacing - buttonHeight - verticalSpacing - buttonHeight - verticalSpacing - buttonHeight - verticalSpacing - buttonHeight, L["Remove"], - AJM.SettingsRemoveClick + AJM.SettingsRemoveClick, + L["Removes Party members from the team list"] ) AJM.settingsControl.teamListButtonSetMaster = JambaHelperSettings:CreateButton( AJM.settingsControl, @@ -309,7 +302,8 @@ local function SettingsCreateTeamList() left + inviteDisbandButtonWidth + horizontalSpacing + inviteDisbandButtonWidth + horizontalSpacing, bottomOfList, L["Set Master"], - AJM.SettingsSetMasterClick + AJM.SettingsSetMasterClick, + L["Set the selected member to be the master of the group"] ) AJM.settingsControl.teamListButtonInvite = JambaHelperSettings:CreateButton( AJM.settingsControl, @@ -317,7 +311,8 @@ local function SettingsCreateTeamList() left, bottomOfList, L["Invite"], - AJM.SettingsInviteClick + AJM.SettingsInviteClick, + L["Invites all Team members online to a party or raid.\nThis can be set as a keyBinding"] ) AJM.settingsControl.teamListButtonDisband = JambaHelperSettings:CreateButton( AJM.settingsControl, @@ -325,16 +320,9 @@ local function SettingsCreateTeamList() left + inviteDisbandButtonWidth + horizontalSpacing, bottomOfList, L["Disband"], - AJM.SettingsDisbandClick - ) --- AJM.settingsControl.teamListButtonOffline = JambaHelperSettings:CreateButton( --- AJM.settingsControl, --- setMasterButtonWidth, --- left + inviteDisbandButtonWidth + horizontalSpacing + inviteDisbandButtonWidth + horizontalSpacing + setMasterButtonWidth + horizontalSpacing, --- bottomOfList, --- L["Set On-Line"], --- AJM.SettingsOfflineClick --- ) + AJM.SettingsDisbandClick, + L["Asks all Team members to leave a party or raid.\nThis can be set as a keyBinding"] + ) return bottomOfSection end @@ -347,34 +335,39 @@ local function SettingsCreateMasterControl( top ) local headingWidth = JambaHelperSettings:HeadingWidth( false ) local horizontalSpacing = JambaHelperSettings:GetHorizontalSpacing() local verticalSpacing = JambaHelperSettings:GetVerticalSpacing() - local indentContinueLabel = horizontalSpacing * 13 - local bottomOfSection = top - headingHeight - (checkBoxHeight * 3) - (verticalSpacing * 2) + local checkBoxWidth = (headingWidth - horizontalSpacing) / 2 + local column1Left = left + local column2Left = left + checkBoxWidth + horizontalSpacing + local bottomOfSection = top - headingHeight - (checkBoxHeight * 2) - (verticalSpacing * 2) -- Create a heading. JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Master Control"], top, false ) -- Create checkboxes. AJM.settingsControl.masterControlCheckBoxFocusChange = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, - headingWidth, - left, + checkBoxWidth, + column1Left, top - headingHeight, - L["When Focus changes, set the Master to the Focus."], - AJM.SettingsFocusChangeToggle + L["Focus will set master toon."], + AJM.SettingsFocusChangeToggle, + L["The master will be the set from the focus target if a team member \n\nNote: All team members must be setting the focus."] ) AJM.settingsControl.masterControlCheckBoxMasterChange = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, - headingWidth, - left, - top - headingHeight - checkBoxHeight, - L["When Master changes, promote Master to party leader."], - AJM.SettingsMasterChangeToggle + checkBoxWidth, + column2Left, + top - headingHeight, + L["Promote Master to party leader."], + AJM.SettingsMasterChangeToggle, + L["Master will always be the party leader."] ) AJM.settingsControl.masterControlCheckBoxMasterChangeClickToMove = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, - headingWidth, - left, - top - headingHeight - checkBoxHeight - checkBoxHeight, - L["Auto activate click-to-move on Minions and deactivate on Master."], - AJM.SettingsMasterChangeClickToMoveToggle + checkBoxWidth, + column1Left, + top - headingHeight - checkBoxHeight, + L["Sets click-to-move on Minions"], + AJM.SettingsMasterChangeClickToMoveToggle, + L["Auto activate click-to-move on Minions and deactivate on Master."] ) return bottomOfSection end @@ -390,7 +383,7 @@ local function SettingsCreatePartyInvitationsControl( top ) local checkBoxWidth = (headingWidth - horizontalSpacing) / 2 local column1Left = left local column2Left = left + checkBoxWidth + horizontalSpacing - local bottomOfSection = top - headingHeight - (checkBoxHeight * 3) - verticalSpacing + local bottomOfSection = top - headingHeight - (checkBoxHeight * 3) - (verticalSpacing * 2) -- Create a heading. JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Party Invitations Control"], top, false ) -- Create checkboxes. @@ -399,8 +392,9 @@ local function SettingsCreatePartyInvitationsControl( top ) checkBoxWidth, column1Left, top - headingHeight, - L["Auto Convert Team Over Five To Raid"], - AJM.SettingsinviteConvertToRaidToggle + L["Auto Convert To Raid"], + AJM.SettingsinviteConvertToRaidToggle, + L["Auto Convert To Raid if team is over five character's"] ) AJM.settingsControl.partyInviteControlCheckBoxAcceptMembers = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -408,7 +402,8 @@ local function SettingsCreatePartyInvitationsControl( top ) column2Left, top - headingHeight, L["Accept from team."], - AJM.SettingsAcceptInviteMembersToggle + AJM.SettingsAcceptInviteMembersToggle, + L["Auto Accept invites from the team."] ) AJM.settingsControl.partyInviteControlCheckBoxAcceptFriends = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -416,15 +411,17 @@ local function SettingsCreatePartyInvitationsControl( top ) column1Left, top - headingHeight - checkBoxHeight, L["Accept from friends."], - AJM.SettingsAcceptInviteFriendsToggle + AJM.SettingsAcceptInviteFriendsToggle, + L["Auto Accept invites from your friends list."] ) AJM.settingsControl.partyInviteControlCheckBoxAcceptBNFriends = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, checkBoxWidth, column2Left, top - headingHeight - checkBoxHeight, - L["Accept from BattleNet/RealD friends."], - AJM.SettingsAcceptInviteBNFriendsToggle + L["Accept from BattleNet friends."], + AJM.SettingsAcceptInviteBNFriendsToggle, + L["Auto Accept invites from your Battlenet or RealID Friends list."] ) AJM.settingsControl.partyInviteControlCheckBoxAcceptGuild = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -432,7 +429,8 @@ local function SettingsCreatePartyInvitationsControl( top ) column1Left, top - headingHeight - checkBoxHeight - checkBoxHeight, L["Accept from guild."], - AJM.SettingsAcceptInviteGuildToggle + AJM.SettingsAcceptInviteGuildToggle, + L["Auto Accept invites from your Guild."] ) AJM.settingsControl.partyInviteControlCheckBoxDeclineStrangers = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -440,7 +438,8 @@ local function SettingsCreatePartyInvitationsControl( top ) column2Left, top - headingHeight - checkBoxHeight - checkBoxHeight, L["Decline from strangers."], - AJM.SettingsDeclineInviteStrangersToggle + AJM.SettingsDeclineInviteStrangersToggle, + L["Decline invites from anyone else."] ) return bottomOfSection end @@ -461,15 +460,16 @@ local function SettingsCreatePartyLootControl( top ) local column2Left = left + checkBoxWidth + horizontalSpacing local bottomOfSection = top - headingHeight - checkBoxHeight - radioBoxHeight - verticalSpacing - checkBoxHeight - checkBoxHeight - (verticalSpacing * 4) - labelContinueHeight - checkBoxHeight -- Create a heading. - JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Party Loot Control"], top, false ) + JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Party Loot Control (Instances)"], top, false ) -- Create checkboxes. AJM.settingsControl.partyLootControlCheckBoxSetLootMethod = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, headingWidth, column1Left, top - headingHeight, - L["Automatically set the Loot Method to..."], - AJM.SettingsSetLootMethodToggle + L["Set the Loot Method to..."], + AJM.SettingsSetLootMethodToggle, + L["Automatically set the Loot Method to\nFree For All\nPrsonal Loot\nGroup Loot"] ) AJM.settingsControl.partyLootControlCheckBoxSetFFA = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, @@ -480,48 +480,36 @@ local function SettingsCreatePartyLootControl( top ) AJM.SettingsSetFFALootToggle ) AJM.settingsControl.partyLootControlCheckBoxSetFFA:SetType( "radio" ) - AJM.settingsControl.partyLootControlCheckBoxSetMasterLooter = JambaHelperSettings:CreateCheckBox( - AJM.settingsControl, - checkBoxWidth, - column2Left, - top - headingHeight - checkBoxHeight - verticalSpacing, - L["Master Looter"], - AJM.SettingsSetMasterLooterToggle - ) - AJM.settingsControl.partyLootControlCheckBoxSetMasterLooter:SetType( "radio" ) AJM.settingsControl.partyLootControlCheckBoxSetPersLooter = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, checkBoxWidth, - column1Left, - top - headingHeight - checkBoxHeight - radioBoxHeight, + column2Left, + top - headingHeight - checkBoxHeight, L["Personal Loot"], AJM.SettingsSetPersLooterToggle ) AJM.settingsControl.partyLootControlCheckBoxSetPersLooter:SetType( "radio" ) - AJM.settingsControl.partyLootControlCheckBoxStrangerToGroup = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl.partyLootControlCheckBoxSetGroupLoot = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, headingWidth, column1Left, - top - headingHeight - checkBoxHeight - radioBoxHeight - radioBoxHeight, - L["Override: Set loot to Group Loot if stranger in group."], - AJM.SettingsSetStrangerToGroup - ) - AJM.settingsControl.partyLootControlCheckBoxFriendsNotStrangers = JambaHelperSettings:CreateCheckBox( - AJM.settingsControl, - headingWidth, - column1Left + indentContinueLabel, - top - headingHeight - checkBoxHeight - radioBoxHeight - radioBoxHeight -checkBoxHeight, - L["Friends Are Not Strangers"], - AJM.SettingsSetFriendsNotStrangers + top - headingHeight - checkBoxHeight - radioBoxHeight, + L["Set to Group Loot "], + AJM.SettingsSetGroupLootTogggle, + L["Set loot to Group Loot."] ) + AJM.settingsControl.partyLootControlCheckBoxSetGroupLoot:SetType( "radio" ) +--[[ AJM.settingsControl.partyLootControlCheckBoxSetOptOutOfLoot = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, headingWidth, column1Left, top - headingHeight - checkBoxHeight - radioBoxHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight, L["Minions Opt Out of Loot"], - AJM.SettingsSetMinionsOptOutToggle + AJM.SettingsSetMinionsOptOutToggle, + L["Minions Don't need loot."] ) +--]] return bottomOfSection end @@ -542,7 +530,7 @@ local function SettingsCreate() local bottomOfPartyInvitationControl = SettingsCreatePartyInvitationsControl( bottomOfMasterControl ) -- Create the party loot control controls. local bottomOfPartyLootControl = SettingsCreatePartyLootControl( bottomOfPartyInvitationControl ) - AJM.settingsControl.widgetSettings.content:SetHeight( -bottomOfPartyLootControl ) + AJM.settingsControl.widgetSettings.content:SetHeight( - bottomOfPartyInvitationControl ) -- Help local helpTable = {} JambaHelperSettings:CreateHelp( AJM.settingsControl, helpTable, AJM:GetConfiguration() ) @@ -652,19 +640,6 @@ local function GetTeamListMaximumOrderOnline() return totalMembersDisplayed end - ---[[ TODO REMOVE ME --- Return true if the character specified is in the team. -local function IsCharacterInTeam( characterName ) - local isMember = false - if AJM.db.teamList[characterName] then - isMember = true - --AJM:Print('returning', isMember) - return isMember - end -end ---]] - local function IsCharacterInTeam( characterName ) local isMember = false if AJM.db.teamList[characterName] then @@ -727,10 +702,47 @@ end -- Add a member to the member list. local function AddMember( characterName ) + local name + if characterName == "@Target" or characterName == "@target" or characterName == "@TARGET" then + local UnitIsPlayer = UnitIsPlayer("target") + if UnitIsPlayer == true then + local unitName = GetUnitName("target", true) + --AJM:Print("Target", unitName) + name = unitName + else + AJM:Print(L["No Target Or Target is not a Player"]) + return + end + elseif characterName == "@Mouseover" or characterName == "@mouseover" or characterName == "@MOUSEOVER" then + local UnitIsPlayer = UnitIsPlayer("mouseover") + if UnitIsPlayer == true then + local unitName = GetUnitName("mouseover", true) + --AJM:Print("mouseover", unitName) + name = unitName + else + AJM:Print(L["No Target Or Target is not a Player"]) + return + end + end + if name then + --AJM:Print ( "New", name ) + local character = JambaUtilities:AddRealmToNameIfMissing( name ) + if AJM.db.teamList[character] == nil then + -- Get the maximum order number. + local maxOrder = GetTeamListMaximumOrder() + -- Yes, add to the member list. + AJM.db.teamList[character] = maxOrder + 1 + JambaPrivate.Team.SetTeamOnline() + --AJM.Print("teamList", character) + -- Send a message to any listeners that AJM character has been added. + AJM:SendMessage( AJM.MESSAGE_TEAM_CHARACTER_ADDED, character ) + -- Refresh the settings. + AJM:SettingsRefresh() + end + else -- Wow names are at least two characters. if characterName ~= nil and characterName:trim() ~= "" and characterName:len() > 1 then - -- If the character is not already on the list... - --local character = JambaUtilities:Capitalise( charactername ) + -- If the character is not already in the list... local character = JambaUtilities:AddRealmToNameIfMissing( characterName ) if AJM.db.teamList[character] == nil then -- Get the maximum order number. @@ -743,6 +755,7 @@ local function AddMember( characterName ) AJM:SendMessage( AJM.MESSAGE_TEAM_CHARACTER_ADDED, character ) -- Refresh the settings. AJM:SettingsRefresh() + end end end end @@ -769,22 +782,6 @@ end -- Add a member to the member list. function AJM:AddMemberGUI( value ) AddMember( value ) - --FauxScrollFrame_Update( - --AJM.settingsControl.teamList.listScrollFrame, - --GetTeamListMaximumOrder(), - --AJM.settingsControl.teamList.rowsToDisplay, - --AJM.settingsControl.teamList.rowHeight - --) - --AJM.settingsControl.teamListHighlightRow = GetTeamListMaximumOrder() - --if ( AJM.settingsControl.teamListHighlightRow - AJM.settingsControl.teamList.rowsToDisplay ) > AJM.settingsControl.teamListOffset then - --JambaHelperSettings:SetFauxScrollFramePosition( - --AJM.settingsControl.teamList.listScrollFrame, - --( AJM.settingsControl.teamListHighlightRow - AJM.settingsControl.teamList.rowsToDisplay ), - --GetTeamListMaximumOrder(), - --AJM.settingsControl.teamList.rowHeight - --) - --AJM:Print( AJM.settingsControl.teamListHighlightRow, AJM.settingsControl.teamList.rowsToDisplay, FauxScrollFrame_GetOffset( AJM.settingsControl.teamList.listScrollFrame ) ) - --end AJM:SettingsTeamListScrollRefresh() end @@ -814,8 +811,6 @@ end local function GetPositionForCharacterNameOnline( findCharacterName ) local positionForCharacterName = 0 - --for characterName, characterPosition in pairs( AJM.db.teamList ) do - --AJM:Print("test", findCharacterName) for index, characterName in JambaApi.TeamListOrderedOnline() do if characterName == findCharacterName then --AJM:Print("found", characterName, index) @@ -923,7 +918,6 @@ end function AJM:CommandSetMaster( info, parameters ) local target, tag = strsplit( " ", parameters ) - --target = JambaUtilities:Capitalise( target ) if tag ~= nil and tag:trim() ~= "" then AJM:JambaSendCommandToTeam( AJM.COMMAND_SET_MASTER, target, tag ) else @@ -951,31 +945,19 @@ end -- Set a character's online status. local function SetCharacterOnlineStatus( characterName, isOnline ) - --TODO OLD CLEAN UP - --if JambaPrivate.Communications.AssumeTeamAlwaysOnline() == true then - -- isOnline = true - --end --AJM:Print('setting', character, 'to be online') AJM.db.characterOnline[characterName] = isOnline end local function SetTeamStatusToOffline() - --if JambaPrivate.Communications.AssumeTeamAlwaysOnline() == true then - -- return - --end - -- Set all characters online status to false. for characterName, characterPosition in pairs( AJM.db.teamList ) do SetCharacterOnlineStatus( characterName, false ) - --SetCharacterOnlineStatus( AJM.characterName, true ) AJM:SendMessage( AJM.MESSAGE_CHARACTER_OFFLINE ) AJM:SettingsTeamListScrollRefresh() end end local function SetTeamOnline() - --if JambaPrivate.Communications.AssumeTeamAlwaysOnline() == true then - -- return - --end -- Set all characters online status to false. for characterName, characterPosition in pairs( AJM.db.teamList ) do SetCharacterOnlineStatus( characterName, true ) @@ -986,16 +968,10 @@ end --Set character Offline. local function setOffline( characterName ) - -- can not set master Offline TODO REMOVE. - --if IsCharacterTheMaster( characterName ) == true then - -- StaticPopup_Show( "MasterCanNotBeSetOffline" ) - -- return - --else local character = JambaUtilities:AddRealmToNameIfMissing( characterName ) SetCharacterOnlineStatus( character, false ) AJM:SendMessage( AJM.MESSAGE_CHARACTER_OFFLINE ) AJM:SettingsTeamListScrollRefresh() - --end end --Set character OnLine. @@ -1006,43 +982,6 @@ local function setOnline( characterName ) AJM:SettingsTeamListScrollRefresh() end --- Set OfflineClick TODO CLean up -local function setOfflineClick ( characterName ) - if GetCharacterOnlineStatus( characterName ) == false then - setOnline( characterName, true ) - else - setOffline( characterName, false ) - --AJM:Print("setOffline", characterName ) - end - AJM:SettingsRefresh() -end - --- Set member offline from the command line. AXED CLEAN UP REMOVE! -function AJM:SetMemberOfflineCommand( info, parameters ) - local characterName = parameters - --AJM:Print("is char in team", characterName ) - local matchDash = characterName:find( "-" ) - if matchDash then - if IsCharacterInTeam( characterName ) then - --AJM:Print("is char in team", characterName ) - --local character = JambaUtilities:AddRealmToNameIfMissing( characterName ) - if GetCharacterOnlineStatus( characterName ) == false then - setOnline( characterName, true ) - AJM:JambaSendCommandToTeam( AJM.COMMAND_SET_ONLINE, characterName ) - else - setOffline( characterName, false ) - --AJM:Print("setOffline", characterName ) - AJM:JambaSendCommandToTeam( AJM.COMMAND_SET_OFFLINE, characterName ) - end - AJM:SettingsRefresh() - else - AJM:Print( L["A is not in my team list. I can not set them Offline."]( characterName ) ) - end - else - AJM:Print( "You need to add a Realm Name" ) - end -end - function AJM.ReceivesetOffline( characterName ) --AJM:Print("command", characterName ) setOffline( characterName, false ) @@ -1126,8 +1065,24 @@ function AJM.DoTeamPartyInvite() AJM:ScheduleTimer( "DoTeamPartyInvite", 0.5 ) else -- Process group checks. - AJM:PARTY_LEADER_CHANGED( "PARTY_LEADER_CHANGED" ) - AJM:GROUP_ROSTER_UPDATE( "GROUP_ROSTER_UPDATE" ) + --AJM:PARTY_LEADER_CHANGED( "PARTY_LEADER_CHANGED" ) + -- AJM:GROUP_ROSTER_UPDATE( "GROUP_ROSTER_UPDATE" ) + end +end + +function AJM:PLAYER_FOCUS_CHANGED() + -- Change master on focus change option enabled? + if AJM.db.focusChangeSetMaster == true then + -- Get the name of the focused unit. + local targetName, targetRealm = UnitName( "focus" ) + local name = JambaUtilities:AddRealmToNameIfNotNil( targetName, targetRealm ) + --AJM:Print("test", name) + -- Attempt to set this target as the master if the target is in the team. + if IsCharacterInTeam( name ) == true then + if (name ~= nil) and (name:trim() ~= "") then + SetMaster( name ) + end + end end end @@ -1176,108 +1131,30 @@ local function SetPartyLoot( desiredLootOption ) end end -function AJM:PLAYER_FOCUS_CHANGED() - -- Change master on focus change option enabled? - if AJM.db.focusChangeSetMaster == true then - -- Get the name of the focused unit. - local targetName, targetRealm = UnitName( "focus" ) - local name = JambaUtilities:AddRealmToNameIfNotNil( targetName, targetRealm ) - -- Attempt to set this target as the master if the target is in the team. - if IsCharacterInTeam( name ) == true then - if (name ~= nil) and (name:trim() ~= "") then - SetMaster( name ) - end - end - end -end - function AJM:PARTY_LEADER_CHANGED( event, ... ) if AJM.db.lootSetAutomatically == true then - if UnitIsGroupLeader( "player" ) == true then - -- Is there a stranger in the group? - local haveStranger = false - if AJM.db.lootToGroupIfStrangerPresent == true then - local numberPartyMembers = GetNumSubgroupMembers() - for iteratePartyMembers = numberPartyMembers, 1, -1 do - local partyMemberName, partyMemberRealm = UnitName( "party"..iteratePartyMembers ) - local character = JambaUtilities:AddRealmToNameIfNotNil( partyMemberName, partyMemberRealm ) - if IsCharacterInTeam( character ) == false then - if AJM.db.lootToGroupFriendsAreNotStrangers == true then - local isAFriend = false - for friendIndex = 1, GetNumFriends() do - local friendName = GetFriendInfo( friendIndex ) - if character == friendName then - isAFriend = true - end - end - for bnIndex = 1, BNGetNumFriends() do - --local _, _, _, _, name, toonid = BNGetFriendInfo( bnIndex ) - for toonIndex = 1, BNGetNumFriendGameAccounts( bnIndex ) do - local _, character, client, realmName = BNGetFriendGameAccountInfo( bnIndex, toonIndex ) - if client == "WoW" then - friendName = friendName:match("(.+)%-.+") or friendName - if character == friendName or character.."-"..realmName then - isAFriend = true - end - end - end - end - if isAFriend == false then - haveStranger = true - end - else - haveStranger = true - end - end - end - if haveStranger == true then - SetPartyLoot( AJM.PARTY_LOOT_GROUP ) - end + inInstance, instanceType = IsInInstance() + --if inInstance then + -- Automatically set the loot to free for all? + if AJM.db.lootSetFreeForAll == true then + SetPartyLoot( AJM.PARTY_LOOT_FREEFORALL ) end - if haveStranger == false then - -- Automatically set the loot to free for all? - if AJM.db.lootSetFreeForAll == true then - SetPartyLoot( AJM.PARTY_LOOT_FREEFORALL ) - end - -- Automatically set the loot to master loot? - if AJM.db.lootSetMasterLooter == true then - SetPartyLoot( AJM.PARTY_LOOT_MASTER ) - end - -- Automatically set the loot to Personal Loot - if AJM.db.lootSetPersLooter == true then - SetPartyLoot( AJM.PARTY_LOOT_PERSONAL ) - end + -- Automatically set the loot to Group loot? + if AJM.db.lootSetGroupLoot == true then + SetPartyLoot( AJM.PARTY_LOOT_GROUP ) end - end + -- Automatically set the loot to Personal Loot + if AJM.db.lootSetPersLooter == true then + SetPartyLoot( AJM.PARTY_LOOT_PERSONAL ) + end + --end end - AJM:CheckMinionsOptOutOfLoot() end -function AJM:GROUP_ROSTER_UPDATE( event, ... ) - AJM:CheckMinionsOptOutOfLoot() -end -function AJM:CheckMinionsOptOutOfLoot() - -- Set opt out of loot rolls? - if AJM.db.lootSlavesOptOutOfLoot == true then - -- Only if not the master. - if IsCharacterTheMaster( AJM.characterName ) == false then - if not GetOptOutOfLoot() then - SetOptOutOfLoot( true ) - end - else - if GetOptOutOfLoot() then - SetOptOutOfLoot( false ) - end - end - else - if GetOptOutOfLoot() then - SetOptOutOfLoot( false ) - end - end -end function AJM:PARTY_INVITE_REQUEST( event, inviter, ... ) + AJM:Print("Inviter", inviter) -- Accept this invite, initially no. local acceptInvite = false -- Is character not in a group? @@ -1319,7 +1196,7 @@ function AJM:PARTY_INVITE_REQUEST( event, inviter, ... ) end end end - end + end -- Accept and invite from guild members? if AJM.db.inviteAcceptGuild == true then if UnitIsInMyGuild( inviter ) then @@ -1432,18 +1309,8 @@ function AJM:OnInitialize() if not updateMatchStart then updatedTeamList[characterName.."-"..realmName] = position AJM.db.teamList = JambaUtilities:CopyTable( updatedTeamList ) --- TODO Clean ME UP. --- else --- if characterName then --- updatedTeamList[characterName] = position --- end end end --- TODO CLEAN ME UP ebony --- AJM.db.teamList = JambaUtilities:CopyTable( updatedTeamList ) --- for characterName, position in pairs( AJM.db.teamList ) do --- AJM:Print( 'Iterating after:', characterName, position ) --- end --todo look at this ebony -- local updateMatchStart = AJM.db.master:find( "-" ) -- if not updateMatchStart then @@ -1455,8 +1322,8 @@ end function AJM:OnEnable() AJM:RegisterEvent( "PARTY_INVITE_REQUEST" ) AJM:RegisterEvent( "PARTY_LEADER_CHANGED" ) - AJM:RegisterEvent( "GROUP_ROSTER_UPDATE" ) - AJM:RegisterEvent( "GROUP_JOINED", "GROUP_ROSTER_UPDATE" ) +-- AJM:RegisterEvent( "GROUP_ROSTER_UPDATE" ) +-- AJM:RegisterEvent( "GROUP_JOINED", "GROUP_ROSTER_UPDATE" ) AJM:RegisterMessage( AJM.MESSAGE_TEAM_MASTER_CHANGED, "OnMasterChange" ) -- Kickstart the settings team list scroll frame. AJM:SettingsTeamListScrollRefresh() @@ -1507,21 +1374,21 @@ function AJM:SettingsRefresh() -- Party Loot Control. AJM.settingsControl.partyLootControlCheckBoxSetLootMethod:SetValue( AJM.db.lootSetAutomatically ) AJM.settingsControl.partyLootControlCheckBoxSetFFA:SetValue( AJM.db.lootSetFreeForAll ) - AJM.settingsControl.partyLootControlCheckBoxSetMasterLooter:SetValue( AJM.db.lootSetMasterLooter ) + AJM.settingsControl.partyLootControlCheckBoxSetGroupLoot:SetValue( AJM.db.lootSetGroupLoot ) AJM.settingsControl.partyLootControlCheckBoxSetPersLooter:SetValue( AJM.db.lootSetPersLooter ) - AJM.settingsControl.partyLootControlCheckBoxStrangerToGroup:SetValue( AJM.db.lootToGroupIfStrangerPresent ) - AJM.settingsControl.partyLootControlCheckBoxFriendsNotStrangers:SetValue( AJM.db.lootToGroupFriendsAreNotStrangers ) - AJM.settingsControl.partyLootControlCheckBoxSetOptOutOfLoot:SetValue( AJM.db.lootSlavesOptOutOfLoot ) + --AJM.settingsControl.partyLootControlCheckBoxStrangerToGroup:SetValue( AJM.db.lootToGroupIfStrangerPresent ) + --AJM.settingsControl.partyLootControlCheckBoxFriendsNotStrangers:SetValue( AJM.db.lootToGroupFriendsAreNotStrangers ) + --AJM.settingsControl.partyLootControlCheckBoxSetOptOutOfLoot:SetValue( AJM.db.lootSlavesOptOutOfLoot ) -- Ensure correct state. AJM.settingsControl.partyLootControlCheckBoxSetFFA:SetDisabled( not AJM.db.lootSetAutomatically ) - AJM.settingsControl.partyLootControlCheckBoxSetMasterLooter:SetDisabled( not AJM.db.lootSetAutomatically ) + AJM.settingsControl.partyLootControlCheckBoxSetGroupLoot:SetDisabled( not AJM.db.lootSetAutomatically ) AJM.settingsControl.partyLootControlCheckBoxSetPersLooter:SetDisabled( not AJM.db.lootSetAutomatically ) - AJM.settingsControl.partyLootControlCheckBoxStrangerToGroup:SetDisabled( not AJM.db.lootSetAutomatically ) - AJM.settingsControl.partyLootControlCheckBoxFriendsNotStrangers:SetDisabled( not AJM.db.lootSetAutomatically ) + --AJM.settingsControl.partyLootControlCheckBoxStrangerToGroup:SetDisabled( not AJM.db.lootSetAutomatically ) + --AJM.settingsControl.partyLootControlCheckBoxFriendsNotStrangers:SetDisabled( not AJM.db.lootSetAutomatically or not AJM.db.lootToGroupIfStrangerPresent) -- Update the settings team list. AJM:SettingsTeamListScrollRefresh() -- Check the opt out of loot settings. - AJM:CheckMinionsOptOutOfLoot() + --AJM:CheckMinionsOptOutOfLoot() end -- Settings received. @@ -1539,11 +1406,11 @@ function AJM:JambaOnSettingsReceived( characterName, settings ) AJM.db.inviteConvertToRaid = settings.inviteConvertToRaid AJM.db.lootSetAutomatically = settings.lootSetAutomatically AJM.db.lootSetFreeForAll = settings.lootSetFreeForAll - AJM.db.lootSetMasterLooter = settings.lootSetMasterLooter + AJM.db.lootSetGroupLoot = settings.lootSetGroupLoot AJM.db.lootSetPersLooter = settings.lootSetPersLooter - AJM.db.lootSlavesOptOutOfLoot = settings.lootSlavesOptOutOfLoot - AJM.db.lootToGroupIfStrangerPresent = settings.lootToGroupIfStrangerPresent - AJM.db.lootToGroupFriendsAreNotStrangers = settings.lootToGroupFriendsAreNotStrangers +-- AJM.db.lootSlavesOptOutOfLoot = settings.lootSlavesOptOutOfLoot +-- AJM.db.lootToGroupIfStrangerPresent = settings.lootToGroupIfStrangerPresent +-- AJM.db.lootToGroupFriendsAreNotStrangers = settings.lootToGroupFriendsAreNotStrangers AJM.db.masterChangeClickToMove = settings.masterChangeClickToMove AJM.db.master = settings.master --Copy the Offline team members. @@ -1576,7 +1443,8 @@ function AJM:SettingsTeamListScrollRefresh() AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetText( "" ) AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 ) - AJM.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + --AJM.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 0.0 ) + AJM.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 ) -- Get data. local dataRowNumber = iterateDisplayRows + AJM.settingsControl.teamListOffset if dataRowNumber <= GetTeamListMaximumOrder() then @@ -1607,7 +1475,8 @@ function AJM:SettingsTeamListScrollRefresh() end -- Highlight the selected row. if dataRowNumber == AJM.settingsControl.teamListHighlightRow then - AJM.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + --AJM.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetTexture( 1.0, 1.0, 0.0, 0.5 ) + AJM.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 ) end end end @@ -1735,6 +1604,7 @@ function AJM:SettingsinviteConvertToRaidToggle( event, checked ) AJM.db.inviteConvertToRaid = checked AJM:SettingsRefresh() end + function AJM:SettingsSetLootMethodToggle( event, checked ) AJM.db.lootSetAutomatically = checked AJM:SettingsRefresh() @@ -1742,13 +1612,13 @@ end function AJM:SettingsSetFFALootToggle( event, checked ) AJM.db.lootSetFreeForAll = checked - AJM.db.lootSetMasterLooter = not checked + AJM.db.lootSetGroupLoot = not checked AJM.db.lootSetPersLooter = not checked AJM:SettingsRefresh() end -function AJM:SettingsSetMasterLooterToggle( event, checked ) - AJM.db.lootSetMasterLooter = checked +function AJM:SettingsSetGroupLootTogggle( event, checked ) + AJM.db.lootSetGroupLoot = checked AJM.db.lootSetFreeForAll = not checked AJM.db.lootSetPersLooter = not checked AJM:SettingsRefresh() @@ -1757,10 +1627,11 @@ end function AJM:SettingsSetPersLooterToggle( event, checked ) AJM.db.lootSetPersLooter = checked AJM.db.lootSetFreeForAll = not checked - AJM.db.lootSetMasterLooter = not checked + AJM.db.lootSetGroupLoot = not checked AJM:SettingsRefresh() end +--[[ function AJM:SettingsSetStrangerToGroup( event, checked ) AJM.db.lootToGroupIfStrangerPresent = checked AJM:SettingsRefresh() @@ -1775,7 +1646,7 @@ function AJM:SettingsSetMinionsOptOutToggle( event, checked ) AJM.db.lootSlavesOptOutOfLoot = checked AJM:SettingsRefresh() end - +]] ------------------------------------------------------------------------------------------------------------- -- Key bindings. ------------------------------------------------------------------------------------------------------------- diff --git a/Jamba/JambaUtilities.lua b/Jamba/JambaUtilities.lua index 4bdb3b3..bbf23de 100644 --- a/Jamba/JambaUtilities.lua +++ b/Jamba/JambaUtilities.lua @@ -91,7 +91,6 @@ function JambaUtilities:AddRealmToNameIfNotNil( name, realm ) return fullName end - -- Money constants. JambaUtilities.COLOUR_COPPER = "eda55f" JambaUtilities.COLOUR_SILVER = "c7c7cf" @@ -187,4 +186,19 @@ function JambaUtilities:FixValueToRange( value, minValue, maxValue ) value = maxValue end return value -end \ No newline at end of file +end + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Jamba/LibActionButtonJamba-1.0.lua b/Jamba/LibActionButtonJamba-1.0.lua index 5de0d97..93899c3 100644 --- a/Jamba/LibActionButtonJamba-1.0.lua +++ b/Jamba/LibActionButtonJamba-1.0.lua @@ -1,5 +1,5 @@ --[[ -Copyright (c) 2010-2014, Hendrik "nevcairiel" Leppkes <h.leppkes@gmail.com> +Copyright (c) 2010-2015, Hendrik "nevcairiel" Leppkes <h.leppkes@gmail.com> All rights reserved. @@ -29,12 +29,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ]] local MAJOR_VERSION = "LibActionButtonJamba-1.0" -local MINOR_VERSION = 60 +local MINOR_VERSION = 66 if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end local lib, oldversion = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION) if not lib then return end +local IsLegion = select(4, GetBuildInfo()) >= 70000 + -- Lua functions local _G = _G local type, error, tostring, tonumber, assert, select = type, error, tostring, tonumber, assert, select @@ -60,6 +62,7 @@ local str_match, format, tinsert, tremove = string.match, format, tinsert, tremo local KeyBound = LibStub("LibKeyBound-1.0", true) local CBH = LibStub("CallbackHandler-1.0") local LBG = LibStub("LibButtonGlow-1.0", true) +local Masque = LibStub("Masque", true) lib.eventFrame = lib.eventFrame or CreateFrame("Frame") lib.eventFrame:UnregisterAllEvents() @@ -69,8 +72,8 @@ lib.activeButtons = lib.activeButtons or {} lib.actionButtons = lib.actionButtons or {} lib.nonActionButtons = lib.nonActionButtons or {} -lib.unusedOverlayGlows = lib.unusedOverlayGlows or {} -lib.numOverlays = lib.numOverlays or 0 +lib.ChargeCooldowns = lib.ChargeCooldowns or {} +lib.NumChargeCooldowns = lib.NumChargeCooldowns or 0 lib.ACTION_HIGHLIGHT_MARKS = lib.ACTION_HIGHLIGHT_MARKS or setmetatable({}, { __index = ACTION_HIGHLIGHT_MARKS }) @@ -113,6 +116,7 @@ local Update, UpdateButtonState, UpdateUsable, UpdateCount, UpdateCooldown, Upda local StartFlash, StopFlash, UpdateFlash, UpdateHotkeys, UpdateRangeTimer, UpdateOverlayGlow local UpdateFlyout, ShowGrid, HideGrid, UpdateGrid, SetupSecureSnippets, WrapOnClick local ShowOverlayGlow, HideOverlayGlow +local EndChargeCooldown local InitializeEventHandler, OnEvent, ForAllButtons, OnUpdate @@ -488,6 +492,10 @@ function Generic:AddToMasque(group) self.MasqueSkinned = true end +function Generic:UpdateAlpha() + UpdateCooldown(self) +end + ----------------------------------------------------------- --- frame scripts @@ -1022,6 +1030,10 @@ function Update(self) end self.cooldown:Hide() self:SetChecked(false) + + if self.chargeCooldown then + EndChargeCooldown(self.chargeCooldown) + end end -- Add a green border if button is an equipped item @@ -1157,7 +1169,7 @@ function UpdateCount(self) end else local charges, maxCharges, chargeStart, chargeDuration = self:GetCharges() - if charges and maxCharges and maxCharges > 0 then + if charges and maxCharges and maxCharges > 1 then self.Count:SetText(charges) else self.Count:SetText("") @@ -1165,14 +1177,57 @@ function UpdateCount(self) end end -function OnCooldownDone(self) +function EndChargeCooldown(self) + self:Hide() + self:SetParent(UIParent) + self.parent.chargeCooldown = nil + self.parent = nil + tinsert(lib.ChargeCooldowns, self) +end + +local function StartChargeCooldown(parent, chargeStart, chargeDuration) + if not parent.chargeCooldown then + local cooldown = tremove(lib.ChargeCooldowns) + if not cooldown then + lib.NumChargeCooldowns = lib.NumChargeCooldowns + 1 + cooldown = CreateFrame("Cooldown", "LAB10ChargeCooldown"..lib.NumChargeCooldowns, parent, "CooldownFrameTemplate"); + cooldown:SetScript("OnCooldownDone", EndChargeCooldown) + cooldown:SetHideCountdownNumbers(true) + cooldown:SetDrawEdge(true) + cooldown:SetDrawSwipe(false) + end + cooldown:SetParent(parent) + cooldown:SetAllPoints(parent) + cooldown:SetFrameStrata("TOOLTIP") + cooldown:Show() + parent.chargeCooldown = cooldown + cooldown.parent = parent + end + -- set cooldown + parent.chargeCooldown:SetDrawBling(parent.chargeCooldown:GetEffectiveAlpha() > 0.5) + parent.chargeCooldown:SetCooldown(chargeStart, chargeDuration) + + -- update charge cooldown skin when masque is used + if Masque and Masque.UpdateCharge then + Masque:UpdateCharge(parent) + end + + if not chargeStart or chargeStart == 0 then + EndChargeCooldown(parent.chargeCooldown) + end +end + +local function OnCooldownDone(self) self:SetScript("OnCooldownDone", nil) UpdateCooldown(self:GetParent()) end function UpdateCooldown(self) local locStart, locDuration = self:GetLossOfControlCooldown() - local start, duration, enable, charges, maxCharges = self:GetCooldown() + local start, duration, enable = self:GetCooldown() + local charges, maxCharges, chargeStart, chargeDuration = self:GetCharges() + + self.cooldown:SetDrawBling(self.cooldown:GetEffectiveAlpha() > 0.5) if (locStart + locDuration) > (start + duration) then if self.cooldown.currentCooldownType ~= COOLDOWN_TYPE_LOSS_OF_CONTROL then @@ -1181,7 +1236,11 @@ function UpdateCooldown(self) self.cooldown:SetHideCountdownNumbers(true) self.cooldown.currentCooldownType = COOLDOWN_TYPE_LOSS_OF_CONTROL end - CooldownFrame_SetTimer(self.cooldown, locStart, locDuration, 1, nil, nil, true) + if IsLegion then + CooldownFrame_Set(self.cooldown, locStart, locDuration, true, true) + else + CooldownFrame_SetTimer(self.cooldown, locStart, locDuration, 1, true) + end else if self.cooldown.currentCooldownType ~= COOLDOWN_TYPE_NORMAL then self.cooldown:SetEdgeTexture("Interface\\Cooldown\\edge") @@ -1192,7 +1251,17 @@ function UpdateCooldown(self) if locStart > 0 then self.cooldown:SetScript("OnCooldownDone", OnCooldownDone) end - CooldownFrame_SetTimer(self.cooldown, start, duration, enable, charges, maxCharges) + + if charges and maxCharges and charges > 0 and charges < maxCharges then + StartChargeCooldown(self, chargeStart, chargeDuration) + elseif self.chargeCooldown then + EndChargeCooldown(self.chargeCooldown) + end + if IsLegion then + CooldownFrame_Set(self.cooldown, start, duration, enable) + else + CooldownFrame_SetTimer(self.cooldown, start, duration, enable) + end end end @@ -1335,15 +1404,6 @@ function UpdateRangeTimer() rangeTimer = -1 end -local function GetSpellIdByName(spellName) - if not spellName then return end - local spellLink = GetSpellLink(spellName) - if spellLink then - return tonumber(spellLink:match("spell:(%d+)")) - end - return nil -end - ----------------------------------------------------------- --- WoW API mapping --- Generic Button diff --git a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc b/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc index 6b35492..3644493 100644 --- a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc +++ b/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc @@ -1,5 +1,8 @@ -## Interface: 50300 - +## Interface: 60200 +## X-Curse-Packaged-Version: r53 +## X-Curse-Project-Name: AceGUI-3.0-SharedMediaWidgets +## X-Curse-Project-ID: ace-gui-3-0-shared-media-widgets +## X-Curse-Repository-ID: wow/ace-gui-3-0-shared-media-widgets/mainline ## Title: Lib: AceGUI-3.0-SharedMediaWidgets ## Notes: Enables AceGUI-3.0 widgets for the 5 basic SharedMedia-3.0 types @@ -8,9 +11,9 @@ ## 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\Libstub\Libstub.lua +# Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml +# Libs\AceGUI-3.0\AceGUI-3.0.xml #@end-no-lib-strip@ widget.xml \ No newline at end of file diff --git a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua b/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua index e181b23..0b75952 100644 --- a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua +++ b/Jamba/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 = 10 + local widgetVersion = 11 local contentFrameCache = {} local function ReturnSelf(self) @@ -57,8 +57,8 @@ do local font, size = text:GetFont() text:SetFont(font,size,"OUTLINE") - text:SetPoint("LEFT", check, "RIGHT", 1, 0) - text:SetPoint("RIGHT", frame, "RIGHT", -2, 0) + text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0) + text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0) text:SetJustifyH("LEFT") text:SetText("Test Test Test Test Test Test Test") frame.text = text diff --git a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua b/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua index 0f06117..0cd2959 100644 --- a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua +++ b/Jamba/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 = 10 + local widgetVersion = 11 local contentFrameCache = {} local function ReturnSelf(self) @@ -55,8 +55,8 @@ do check:Hide() frame.check = check local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite") - text:SetPoint("LEFT", check, "RIGHT", 1, 0) - text:SetPoint("RIGHT", frame, "RIGHT", -2, 0) + text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0) + text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0) text:SetJustifyH("LEFT") text:SetText("Test Test Test Test Test Test Test") frame.text = text diff --git a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua b/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua index 1cd19e4..eadf35f 100644 --- a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua +++ b/Jamba/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 = 10 + local widgetVersion = 11 local contentFrameCache = {} local function ReturnSelf(self) @@ -44,8 +44,8 @@ do check:Hide() frame.check = check local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite") - text:SetPoint("LEFT", check, "RIGHT", 1, 0) - text:SetPoint("RIGHT", frame, "RIGHT", -2, 0) + text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0) + text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0) text:SetJustifyH("LEFT") text:SetText("Test Test Test Test Test Test Test") frame.text = text diff --git a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua b/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua index c2d3d84..1d39c28 100644 --- a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua +++ b/Jamba/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 = 10 + local widgetVersion = 11 local contentFrameCache = {} local function ReturnSelf(self) @@ -68,8 +68,8 @@ do frame.speakeron = speakeron local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite") - text:SetPoint("LEFT", check, "RIGHT", 1, 0) - text:SetPoint("RIGHT", soundbutton, "LEFT", -2, 0) + text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0) + text:SetPoint("BOTTOMRIGHT", soundbutton, "BOTTOMLEFT", -2, 0) text:SetJustifyH("LEFT") text:SetText("Test Test Test Test Test Test Test") frame.text = text diff --git a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua b/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua index d8930dd..2d0e32c 100644 --- a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua +++ b/Jamba/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 = 10 + local widgetVersion = 11 local contentFrameCache = {} local function ReturnSelf(self) @@ -53,8 +53,8 @@ do local font, size = text:GetFont() text:SetFont(font,size,"OUTLINE") - text:SetPoint("LEFT", check, "RIGHT", 3, 0) - text:SetPoint("RIGHT", frame, "RIGHT", -2, 0) + text:SetPoint("TOPLEFT", check, "TOPRIGHT", 3, 0) + text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0) text:SetJustifyH("LEFT") text:SetText("Test Test Test Test Test Test Test") frame.text = text diff --git a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua b/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua index 0c8701b..1af9928 100644 --- a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua +++ b/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua @@ -3,7 +3,7 @@ local DataVersion = 9001 -- dev version always overwrites everything else :) --@end-debug@]===] --@non-debug@ -local DataVersion = 47 +local DataVersion = 53 --@end-non-debug@ local AGSMW = LibStub:NewLibrary("AceGUISharedMediaWidgets-1.0", DataVersion) @@ -57,7 +57,6 @@ do local frame = CreateFrame("Frame", nil, UIParent) frame:SetHeight(44) frame:SetWidth(200) - frame:SetPoint("CENTER", UIParent, "CENTER") local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall") label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0) diff --git a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt b/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt new file mode 100644 index 0000000..91e3976 --- /dev/null +++ b/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt @@ -0,0 +1,7 @@ +------------------------------------------------------------------------ +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/Jamba/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua b/Jamba/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua index 0dae68c..06f5d52 100644 --- a/Jamba/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua +++ b/Jamba/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua @@ -284,6 +284,21 @@ local function Constructor() sizer_e:SetScript("OnMouseUp", MoverSizer_OnMouseUp) --Container Support + + local content = CreateFrame("Frame",nil,frame) + self.content = content + content.obj = self + content:SetPoint("TOPLEFT",frame,"TOPLEFT",12,-32) + content:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-12,13) + + AceGUI:RegisterAsContainer(self) + return self + +end + + + +--[[ local content = CreateFrame("Frame", nil, frame) content:SetPoint("TOPLEFT", 17, -27) content:SetPoint("BOTTOMRIGHT", -17, 40) @@ -307,5 +322,5 @@ local function Constructor() return AceGUI:RegisterAsContainer(widget) end - +--]] AceGUI:RegisterWidgetType(Type, Constructor, Version) diff --git a/Jamba/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua b/Jamba/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua index f25d46c..b7060aa 100644 --- a/Jamba/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua +++ b/Jamba/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua @@ -147,6 +147,7 @@ local function Constructor() texture:SetWidth(16) texture:SetHeight(16) texture:SetTexture(1, 1, 1) + --texture:SetColorTexture(1, 1, 1) texture:SetPoint("CENTER", colorSwatch) texture:Show() diff --git a/Jamba/Libs/LibBabble-Class-3.0/LibBabble-Class-3.0.toc b/Jamba/Libs/LibBabble-Class-3.0/LibBabble-Class-3.0.toc index e2e71ed..6e0154f 100644 --- a/Jamba/Libs/LibBabble-Class-3.0/LibBabble-Class-3.0.toc +++ b/Jamba/Libs/LibBabble-Class-3.0/LibBabble-Class-3.0.toc @@ -6,7 +6,10 @@ ## Notes-frFR: Une bibliothèque d'aide à la localisation. ## Notes-esES: Una biblioteca para ayudar con las localizaciones. ## Author: ckknight - +## X-Curse-Packaged-Version: Beta-4.3i-1-g3e0e1d6 +## X-Curse-Project-Name: Jamba +## X-Curse-Project-ID: jamba +## X-Curse-Repository-ID: wow/jamba/mainline LibStub\LibStub.lua lib.xml diff --git a/Jamba/Libs/LibBabble-Inventory-3.0/LibBabble-Inventory-3.0.toc b/Jamba/Libs/LibBabble-Inventory-3.0/LibBabble-Inventory-3.0.toc index 25173c1..b786a8c 100644 --- a/Jamba/Libs/LibBabble-Inventory-3.0/LibBabble-Inventory-3.0.toc +++ b/Jamba/Libs/LibBabble-Inventory-3.0/LibBabble-Inventory-3.0.toc @@ -4,7 +4,10 @@ ## Notes: A library to help with localization of item types and subtypes. ## Notes-esES: Una libreria para ayudar con la traduccion de tipos y subtipos de objetos. ## Author: ckknight - +## X-Curse-Packaged-Version: Beta-4.3i-1-g3e0e1d6 +## X-Curse-Project-Name: Jamba +## X-Curse-Project-ID: jamba +## X-Curse-Repository-ID: wow/jamba/mainline LibStub\LibStub.lua lib.xml diff --git a/Jamba/Libs/LibBabble-Inventory-3.0/LibStub/LibStub.toc b/Jamba/Libs/LibBabble-Inventory-3.0/LibStub/LibStub.toc index 3d1f018..e668707 100644 --- a/Jamba/Libs/LibBabble-Inventory-3.0/LibStub/LibStub.toc +++ b/Jamba/Libs/LibBabble-Inventory-3.0/LibStub/LibStub.toc @@ -2,4 +2,9 @@ ## Title: Lib: LibStub ## Notes: Universal Library Stub ## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel +## X-Curse-Packaged-Version: Beta-4.3i-1-g3e0e1d6 +## X-Curse-Project-Name: Jamba +## X-Curse-Project-ID: jamba +## X-Curse-Repository-ID: wow/jamba/mainline + LibStub.lua diff --git a/Jamba/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.toc b/Jamba/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.toc index d79d8c8..b72ed09 100644 --- a/Jamba/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.toc +++ b/Jamba/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.toc @@ -8,6 +8,14 @@ ## X-Website: http://www.wowace.com/addons/libbuttonglow-1-0/ ## Version: 1.2.1 ## OptionalDeps: Masque +## X-Curse-Packaged-Version: 1.2.1 +## X-Curse-Project-Name: LibButtonGlow-1.0 +## X-Curse-Project-ID: libbuttonglow-1-0 +## X-Curse-Repository-ID: wow/libbuttonglow-1-0/mainline +## X-Curse-Packaged-Version: Beta-4.3i-1-g3e0e1d6 +## X-Curse-Project-Name: Jamba +## X-Curse-Project-ID: jamba +## X-Curse-Repository-ID: wow/jamba/mainline LibStub\LibStub.lua diff --git a/Jamba/Libs/LibButtonGlow-1.0/LibStub/LibStub.toc b/Jamba/Libs/LibButtonGlow-1.0/LibStub/LibStub.toc index 5cb49fb..1708840 100644 --- a/Jamba/Libs/LibButtonGlow-1.0/LibStub/LibStub.toc +++ b/Jamba/Libs/LibButtonGlow-1.0/LibStub/LibStub.toc @@ -8,5 +8,10 @@ ## X-Curse-Packaged-Version: 1.0 ## X-Curse-Project-Name: LibStub ## X-Curse-Project-ID: libstub +## X-Curse-Repository-ID: wow/libstub/mainline +## X-Curse-Packaged-Version: Beta-4.3i-1-g3e0e1d6 +## X-Curse-Project-Name: Jamba +## X-Curse-Project-ID: jamba +## X-Curse-Repository-ID: wow/jamba/mainline LibStub.lua diff --git a/Jamba/Libs/LibDeformat-3.0/LibDeformat-3.0.toc b/Jamba/Libs/LibDeformat-3.0/LibDeformat-3.0.toc index af0d1b1..08d34c6 100644 --- a/Jamba/Libs/LibDeformat-3.0/LibDeformat-3.0.toc +++ b/Jamba/Libs/LibDeformat-3.0/LibDeformat-3.0.toc @@ -6,6 +6,10 @@ ## X-Category: Library ## X-License: MIT ## LoadOnDemand: 1 +## X-Curse-Packaged-Version: Beta-4.3i-1-g3e0e1d6 +## X-Curse-Project-Name: Jamba +## X-Curse-Project-ID: jamba +## X-Curse-Repository-ID: wow/jamba/mainline LibStub\LibStub.lua lib.xml diff --git a/Jamba/Libs/LibGratuity-3.0/LibGratuity-3.0.toc b/Jamba/Libs/LibGratuity-3.0/LibGratuity-3.0.toc index 41d6460..8219037 100644 --- a/Jamba/Libs/LibGratuity-3.0/LibGratuity-3.0.toc +++ b/Jamba/Libs/LibGratuity-3.0/LibGratuity-3.0.toc @@ -5,5 +5,10 @@ ## Author: Tekkub Stoutwrithe ## Version: r$Revision: 41183 $ ## LastUpdate: $Date: 2007-06-21 15:59:31 -1000 (Thu, 21 Jun 2007) $ +## X-Curse-Packaged-Version: Beta-4.3i-1-g3e0e1d6 +## X-Curse-Project-Name: Jamba +## X-Curse-Project-ID: jamba +## X-Curse-Repository-ID: wow/jamba/mainline + LibStub\LibStub.lua lib.xml diff --git a/Jamba/Libs/LibGratuity-3.0/LibStub/LibStub.toc b/Jamba/Libs/LibGratuity-3.0/LibStub/LibStub.toc index 177947e..56a5a75 100644 --- a/Jamba/Libs/LibGratuity-3.0/LibStub/LibStub.toc +++ b/Jamba/Libs/LibGratuity-3.0/LibStub/LibStub.toc @@ -2,5 +2,9 @@ ## Title: Lib: LibStub ## Notes: Universal Library Stub ## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel +## X-Curse-Packaged-Version: Beta-4.3i-1-g3e0e1d6 +## X-Curse-Project-Name: Jamba +## X-Curse-Project-ID: jamba +## X-Curse-Repository-ID: wow/jamba/mainline LibStub.lua diff --git a/Jamba/Libs/UTF8/UTF8.toc b/Jamba/Libs/UTF8/UTF8.toc index e90b134..e971b12 100644 --- a/Jamba/Libs/UTF8/UTF8.toc +++ b/Jamba/Libs/UTF8/UTF8.toc @@ -1,5 +1,9 @@ ## Interface: 60000 ## Version: v1.1 +## X-Curse-Packaged-Version: Beta-4.3i-1-g3e0e1d6 +## X-Curse-Project-Name: Jamba +## X-Curse-Project-ID: jamba +## X-Curse-Repository-ID: wow/jamba/mainline ## Title: Lib: UTF8 ## Notes: A library for manipulating UTF-8 strings diff --git a/Jamba/Locales/JambaCore-Locale-enUS.lua b/Jamba/Locales/JambaCore-Locale-enUS.lua index 1be9ba5..08210c1 100644 --- a/Jamba/Locales/JambaCore-Locale-enUS.lua +++ b/Jamba/Locales/JambaCore-Locale-enUS.lua @@ -5,6 +5,9 @@ License: The MIT License ]]-- local L = LibStub("AceLocale-3.0"):NewLocale( "Jamba-Core", "enUS", true ) +--Change ME when update version +L["Version"] = "5.0" +--End of Changeme L["Slash Commands"] = true L["Team"] = true L["Quest"] = true @@ -41,14 +44,28 @@ L["Change Channel"] = true L["Change the communications channel."] = true L["Jamba4"] = true L["Jamba"] = true + +L["The Awesome Multi-Boxer Assistant"] = true + + L["Jafula's Awesome Multi-Boxer Assistant"] = true + L["Copyright 2008-2016 Michael 'Jafula' Miller, Now managed By Ebony"] = true -L["Special thanks to Michael 'Jafula' Miller who made Jamba"] = true + +L["Copyright 2008-2016 Michael 'Jafula' Miller, Released Under The MIT License"] = true +L["Current Project Manager - Jennifer 'Ebony'"] = true +L["Special thanks:"] = true +L["To Schilm (Max Schilling) for building Advanced Loot and The changes to Jamba-Quest for 4.3"] = true +L["To Schilm (Max Schilling) for Advanced Loot and Jamba-Quest for 4.3"] = true +L["To Olipcs on dual-boxing.com for writing the FTL Helper module."] = true +L["To Michael 'Jafula' Miller who made Jamba"] = true L["Made For MultiBoxing"] = true L["Help & Documentation"] = true L["For user manuals and documentation please visit:"] = true -L["Other useful websites:"] = true -L["http://dual-boxing.com/"] = true +L["Useful websites:"] = true +L["www.dual-boxing.com"] = true +L["www.isboxer.com"] = true +L["www.twitter.com/jenn_ebony"] = true L["Special thanks to olipcs on dual-boxing.com for writing the FTL Helper module."] = true L["Advanced Loot by schilm (Max Schilling) - modified by Tehtsuo and Jafula."] = true L["Attempting to reset the Jamba Settings Frame."] = true @@ -61,10 +78,34 @@ L["Assume All Team Members Always Online*"] = true L["Boost Jamba to Jamba Communications**"] = true L["**reload UI to take effect, may cause disconnections"] = true L["*reload UI to take effect"] = true -L["Release Notes / News"] = true +L["Release Notes / News: "] = true L["Close and Do Not Show Again"] = true L["Close"] = true +L["Commands"] = true +L["Module Not Loaded:"] = true -- test stuff L["**Untick this to use the WIP Set Offline team List Set offline Button"] =true L["Use Team List Offline Button"] = true -L["Auto Set Team Members On and Off Line"] = true \ No newline at end of file +L["Auto Set Team Members On and Off Line"] = true +L[""] = true +L["Full Change Log"] = true +--Change Log Infomation +L["Full ChangeLog"] = true +L["ChangeLog"] = true +L["Shows the Full changelog\nOpens a new Frame."] = true +L["Text1"] = "Welcome to Legion 7.0.3!" +L["Text2"] = "" +L["Text3"] = "Jamba Has Had a Lot of changes here is a few important ones to check out" +L["Text4"] = "" +L["Text5"] = "Display-team has some nice new changes!." +L["Text6"] = "Honor/XP/Artifact/Rep are now on the same bar." +L["Text7"] = "" +L["Text8"] = "QuestLog changes with a Dropdown-Menu." +L["Text9"] = "Quest Watcher Been renamed and now Supports Most Objectives." +L["Text10"] = "Now Easyer To UseCurrency!" + + + + + + diff --git a/Jamba/Locales/JambaMessage-Locale-enUS.lua b/Jamba/Locales/JambaMessage-Locale-enUS.lua index ceeda5b..ed282d2 100644 --- a/Jamba/Locales/JambaMessage-Locale-enUS.lua +++ b/Jamba/Locales/JambaMessage-Locale-enUS.lua @@ -6,8 +6,8 @@ License: The MIT License local L = LibStub("AceLocale-3.0"):NewLocale( "Jamba-Message", "enUS", true ) L["Slash Commands"] = true -L["Advanced"] = true -L["Core: Message Display"] = true +L["Chat"] = true +L["Message Display"] = true L["Push Settings"] = true L["Push the message settings to all characters in the team."] = true L["Settings received from A."] = function( characterName ) diff --git a/Jamba/Locales/JambaTeam-Locale-enUS.lua b/Jamba/Locales/JambaTeam-Locale-enUS.lua index 142aa7b..3ce06dd 100644 --- a/Jamba/Locales/JambaTeam-Locale-enUS.lua +++ b/Jamba/Locales/JambaTeam-Locale-enUS.lua @@ -14,12 +14,12 @@ L["Add a member to the team list."] = true L["Remove"] = true L["Remove a member from the team list."] = true L["Master"] = true +L["Party Loot Control"] = true L["Set OffLine"] = true L["Set On-Line"] = true L["Master Can not be Set OffLine"] = true --wip L["WIP: This Button Does absolutely nothing at all, Unless you untick Use team List Offline Button in Core:communications Under Advanced. Report bugs to to me -EBONY"] = true ---L["WIP: This Button DOES NOTHING, absolutely nothing at all"] = true L["Set the master character."] = true L["I Am Master"] = true L["Set this character to be the master character."] = true @@ -43,11 +43,14 @@ L["Accept from friends."] = true L["Accept from BattleNet/RealD friends."] = true L["Accept from guild."] = true L["Decline from strangers."] = true + L["Party Loot Control"] = true L["Automatically set the Loot Method to..."] = true L["Free For All"] = true -L["Master Looter"] = true +L["Master Guild Looter"] = true L["Personal Loot"] = true +L["Free For All"] = true +L["Group Loot"] = true L["Minions Opt Out of Loot"] = true L["Minion"] = true L["(Offline)"] = true @@ -77,4 +80,40 @@ L["Set Team OffLine"] = true L["Set All Team Members OnLine"] = true L["Set Team OnLine"] = true L["Set Offline"] = true -L["Sets a member offline"] = true \ No newline at end of file +L["Sets a member offline"] = true + + +-- ebony tooltip work and Gui Changes. + +L["Move the character up a place in the team list"] = true +L["Move the character down a place in the team list"] = true +L["Adds a member to the team list\nYou can Use:\nCharacterName\nCharacterName-realm\n@Target\n@Mouseover"] = true +L["Adds all Party members to the team list"] = true +L["Removes Party members from the team list"] = true +L["Set the selected member to be the master of the group"] = true +L["Invites all Team members online to a party or raid.\nThis can be set as a keyBinding"] = true +L["Asks all Team members to leave a party or raid.\nThis can be set as a keyBinding"] = true +L["The master will be the set to the focus if a team member"] = true +L["Master will always be the party leader."] = true +L["Sets click-to-move on Minions"] = true +L["Auto Accept invites from the team."] = true +L["Auto Accept invites from your friends list."] = true +L["Auto Accept invites from your Battlenet list."] = true +L["Auto Accept invites from your Guild."] = true +L["Set loot to Group Loot."] = true +L["Automatically set the Loot Method to\nFree For All\nPrsonal Loot\nGroup Loot"] = true +L["Decline invites from anyone else."] = true +L["Friends Use the same loot as if they was a team member."] = true +L["Minions Don't need loot."] = true +L["Set to Group Loot "] = true +L["Override: Set loot to Group Loot if stranger is in group."] = true +L["Set the Loot Method to..."] = true +L["Accept from BattleNet friends."] = true +L["Auto Accept invites from your Battlenet or RealID Friends list."] = true +L["Auto Convert To Raid if team is over five character's"] = true +L["Auto Convert To Raid"] = true +L["Promote Master to party leader."] = true +L["Set the Master to the Focus."] = true +L["Focus will set master toon."] = true +L["The master will be the set from the focus target if a team member \n\nNote: All team members must be setting the focus."] = true +L["Party Loot Control (Instances)"] = true \ No newline at end of file diff --git a/Jamba/startupmessage.html b/Jamba/startupmessage.html index e08399f..19da2b7 100644 --- a/Jamba/startupmessage.html +++ b/Jamba/startupmessage.html @@ -1,39 +1,173 @@ <html><body> -<h1>Jamba Release Notes / News</h1> +<h1 align="center">|cffee4400 Welcome to Jamba 5.0 for Patch 7.0.3 Legion! |r</h1> <br/> -<h1>Whats New:</h1> +<h2 align="center">|cffee1110 Jamba-Proc |r</h2> <br/> -<h2>Cross Realm Support Added</h2> -<p>* Jamba 4.0+ cross realm & connected realms character support added.</p> -<p>* Character names now must be in name-server format, .e.g. Ebony-Outland</p><br/> -<h3>Notes:</h3> -<p>CR = Connected Realms - EG You can trade/join guild ETC. Jamba will function as though your team is on the same realm!</p> -<p>CR = CrossRealm - Join a realm over CRZ tech. Note: Some modules in Jamba will not function or will not work correctly while in CRZ. This is due to limitations in Blizzard's API. You can talk over realms with addons, however YOU NEED TO BE IN PARTY WITH THE MEMBER FOR ANYTHING TO WORK!</p> +<p>-Removed </p> <br/> -<h2>Automated Offline System Added:</h2> +<p>-As its not updated anymore and i don't feel i can do it any better then other addons out there. ( i feel my time can be spent better somewhere else on the project)</p> <br/> -<p>* Jamba will now automatically set minions offline if the minion is not online. Jamba will dectect when the minion comes online and sets the status to online. You can now have a full list of characters and not have to worry about online/offline. Easy switching!</p> +<p>-You can download this as a separate Download if you wish.</p> <br/> -<h2>Jamba-QuestWatcher:</h2> +<h2 align="center">|cffee1110 Jamba-Core |r</h2> <br/> -<p>* Supports Bonus Objectives.</p> +<p>- Some Back-End Work for Legion/7.0.x</p> <br/> -<h2>Having Problems With Your Teams?</h2> +<p>- New tooltips on the options config to help make it easier to understand what some buttons to do and to clean up some of the long line texts. </p> <br/> -<p>* Remember to do the following fixes on every character in your team!</p> -* -If your team list is full of empty lines, please reset the current profile. Warning this will require you to configure everything again. You can -reset the current profile with the following button: /jamba > Profiles > Core: Profiles > Reset Profile -<p>* Make sure to add characters into your team list with their name, followed by a dash and the server the character is on. e.g. Ebony-servername</p> +<p>- Changed Help to Commands - as it shows more of the command Line stuff.</p> <br/> -<h2>ISBoxer Users</h2> +<p>- If a Module is not loaded on all characters then it no longer Lua-Error and tells the client what Module will need to be loaded.</p> <br/> -<p>* Please make sure your ISBoxer version is ISBoxer 41.10.1115.1 or higher.</p> -<p>* When ISBoxer manages your Jamba Team for you, it will add the characters with the correct name format if you have filled out the server name in your ISBoxer character.</p> -<p>*Jamba will remove any spaces Isboxers trys to add. No realm can have a space in the name.</p> +<p>- Updated LibActionButton</p> <br/> -<h2>Need Help?</h2> +<p>- Updated AceGUI-3.0-SharedMediaWidgets</p> <br/> -<p>Please post in this thread on dual-boxing.com: http://www.dual-boxing.com/threads/52151-Addon-Jamba-4-0-An-assistant-for-Multiboxers-Release-for-WoW-6<br/> -</p> +<p>- Updated settings Frame for config. Resize and close button.</p> +<br/> +<h2 align="center">|cffee1110 Jamba-Team |r</h2> +<br/> +<p>- Added two new ways to add team members to the team with the command line and GUI.</p> +<br/> +<p>---@target will add your current target to the team list</p> +<br/> +<p>---@mouseOver Will add your current MouseOver to the team list.</p> +<br/> +<p>- cleaned up some loot code. and some offline code.</p> +<br/> +<p>- Loot can olny be set to Group/FFA/Personal. ( Olny works in a Instances )</p> +<br/> +<h2 align="center">|cffee1110 Jamba-Quest-Tracker |r</h2> +<br/> +<p>-Renamed from Jamba Quest Watcher to Jamba Objective Tracker(To fit in line with blizzards own naming)</p> +<br/> +<p>- Now Shows Scenario Objective on the watcher.</p> +<br/> +<p>- Shows Bouns Scenario Objective.</p> +<br/> +<p>- Fixed with Broken Shore QuestLines a % bar needed coding in.</p> +<p>- Only Show stage if there is more the one stage (so does not show in dungeons.)</p> +<br/> +<p>- Added support to change the font And text size</p> +<br/> +<p>- Now automatically sets the frame to the Right Hand Side of the UI.</p> +<br/> +<h2 align="center">|cffee1110 Jamba-Quest |r</h2> +<br/> +<p>- A big thanks to Schilm from dual-boxing.com to the new changes. little edited by me </p> +<br/> +<p>- Added buttons to blizzard Quest Rightclick Dropdown Menu to Track and un-track and to abandon all quests.</p> +<br/> +<p>-New Bar Now part of the QuestMap Frame. with new buttons</p> +<br/> +<p>--Abandon All</p> +<p>-Works just like it used to. It loops through all of your toons and abandons all the quests on each toon.</p> +<p>-Now ignores quests that cannot be abandoned, such as the Account Wide quests Luxlunae mentioned.</p> +<br/> +<p>--Share All</p> +<p>-Used to just loop through the current toons quests and just shared those, NOW loops through all toons and attempts to share all Quests from all toons.</p> +<br/> +<p>--Track All</p> +<p>-Back from the abyss!!!</p> +<p>-Used to just loop through the current toons quests and just tracked those, NOW loops through all toons and attempts to track all Quests from all toons.</p> +<br/> +<p>--Untrack All</p> +<p>-Back from the abyss!!!</p> +<p>-Used to just loop through the current toons quests and just untracked those, NOW loops through all toons and attempts to un-tracks all Quests from all toons.</p> +<br/> +<h2 align="center">|cffee1110 Jamba-Display-Team |r</h2> +<br/> +<p>- Values are now Abbreviated to smaller Numbers.</p> +<br/> +<p>- No longer Shows max Value when showing Percentage</p> +<br/> +<p>- Added support to change the font And text size</p> +<br/> +<p>- Added a NewTooltip when you hover over Follow bar to show</p> +<p>* Level of minion If not level capped.</p> +<p>* ItemLevel of minion.</p> +<p>* Durability of the minion.</p> +<p>* Bag Space of the minion.</p> +<p>* Gold of the minion.</p> +<p>* Mail if the minion has mail and who it is from (Same as minimap)</p> +<br/> +<p>- Tooltip should no longer show in combat.</p> +<br/> +<p>- Removed the old Display Bag Space Bar added to tooltips</p> +<br/> +<p>- Renamed "Combo PointBar" to "Class Power Bar"</p> +<br/> +<p>- Added Support for Other class Power</p> +<p>* Warlocks - Soul Shards</p> +<p>* Paladin - Holy Power</p> +<p>* DeathKight - Runes</p> +<p>* Mage - ARCANE CHARGES</p> +<p>* Monk - CHI</p> +<br/> +<p>- Removed the Old Reputation bar.</p> +<br/> +<p>- Changes to the XP bar.</p> +<p>* Your can show up for four XP Bars For the 4 XP type each bar is on the same XP frame and makes each bar a little smaller.</p> +<p>** Xp, Players XP.</p> +<p>** Artifact XP, Show the players weapon Artifact XP.</p> +<p>** Show Honor XP, Show a bar for the new honor xp bar.</p> +<p>** Show Reputation, show a bar for Reputation</p> +<br/> +<p>- Added new checks to fix The FollowDance when spamming follow key.</p> +<br/> +<p>- You can now specify the number of characters per row up to 10.</p> +<br/> +<h2 align="center">|cffee1110 Jamba-Toon |r</h2> +<br/> +<p>- Removed Jamba-Currency From the toon module</p> +<br/> +<p>- Added Team Release Prompts when you die to Release the spirits of all minions. And release back to the minions bodies.</p> +<br/> +<h2 align="center">|cffee1110 Jamba-Curr |r</h2> +<br/> +<p>- All Currency Information</p> +<br/> +<p>- There is a now a DropDown Box to show the Currency's you like to show</p> +<br/> +<p>- You can Have a max of 6 Currencies.</p> +<br/> +<p>- Now shows Currency Icon Then The Three Letters of text.</p> +<br/> +<p>- Now shows the Currency Gold Icons when showing gold/Sliver/Copper</p> +<br/> +<p>- No Longer Shows Currency for Offline minions.</p> +<br/> +<p>- Should Now Order minions That are Offline/Online correctly.</p> +<br/> +<p>- Added support to change the font And text size.</p> +<br/> +<h2 align="center">|cffee1110 Jamba-Taxi |r</h2> +<br/> +<p>- Fixed a Frame Bug with The new flight maps in broken island (Legion Zones)</p> +<br/> +<h2 align="center">|cffee1110 Jamba-AdvancedLoot |r</h2> +<br/> +<p>- Fixed a text bug that was not working with trade goods. (cloth)</p> +<br/> +<p>- Personal-Loot OverRights The Advanced Loot list. </p> +<br/> +<h2 align="center">|cffee1110 Jamba-ItemUse |r</h2> +<br/> +<p>- You can now Use spells on the item bar without errors.</p> +<br/> +<p>- Now Automatically sets to the Bottom Right then the center of the UI.</p> +<br/> +<h2 align="center">|cffee1110 Jamba-Follow |r</h2> +<br/> +<p>- Made some backend checks to make sure follow has been really been broken. (spamming follow key should not spam "follow Borken")</p> +<p>- NoLonger warns if the player is on a taxi</p> +<br/> +<h2 align="center">|cffee1110 Jamba-FTL |r</h2> +<br/> +<p>- Added an option to turn of the Messages in chat when updating FTL...</p> +<br/> +<h2 align="center">|cffee1110 Jamba-Message |r</h2> +<br/> +<p>- Moved in options to Chat from Advanced</p> + </body></html> \ No newline at end of file