From 921fd702eb981eb2b5c00d00258ae0035b3e9a56 Mon Sep 17 00:00:00 2001 From: Ebonyfaye Date: Wed, 30 Aug 2017 17:18:28 +0100 Subject: [PATCH] jamba-5.3 for patch 7.3 --- Jamba/AceGUIContainer-JambaWindow.lua | 5 +- Jamba/CHANGELOG.txt | 191 ++++++++++++++++ Jamba/Jamba.toc | 4 +- Jamba/JambaCommunications.lua | 237 ++++++-------------- Jamba/JambaCore.lua | 27 ++- Jamba/JambaEmbeds.xml | 3 + Jamba/JambaMessage.lua | 2 +- Jamba/JambaStartupMessage.xml | 2 +- Jamba/JambaTag.lua | 2 +- Jamba/JambaTeam.lua | 212 ++++++++++------- Jamba/JambaUtilities.lua | 93 +++++++- Jamba/Libs/AceComm-3.0/AceComm-3.0.lua | 9 +- Jamba/Libs/AceConfig-3.0/AceConfig-3.0.lua | 9 +- .../AceConfigCmd-3.0/AceConfigCmd-3.0.lua | 6 +- .../AceConfigDialog-3.0/AceConfigDialog-3.0.lua | 65 ++++-- .../AceConfigRegistry-3.0.lua | 8 +- Jamba/Libs/AceEvent-3.0/AceEvent-3.0.lua | 8 +- .../AceGUI-3.0-SharedMediaWidgets.toc | 4 +- .../AceGUI-3.0-SharedMediaWidgets/widget.xml | 2 +- .../Libs/AceGUI-3.0-SharedMediaWidgets/widget.xml | 2 +- .../AceGUI-3.0/widgets/AceGUIContainer-Frame.lua | 9 +- .../widgets/AceGUIContainer-ScrollFrame.lua | 8 +- .../widgets/AceGUIContainer-TabGroup.lua | 4 +- .../widgets/AceGUIContainer-TreeGroup.lua | 9 +- .../AceGUI-3.0/widgets/AceGUIContainer-Window.lua | 9 +- .../AceGUI-3.0/widgets/AceGUIWidget-Button.lua | 4 +- .../AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua | 6 +- .../widgets/AceGUIWidget-ColorPicker.lua | 8 +- .../widgets/AceGUIWidget-DropDown-Items.lua | 16 +- .../AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua | 6 +- .../AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua | 4 +- .../widgets/AceGUIWidget-InteractiveLabel.lua | 2 +- .../Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua | 15 +- .../AceGUI-3.0/widgets/AceGUIWidget-Slider.lua | 4 +- .../LibBabble-Class-3.0/LibBabble-Class-3.0.lua | 2 +- .../LibBabble-Inventory-3.0/LibStub/tests/test.lua | 2 +- .../LibStub/tests/test3.lua | 2 +- .../LibStub/tests/test4.lua | 2 +- Jamba/Libs/LibBabble-Inventory-3.0/lib.xml | 2 +- Jamba/Libs/LibBagUtils-1.0/LibBagUtils-1.0.xml | 2 +- Jamba/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.lua | 30 +-- Jamba/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.toc | 12 +- Jamba/Libs/LibButtonGlow-1.0/LibStub/LibStub.toc | 8 - Jamba/Libs/LibDeformat-3.0/LibDeformat-3.0.lua | 2 +- Jamba/Libs/LibDeformat-3.0/lib.xml | 2 +- Jamba/Libs/LibGratuity-3.0/LibGratuity-3.0.toc | 2 +- Jamba/Libs/LibGratuity-3.0/LibStub/tests/test.lua | 2 +- Jamba/Libs/LibGratuity-3.0/LibStub/tests/test3.lua | 2 +- Jamba/Libs/LibGratuity-3.0/LibStub/tests/test4.lua | 2 +- Jamba/Libs/LibGratuity-3.0/lib.xml | 2 +- Jamba/Libs/LibSharedMedia-3.0/lib.xml | 2 +- Jamba/Libs/UTF8/UTF8.toc | 2 +- Jamba/Libs/UTF8/utf8.lua | 2 +- Jamba/Libs/UTF8/utf8data.lua | 2 +- Jamba/Locales/JambaCore-Locale-enUS.lua | 33 +-- Jamba/Locales/JambaMessage-Locale-enUS.lua | 2 +- Jamba/Locales/JambaTeam-Locale-enUS.lua | 16 +- Jamba/Locales/Locales.xml | 2 +- 58 files changed, 697 insertions(+), 435 deletions(-) diff --git a/Jamba/AceGUIContainer-JambaWindow.lua b/Jamba/AceGUIContainer-JambaWindow.lua index 7b8bc11..9b84543 100644 --- a/Jamba/AceGUIContainer-JambaWindow.lua +++ b/Jamba/AceGUIContainer-JambaWindow.lua @@ -17,7 +17,7 @@ Really the olny thing changed is to lower the setframestata for InitializePopupD --[[----------------------------------------------------------------------------- Frame Container -------------------------------------------------------------------------------]] -local Type, Version = "JambaWindow", 2 +local Type, Version = "JambaWindow", 3 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -37,7 +37,8 @@ local CreateFrame, UIParent = CreateFrame, UIParent Scripts -------------------------------------------------------------------------------]] local function Button_OnClick(frame) - PlaySound("gsTitleOptionExit") + --7.3 PlaySound Update. + PlaySound(PlaySoundKitID and "gsTitleOptionExit" or 799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT frame.obj:Hide() end diff --git a/Jamba/CHANGELOG.txt b/Jamba/CHANGELOG.txt index deb27b6..d168679 100644 --- a/Jamba/CHANGELOG.txt +++ b/Jamba/CHANGELOG.txt @@ -1,6 +1,197 @@ --------------------------- ChangeLogs: --------------------------- +Jamba Version: 5.3.0 +WoW Game Version: 7.3 +File Version: 7.3.0-5.3.0 +Release Date: 30/8/2017 +Modules Changed: Core, communications, Item-Use, Team-Display, Jamba-sell Jamba-Trade, Avd Loot +Modules Removed: Macros, Target + +*Jamba-Core + - Should Nolonger LUA error when sending to a toon that does not have the module Installed (GameData/commsData) + - Added a new library LibItemUpGradeInfo. + - Updated Ace3 for Patch 7.3 + - Updated PlaySound in JambaFrameWindow to support the 7.3 changes + - Updated Toc to 7.3 + +*Jamba-Communications + - Removed BN communications (To much excess Data to check was kinda pointless and did not work right.) + - Added Guild communications - this will put all communications though the guild Might for use with big teams. + - Added support for Guild communications to use the Automated Online/Offline System. + +*Jamba-ItemUse + - No Longer sends all Settings when changing items on the bar. + - Added a Sync Button next to clear (In Case minions are not Synced) + +*Jamba-Team_Display + - Changed the minions name colour when the minion is in combat + - Added support for incoming Heals. + - Can Set the health Bar to class colour + - Can set a option to show health/mana updates when not in a party ( might lag out communications Use at own risk, works well with guild communications ) + +*Jamba-Sell + - *sell items with team(Alt)* No longer trys to Equips Items when not interacting with the merchant. + - Should now sell ALL gray's in your bags. (Not half at a time) + - New Options Sell Items by Quality, ItemLevel and if item is Soulbound. + - Tells The Team the amount of Items they have sold and the gold they have made. + - Removed Old Usable soulbound Items and Lower tier options ( Game has come a long way since then ) + +*Jamba-Trade + - Updated Trade BoE to support the new tooltip Scanner + +*jamba-Currency + - if the minion is Maxed on a currency type (EG can not have anymore of that currency ) then the text will show red. + - Changed FrameStrata from "BACKGROUND" to "LOW" (ticket #182) ((PS: I guess a dropdown list would be better)) + - Added 7.3 currencies: + - Writhing Essence + - Argus Waystone + - Veiled Argunite + +*Jamba-Advanced_Loot + - trying new event LOOT_READY + + +*Jamba-Macro + - Removed module. + +*Jamba-Target + - Removed module. + + +--------------------------- +Jamba Version: 5.2.4 +WoW Game Version: 7.2.5 +File Version: 7.2.5-5.2.4 +Release Date: 14/6/2017 +Modules Changed: Core, Display-Curr + +*Jamba-Currency + - Fixed a icon bug with patch 7.2.5 + - Should now update frame position when sending settings without a reload on UI. + - Added new 7.2.5 Currency "Coins of Air" + + +--------------------------- +Jamba Version: 5.2.3 +WoW Game Version: 7.2.0 +File Version: 7.2.0-5.2.3 +Release Date: 23/5/2017 +Modules Changed: Core, Display-Team, Quest-Watcher, Jamba-Team, Jamba-Trade, Jamba_itemUse + + +*Jamba-Display Team + - Added xp bars Animations + +*Jamba-Quest-Watcher + - Fixed bug #117 + +*Jamba-ItemUse + - Fixed a buged where Emissary quest items Nolonger would show on bar. + - Nolonger adds LockBox to the Item-Bar + +*Jamba-Team + - added Enhancement #179* + *- Add Party to team works with Raids. + - Added Class colour Support Jamba_API/EMA_API + +*jamba-Trade + - Added Enhancement #181* + *- Premade for Crafting Reagents. + +--------------------------- +Jamba Version: 5.2.2 +WoW Game Version: 7.2.0 +File Version: 7.2.0-5.2.2 +Release Date: 4/5/2017 +Modules Changed: Core, Display-Team + + +*jamba-Display Team + + - Fixed the artifact bug -- am really sorry this one took so long, av not been very well. + + + + +--------------------------- +Jamba Version: 5.2.1 +WoW Game Version: 7.2.1 +File Version: 7.2.0-5.2.1 +Release Date: 21/4/2017 +Modules Changed: Core, Mount, Currency + +*Jamba-Core + *(Communications) fixed a small bug with this not working. + +*Jamba-Mount + *Temp Fix undone most changes form 5.2.0 + +*jamba-Currency + - Added currency Legionfall War Supplies (1342) + + + +--------------------------- +Jamba Version: 5.2.0 +WoW Game Version: 7.2.0 +File Version: 7.2.0-5.2.0 +Release Date: 28/3/2017 +Modules Changed: Core, Toon, Trade, Team, Mount, Trade, Currency, Taxi, Quest, Follow, Team-Display + +*Jamba-Core + *(Communications) + - Added support for Cross Realm using BNSendGameData Jamba will look fo the character + and will do all the magic. (you need to turn this on in options) + +*Jamba-Toon + (Holding Shift will stop most stuff forwarding to team) + - Ready-check with Team. + - LFG Role-check Auto. + - Teleport LFG with team. + - Roll Need/greed/Etc... with Team + - Removed AFK (PvP) + +*Jamba-Quest + - Removed support for Unignore and Ignore --Blizzard removed in patch 7.2 + - Jamba_Quest 3.0 + - Now shows a Popup Dialog when you track or abandon quests asking if you like to do it with the team. + - Removed "box" icons for abandon/track/share ALL, Changed for Blizzard Buttons. + - No Longer spams raid warning if the toon does not have the quest to abandon + - Does not loop on all toon's when abandoning/track/share all quests. + +*Jamba-Trade + - Removed the Old Trade PopUp Window + - You can now make a list of items you want to trade with master. + - Now will only trade gold to the master Toon. + - Added a option to trade Binds When Equipped Items With Master. (Green/Blue/Purple) + +*jamba-Currency + - Fixed a bug when Border/Background not Sending Settings. + +*Jamba-Team + - Added a option to set all members to assistant when you join a raid group. + - Remove command "/jamba-team InviteTag". + - "/Jamba-Team Invite" now support's + - If Tag is Unknown it will tell you. + +*Jamba-Taxi + - Changed default Taxi dely to 2 sec, added in 0.5sec max 5 sec now. + - When Closing out the Taxi Frame the Team will close as well. + +*Jamba-Mount + - Fixed for Chauffeur Mount ( Level 1 Mount ) + - Warns if the toon trying to mount is in combat. + - Checks the toon is not moving before it Mounts if toon is moving it will try again until toon stop moving. + +*Jamba-Follow + - Having ticked [Auto Follow After Combat] will now warn when follow breaks. + - Updated the speed the follow message gets sent by 0.5 secs. + +*Jamba-Team_Display + - Added a glow effect when follow brecks on the Display-team bar. + +--------------------------- Jamba Version: 5.1.7 WoW Game Version: 7.1.5 File Version: 7.1.5-5.1.7 diff --git a/Jamba/Jamba.toc b/Jamba/Jamba.toc index 0f450ae..46c8952 100644 --- a/Jamba/Jamba.toc +++ b/Jamba/Jamba.toc @@ -1,8 +1,8 @@ -## Interface: 70100 +## Interface: 70300 ## Title: Jamba ## Notes: Jamba ## Author: Ebony, Former Author: Jafula -## Version: 7.1.5-5.1.7 +## Version: 5.3.0 ## SavedVariables: JambaCoreProfileDB, JambaCommunicationsProfileDB, JambaTeamProfileDB, JambaTagProfileDB, JambaMessageProfileDB JambaEmbeds.xml JambaUtilities.lua diff --git a/Jamba/JambaCommunications.lua b/Jamba/JambaCommunications.lua index 78509b1..2c55fea 100644 --- a/Jamba/JambaCommunications.lua +++ b/Jamba/JambaCommunications.lua @@ -38,16 +38,11 @@ AJM.chatCommand = "jamba-comm" -- Communication methods. AJM.COMMUNICATION_WHISPER = "WHISPER" AJM.COMMUNICATION_GROUP = "RAID" +AJM.COMMUNICATION_GUILD = "GUILD" -- Communication message prefix. AJM.MESSAGE_PREFIX = "JmbCmMsg" ---[[ --- Communication over channel for online status. -AJM.COMMUNICATION_TEAM_ONLINE_PREFIX = "JmbCmTmOn" -AJM.COMMUNICATION_MESSAGE_ONLINE = "JmbCmTmOnTe" -AJM.COMMUNICATION_MESSAGE_OFFLINE = "JmbCmTmOnFe" ---]] -- Communication priorities. AJM.COMMUNICATION_PRIORITY_BULK = "BULK" @@ -66,8 +61,6 @@ AJM.COMMAND_INTERNAL_SEND_SETTINGS = "JmbCmSdSet" -- Messages module sends. ------------------------------------------------------------------------------------------------------------- ---AJM.MESSAGE_CHARACTER_ONLINE = "JmbTmChrOn" ---AJM.MESSAGE_CHARACTER_OFFLINE = "JmbTmChrOf" -- Get a settings value. function AJM:ConfigurationGetSetting( key ) @@ -89,6 +82,7 @@ AJM.settings = { assumeTeamAlwaysOnline = false, -- This is a place holder And is used as backup DO NOT CHANGE assumeTeamAlwaysOnline unless you know what your doing that you probs don't ;) autoSetTeamOnlineorOffline = true, boostCommunication = true, + useGuildComms = false, }, } @@ -123,7 +117,6 @@ end ------------------------------------------------------------------------------------------------------------- -- Character online management. ------------------------------------------------------------------------------------------------------------- --- TODO: Is a character online? This needs Working on Ebony Or needs to go for now it always return true local function IsCharacterOnline( characterName ) if AJM.db.assumeTeamAlwaysOnline == true then return true @@ -162,48 +155,6 @@ local function CreateCommandToSend( moduleName, commandName, ... ) return message end ---[[ --- Rewrite of communications start ebony. Using Guild, Party, then whisper --- Send a command to all members of the current team. Trying to use a goble channel to send all communications on. -local function CommandAll( moduleName, commandName, ... ) - AJM:DebugMessage( "Command All: ", moduleName, commandName, ... ) - -- Get the message to send. - local message = CreateCommandToSend( moduleName, commandName, ... ) - for characterName, characterOrder in JambaPrivate.Team.TeamList() do - -- Send command to all in party. - --if UnitInParty( characterName ) == true then and not isInInstance - --local Instance, instanceType = IsInInstance() - --AJM.Print("Raid test", Instance) - --if Instance == false then - if UnitInParty( Ambiguate( characterName, "none" ) ) == true then - if not UnitInBattleground( "player" ) then - --if not IsInInstance("raid") then - --AJM.Print("UnitisinParty", characterName ) - AJM:DebugMessage("Sending command to group.", message, "Group", nil) - AJM:SendCommMessage( - AJM.COMMAND_PREFIX, - message, - AJM.COMMUNICATION_GROUP, - nil, - AJM.COMMUNICATION_PRIORITY_ALERT - ) - --end - end - else - if IsCharacterOnline( characterName ) == true then - AJM:DebugMessage("Sending command to others not in party/raid.", message, "WHISPER", characterName, "online", IsCharacterOnline) - AJM:SendCommMessage( - AJM.COMMAND_PREFIX, - message, - AJM.COMMUNICATION_WHISPER, - characterName, - AJM.COMMUNICATION_PRIORITY_ALERT - ) - end - end - end -end ---]] local function CommandAll( moduleName, commandName, ... ) -- AJM:DebugMessage( "Command All: ", moduleName, commandName, ... ) @@ -211,9 +162,19 @@ local function CommandAll( moduleName, commandName, ... ) -- Get the message to send. local message = CreateCommandToSend( moduleName, commandName, ... ) local channel + if AJM.db.useGuildComms == true then + AJM:SendCommMessage( + AJM.COMMAND_PREFIX, + message, + AJM.COMMUNICATION_GUILD, + nil, + AJM.COMMUNICATION_PRIORITY_ALERT + ) + return + end -- toon has to be in a group if UnitInBattleground( "player" ) then - AJM:DebugMessage( "PvP_INSTANCE") + AJM:DebugMessage( "PvP_INSTANCE") channel = "INSTANCE_CHAT" elseif IsInGroup() then AJM:DebugMessage( "Group") @@ -254,19 +215,18 @@ local function CommandAll( moduleName, commandName, ... ) end --if the unit is not in the party then it unlikely did not get the party message, for characterName, characterOrder in JambaPrivate.Team.TeamList() do - --AJM:Print( "Toon not in party:", characterName) - if UnitInParty( Ambiguate( characterName, "none" ) ) == false then + if UnitInParty( Ambiguate( characterName, "none" ) ) == false then AJM:DebugMessage( "Toon not in party:", characterName) if IsCharacterOnline( characterName ) == true then AJM:DebugMessage("Sending command to others not in party/raid.", message, "WHISPER", characterName) - AJM:SendCommMessage( - AJM.COMMAND_PREFIX, - message, - AJM.COMMUNICATION_WHISPER, - characterName, - AJM.COMMUNICATION_PRIORITY_ALERT - ) - --AJM:Print("testWis", AJM.COMMAND_PREFIX, AJM.COMMUNICATION_WHISPER, characterName , AJM.COMMUNICATION_PRIORITY_ALERT) + AJM:SendCommMessage( + AJM.COMMAND_PREFIX, + message, + AJM.COMMUNICATION_WHISPER, + characterName, + AJM.COMMUNICATION_PRIORITY_ALERT + ) + --AJM:Print("testWis", AJM.COMMAND_PREFIX, AJM.COMMUNICATION_WHISPER, characterName , AJM.COMMUNICATION_PRIORITY_ALERT) end end end @@ -346,30 +306,6 @@ end ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", SystemSpamFilter) ---Ebony old way. was this is a better way? it did not work with EvlUI. ---[[ -function AJM:ChatFrame_MessageEventHandler(frame, event, msg, ...) - --if event == "CHAT_MSG_SYSTEM" then - if( event == "CHAT_MSG_SYSTEM") then - --local match = strmatch(msg, format(ERR_CHAT_PLAYER_NOT_FOUND_S, "(.+)")) - --if match then - if msg:match(string.format(ERR_CHAT_PLAYER_NOT_FOUND_S, "(.+)")) then - return true - --if (not match) then - --IF not match then Go about whatever you wonted to do, If match hide Msg from player. - --self:DebugMessage( "Not matched!" ) - --self.hooks.ChatFrame_MessageEventHandler(frame, event, ...) - --AJM.hooks["ChatFrame_MessageEventHandler"]( self, event, ... ) - end - else - self.hooks.ChatFrame_MessageEventHandler(frame, event, ...); - end - -end ---]] ---ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", SystemSpamFilter) ---AJM.ChatFrame_AddMessageEventVanasKoS("CHAT_MSG_SYSTEM", AJM:ChatFrame_MessageEventHandler) - -- Receive a command from another character. function AJM:CommandReceived( prefix, message, distribution, sender ) @@ -381,12 +317,12 @@ function AJM:CommandReceived( prefix, message, distribution, sender ) --checks the char is in the team if not everyone can change settings and we do not want that if JambaPrivate.Team.IsCharacterInTeam( sender ) == true then AJM:DebugMessage( "Sender is in team list." ) - --automaic setting team members online. -- we don't really need to keep sending this so we add a if + --automaic setting team members online. --AJM:Print("toonnonline", sender ) - if JambaPrivate.Team.GetCharacterOnlineStatus( characterName ) == false then - --AJM:Print("Setting Toon online", sender, characterName ) - JambaApi.setOnline( characterName, true) - end + if JambaPrivate.Team.GetCharacterOnlineStatus( characterName ) == false then + --AJM:Print("Setting Toon online", distribution, sender, characterName ) + JambaApi.setOnline( characterName, true) + end -- Split the command into its components. local moduleName, commandName, argumentsStringSerialized = strsplit( AJM.COMMAND_SEPERATOR, message ) local argumentsTable = {} @@ -479,7 +415,6 @@ function AJM:OnInitialize() self.characterName = self.characterNameLessRealm.."-"..self.characterRealm AJM.characterGUID = UnitGUID( "player" ) -- End of needed: - --AJM:RegisterChatCommand( AJM.chatCommand, "JambaChatCommand" ) -- Register communications as a module. JambaPrivate.Core.RegisterModule( AJM, AJM.moduleName ) end @@ -487,6 +422,7 @@ end function AJM:OnEnable() --local hookSecure = true --AJM:RawHook( "ChatFrame_MessageEventHandler", true ) + AJM:RegisterEvent("GUILD_ROSTER_UPDATE") if AJM.db.boostCommunication == true then AJM:BoostCommunication() -- Repeat every 5 minutes. @@ -516,23 +452,29 @@ function AJM:JambaChatCommand( input ) end end ---[[ -function AJM:StopChannelPollTimer() - if AJM.channelPollTimer ~= nil then - AJM:CancelTimer( AJM.channelPollTimer ) - end -end - - -function AJM:StartChannelPollTimer() - -- Poll for characters every 5 seconds. - AJM.channelPollTimer = AJM:ScheduleRepeatingTimer( ListChannelByName, 5, AJM.lastChannel ) -end ---]] function AJM:OnDisable() --AJM:CancelAllTimers() end +function AJM:GUILD_ROSTER_UPDATE(event, ... ) + if AJM.db.useGuildComms == false then + return + end + local numGuildMembers, numOnline, numOnlineAndMobile = GetNumGuildMembers() + for index = 1, numGuildMembers do + characterName,_,_,_,class,_,_,_,online,status,classFileName,_, _,isMobile = GetGuildRosterInfo(index) + --AJM:Print("Name", fullName, "online", online ) + if online == false then + if AJM.db.autoSetTeamOnlineorOffline == true then + if JambaApi.IsCharacterInTeam(characterName) == true and IsCharacterOnline( characterName ) == true then + JambaApi.setOffline( characterName, false ) + --AJM:Print("player offline in team", characterName ) + end + end + end + end +end + ------------------------------------------------------------------------------------------------------------- -- Settings Dialogs. ------------------------------------------------------------------------------------------------------------- @@ -612,18 +554,40 @@ function AJM:SettingsCreateOptions( top ) L["**reload UI to take effect, may cause disconnections"] ) movingTop = movingTop - buttonHeight - AJM.settingsControl.checkBoxShowChannel = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl.checkBoxUseGuildComms = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, headingWidth, column1Left, movingTop, + L["Use Guild Communications***"], + AJM.CheckBoxUseGuildComms + ) + movingTop = movingTop - checkBoxHeight + AJM.settingsControl.labelInformationBNComms = JambaHelperSettings:CreateContinueLabel( + AJM.settingsControl, + headingWidth, + column1Left, + movingTop, + L["*** EveryToon will be classed as online and needs to be in same guild!"] + ) +--[[ AJM.settingsControl.checkBoxShowChannel = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl, + headingWidth, + column1Left, + movingTop, L["Show Online Channel Traffic (For Debugging Purposes)"], AJM.CheckBoxShowChannelClick ) +]] movingTop = movingTop - checkBoxHeight return movingTop end +function AJM:CheckBoxUseGuildComms( event, value ) + AJM.db.useGuildComms = value + AJM:SettingsRefresh() +end + function AJM:CheckBoxBoostCommunication( event, value ) AJM.db.boostCommunication = value AJM:SettingsRefresh() @@ -650,6 +614,7 @@ function AJM:SettingsRefresh() -- AJM.settingsControl.checkBoxAssumeAlwaysOnline:SetValue( AJM.db.assumeTeamAlwaysOnline ) AJM.settingsControl.checkBoxAutoSetTeamOnlineorOffline:SetValue( AJM.db.autoSetTeamOnlineorOffline ) AJM.settingsControl.checkBoxBoostCommunication:SetValue( AJM.db.boostCommunication ) + AJM.settingsControl.checkBoxUseGuildComms:SetValue( AJM.db.useGuildComms ) end -- Settings received. @@ -664,6 +629,7 @@ function AJM:JambaOnSettingsReceived( characterName, settings ) AJM.db.assumeTeamAlwaysOnline = settings.assumeTeamAlwaysOnline AJM.db.autoSetTeamOnlineorOffline = settings.autoSetTeamOnlineorOffline AJM.db.boostCommunication = settings.boostCommunication + AJM.db.useGuildComms = settings.useGuildComms -- Refresh the settings. AJM:SettingsRefresh() -- Tell the player. @@ -673,55 +639,6 @@ function AJM:JambaOnSettingsReceived( characterName, settings ) end end --- text = message to send --- chatDestination = "PARTY, WHISPER, RAID, CHANNEL, etc" --- characterOrChannelName = character name if WHISPER or channel name if CHANNEL or nil otherwise --- priority = one of --- AJM.COMMUNICATION_PRIORITY_BULK, --- AJM.COMMUNICATION_PRIORITY_NORMAL --- AJM.COMMUNICATION_PRIORITY_ALERT -local function SendChatMessage( text, chatDestination, characterOrChannelName, priority ) - -- Message small enough to send? - AJM:Print("test", text, chatDestination, characterOrChannelName, priority) - - if text:len() <= 255 then - --AJM:Print("test TURE!!!!! TOBIG" ) - ChatThrottleLib:SendChatMessage( priority, AJM.MESSAGE_PREFIX, text, chatDestination, nil, characterOrChannelName, nil ) - - - else - -- No, message is too big, split into smaller messages, taking UTF8 characters into account. - local bytesAvailable = string.utf8len(text1) - local currentPosition = 1 - local countBytes = 1 - local startPosition = currentPosition - local splitText = "" - -- Iterate all the utf8 characters, character by character until we reach 255 characters, then send - -- those off and start counting over. - while currentPosition <= bytesAvailable do - -- Count the number of bytes the character at this position takes up. - countBytes = countBytes + jambautf8charbytes( text, currentPosition ) - -- More than 255 bytes yet? - if countBytes <= 255 then - -- No, increment the position and keep counting. - currentPosition = currentPosition + jambautf8charbytes( text, currentPosition ) - else - -- Yes, more than 255. Send this amount off. - splitText = text:sub( startPosition, currentPosition ) - ChatThrottleLib:SendChatMessage( priority, AJM.MESSAGE_PREFIX, splitText, chatDestination, nil, characterOrChannelName, nil ) - -- New start position and count. - startPosition = currentPosition + 1 - countBytes = 1 - end - end - -- Any more bytes left to send? - if startPosition < currentPosition then - -- Yes, send them. - splitText = text:sub( startPosition, currentPosition ) - ChatThrottleLib:SendChatMessage( priority, AJM.MESSAGE_PREFIX, splitText, chatDestination, nil, characterOrChannelName, nil ) - end - end -end -- Functions available from Jamba Communications for other Jamba internal objects. JambaPrivate.Communications.COMMUNICATION_PRIORITY_BULK = AJM.COMMUNICATION_PRIORITY_BULK @@ -735,13 +652,3 @@ JambaPrivate.Communications.SendCommandToon = SendCommandToon JambaPrivate.Communications.SendCommandMaster = SendCommandMaster JambaPrivate.Communications.SendCommandToon = SendCommandToon JambaPrivate.Communications.AssumeTeamAlwaysOnline = AssumeTeamAlwaysOnline --- moved to jamba-team ---JambaPrivate.Communications.MESSAGE_CHARACTER_ONLINE = AJM.MESSAGE_CHARACTER_ONLINE ---JambaPrivate.Communications.MESSAGE_CHARACTER_OFFLINE = AJM.MESSAGE_CHARACTER_OFFLINE -JambaApi.SendChatMessage = SendChatMessage -JambaApi.COMMUNICATION_PRIORITY_BULK = AJM.COMMUNICATION_PRIORITY_BULK -JambaApi.COMMUNICATION_PRIORITY_NORMAL = AJM.COMMUNICATION_PRIORITY_NORMAL -JambaApi.COMMUNICATION_PRIORITY_ALERT = AJM.COMMUNICATION_PRIORITY_ALERT --- moved to jamba-team ---JambaApi.MESSAGE_CHARACTER_ONLINE = AJM.MESSAGE_CHARACTER_ONLINE ---JambaApi.MESSAGE_CHARACTER_OFFLINE = AJM.MESSAGE_CHARACTER_OFFLINE diff --git a/Jamba/JambaCore.lua b/Jamba/JambaCore.lua index 4a74c64..87ef9d6 100644 --- a/Jamba/JambaCore.lua +++ b/Jamba/JambaCore.lua @@ -353,7 +353,12 @@ local function SendCommandToTeam( moduleAddress, commandName, ... ) -- Get the name of the module. local moduleName = AJM.registeredModulesByAddress[moduleAddress] -- Send the command identified by the module name. + if moduleAddress == nil then + AJM:Print(L["Module Not Loaded:"], moduleName) + return + else JambaPrivate.Communications.SendCommandAll( moduleName, commandName, ... ) + end end -- Send a command for the module specified (using its address) to the master character. @@ -361,14 +366,24 @@ local function SendCommandToMaster( moduleAddress, commandName, ... ) -- Get the name of the module. local moduleName = AJM.registeredModulesByAddress[moduleAddress] -- Send the command identified by the module name. + if moduleAddress == nil then + AJM:Print(L["Module Not Loaded:"], moduleName) + return + else JambaPrivate.Communications.SendCommandMaster( moduleName, commandName, ... ) + end end local function SendCommandToToon( moduleAddress, characterName, commandName, ... ) -- Get the name of the module. local moduleName = AJM.registeredModulesByAddress[moduleAddress] -- Send the command identified by the module name. + if moduleAddress == nil then + AJM:Print(L["Module Not Loaded:"], moduleName) + return + else JambaPrivate.Communications.SendCommandToon( moduleName, characterName, commandName, ... ) + end end -- A command is received, pass it to the relevant module. @@ -377,7 +392,12 @@ local function OnCommandReceived( sender, moduleName, commandName, ... ) -- Get the address of the module. local moduleAddress = AJM.registeredModulesByName[moduleName] -- Pass the module its settings. - moduleAddress:JambaOnCommandReceived( sender, commandName, ... ) + if moduleAddress == nil then + AJM:Print(L["Module Not Loaded:"], moduleName) + return + else + moduleAddress:JambaOnCommandReceived( sender, commandName, ... ) + end end ------------------------------------------------------------------------------------------------------------- @@ -669,7 +689,7 @@ function AJM:CoreSettingsCreateInfo( top ) L["Text10"] ) --movingTop = movingTop - labelContinueHeight - movingTop = movingTop - buttonHeight * 3 +--[[ movingTop = movingTop - buttonHeight * 3 AJM.settingsControl.buttonPushSettingsForAllModules = JambaHelperSettings:CreateButton( AJM.settingsControl, buttonPushAllSettingsWidth, @@ -679,6 +699,7 @@ function AJM:CoreSettingsCreateInfo( top ) AJM.ShowChangeLog, L["Shows the Full changelog\nOpens a new Frame."] ) +--]] -- Special thanks Heading movingTop = movingTop - buttonHeight @@ -706,7 +727,7 @@ function AJM:CoreSettingsCreateInfo( top ) headingWidth, column1Left, movingTop, - L["To Schilm (Max Schilling) for Advanced Loot and Jamba-Quest for 4.3"] + L["To Schilm (Max Schilling) for Advanced Loot"] ) -- Useful websites Heading movingTop = movingTop - labelContinueHeight * 2 diff --git a/Jamba/JambaEmbeds.xml b/Jamba/JambaEmbeds.xml index 0f2ee8c..9788a46 100644 --- a/Jamba/JambaEmbeds.xml +++ b/Jamba/JambaEmbeds.xml @@ -29,6 +29,7 @@ http://jafula.com/jamba/ + @@ -36,4 +37,6 @@ http://jafula.com/jamba/ + + diff --git a/Jamba/JambaMessage.lua b/Jamba/JambaMessage.lua index 3cac3d0..db70abc 100644 --- a/Jamba/JambaMessage.lua +++ b/Jamba/JambaMessage.lua @@ -1033,4 +1033,4 @@ JambaPrivate.Message.SendMessage = SendMessage JambaApi.MessageAreaList = MessageAreaList JambaApi.DefaultMessageArea = DefaultMessageArea JambaApi.DefaultWarningArea = DefaultWarningArea -JambaApi.MESSAGE_MESSAGE_AREAS_CHANGED = AJM.MESSAGE_MESSAGE_AREAS_CHANGED +JambaApi.MESSAGE_MESSAGE_AREAS_CHANGED = AJM.MESSAGE_MESSAGE_AREAS_CHANGED \ No newline at end of file diff --git a/Jamba/JambaStartupMessage.xml b/Jamba/JambaStartupMessage.xml index db4cbfb..c6c9507 100644 --- a/Jamba/JambaStartupMessage.xml +++ b/Jamba/JambaStartupMessage.xml @@ -79,4 +79,4 @@ - + \ No newline at end of file diff --git a/Jamba/JambaTag.lua b/Jamba/JambaTag.lua index 56210e6..1dc7b49 100644 --- a/Jamba/JambaTag.lua +++ b/Jamba/JambaTag.lua @@ -765,4 +765,4 @@ JambaApi.AllTagsList = AllTagsList JambaApi.AllTagsListIterator = AllTagsListIterator JambaApi.DoesCharacterHaveTag = DoesCharacterHaveTag JambaApi.IsAValidTag = IsAValidTag -JambaApi.GetCharacterWithTag = GetCharacterWithTag +JambaApi.GetCharacterWithTag = GetCharacterWithTag \ No newline at end of file diff --git a/Jamba/JambaTeam.lua b/Jamba/JambaTeam.lua index e0c8864..32fc934 100644 --- a/Jamba/JambaTeam.lua +++ b/Jamba/JambaTeam.lua @@ -39,6 +39,7 @@ AJM.settings = { master = "", teamList = {}, characterOnline = {}, + characterClass = {}, focusChangeSetMaster = false, masterChangePromoteLeader = false, inviteAcceptTeam = true, @@ -47,6 +48,7 @@ AJM.settings = { inviteAcceptGuild = false, inviteDeclineStrangers = false, inviteConvertToRaid = true, + inviteSetAllAssistant = false, lootSetAutomatically = false, lootSetFreeForAll = true, lootSetGroupLoot = false, @@ -102,7 +104,7 @@ function AJM:GetConfiguration() invite = { type = "input", name = L["Invite"], - desc = L["Invite team members to a party."], + desc = L["Invite team members to a party with or without a ."], usage = "/jamba-team invite", get = false, set = "InviteTeamToParty", @@ -111,7 +113,7 @@ function AJM:GetConfiguration() type = "input", name = L["Invites"], desc = L["Invite team members to a party."], - usage = "/jamba-team invite ", + usage = "/jamba-team inviteTag ", get = false, set = "InviteTeamToPartys", }, @@ -295,7 +297,7 @@ local function SettingsCreateTeamList() topOfList - verticalSpacing - buttonHeight - verticalSpacing - buttonHeight - verticalSpacing - buttonHeight, L["Add Party"], AJM.SettingsAddPartyClick, - L["Adds all Party members to the team list"] + L["Adds all Party/Raid members to the team list"] ) AJM.settingsControl.teamListButtonRemove = JambaHelperSettings:CreateButton( AJM.settingsControl, @@ -304,7 +306,7 @@ local function SettingsCreateTeamList() topOfList - verticalSpacing - buttonHeight - verticalSpacing - buttonHeight - verticalSpacing - buttonHeight - verticalSpacing - buttonHeight, L["Remove"], AJM.SettingsRemoveClick, - L["Removes Party members from the team list"] + L["Removes Members from the team list"] ) AJM.settingsControl.teamListButtonSetMaster = JambaHelperSettings:CreateButton( AJM.settingsControl, @@ -393,7 +395,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 * 2) + local bottomOfSection = top - headingHeight - (checkBoxHeight * 4) - (verticalSpacing * 2) -- Create a heading. JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Party Invitations Control"], top, false ) -- Create checkboxes. @@ -406,11 +408,20 @@ local function SettingsCreatePartyInvitationsControl( top ) AJM.SettingsinviteConvertToRaidToggle, L["Auto Convert To Raid if team is over five character's"] ) - AJM.settingsControl.partyInviteControlCheckBoxAcceptMembers = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl.partyInviteControlCheckBoxSetAllAssist = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, checkBoxWidth, column2Left, - top - headingHeight, + top - headingHeight, + L["Auto Set All Assistant"], + AJM.SettingsinviteSetAllAssistToggle, + L["Auto Set all raid Member's to Assistant"] + ) + AJM.settingsControl.partyInviteControlCheckBoxAcceptMembers = JambaHelperSettings:CreateCheckBox( + AJM.settingsControl, + checkBoxWidth, + column1Left, + top - headingHeight - checkBoxHeight, L["Accept from team."], AJM.SettingsAcceptInviteMembersToggle, L["Auto Accept invites from the team."] @@ -418,7 +429,7 @@ local function SettingsCreatePartyInvitationsControl( top ) AJM.settingsControl.partyInviteControlCheckBoxAcceptFriends = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, checkBoxWidth, - column1Left, + column2Left, top - headingHeight - checkBoxHeight, L["Accept from friends."], AJM.SettingsAcceptInviteFriendsToggle, @@ -427,16 +438,16 @@ local function SettingsCreatePartyInvitationsControl( top ) AJM.settingsControl.partyInviteControlCheckBoxAcceptBNFriends = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, checkBoxWidth, - column2Left, - top - headingHeight - checkBoxHeight, - L["Accept from BattleNet friends."], + column1Left, + top - headingHeight - checkBoxHeight - checkBoxHeight, + L["Accept From BattleTag Friends."], AJM.SettingsAcceptInviteBNFriendsToggle, - L["Auto Accept invites from your Battlenet or RealID Friends list."] + L["Auto Accept invites from your BatteTag or RealID Friends list."] ) AJM.settingsControl.partyInviteControlCheckBoxAcceptGuild = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, checkBoxWidth, - column1Left, + column2Left, top - headingHeight - checkBoxHeight - checkBoxHeight, L["Accept from guild."], AJM.SettingsAcceptInviteGuildToggle, @@ -445,8 +456,8 @@ local function SettingsCreatePartyInvitationsControl( top ) AJM.settingsControl.partyInviteControlCheckBoxDeclineStrangers = JambaHelperSettings:CreateCheckBox( AJM.settingsControl, checkBoxWidth, - column2Left, - top - headingHeight - checkBoxHeight - checkBoxHeight, + column1Left, + top - headingHeight - checkBoxHeight - checkBoxHeight - checkBoxHeight, L["Decline from strangers."], AJM.SettingsDeclineInviteStrangersToggle, L["Decline invites from anyone else."] @@ -468,7 +479,7 @@ local function SettingsCreatePartyLootControl( top ) local indentContinueLabel = horizontalSpacing * 13 local column1Left = left local column2Left = left + checkBoxWidth + horizontalSpacing - local bottomOfSection = top - headingHeight - checkBoxHeight - radioBoxHeight - verticalSpacing - checkBoxHeight - checkBoxHeight - (verticalSpacing * 4) - labelContinueHeight - checkBoxHeight + local bottomOfSection = top - headingHeight - checkBoxHeight - radioBoxHeight - verticalSpacing - checkBoxHeight - checkBoxHeight - checkBoxHeight - (verticalSpacing * 4) - labelContinueHeight - checkBoxHeight -- Create a heading. JambaHelperSettings:CreateHeading( AJM.settingsControl, L["Party Loot Control (Instances)"], top, false ) -- Create checkboxes. @@ -626,9 +637,24 @@ local function TeamList() end local function Offline() - return pairs( AJM.db.characterOnline) + return pairs( AJM.db.characterOnline ) +end + +local function characterClass() + return pairs( AJM.db.characterClass ) end +local function setClass() + for characterName, position in pairs( AJM.db.teamList ) do + local class, classFileName, classIndex = UnitClass( Ambiguate(characterName, "none") ) + --AJM:Print("new", class, CharacterName ) + if class ~= nil then + AJM.db.characterClass[characterName] = classFileName + end + end +end + + -- Get the largest order number from the team list. local function GetTeamListMaximumOrder() local largestPosition = 0 @@ -754,11 +780,19 @@ local function AddMember( characterName ) if characterName ~= nil and characterName:trim() ~= "" and characterName:len() > 1 then -- If the character is not already in the list... local character = JambaUtilities:AddRealmToNameIfMissing( characterName ) - if AJM.db.teamList[character] == nil then + 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 + + local class, classFileName, classIndex = UnitClass( characterName ) + if class ~= nil then + --AJM:Print( classFileName ) + AJM.db.characterClass[character] = classFileName + else + AJM.db.characterClass[character] = nil + end JambaPrivate.Team.SetTeamOnline() --AJM.Print("teamList", character) -- Send a message to any listeners that AJM character has been added. @@ -779,12 +813,23 @@ end -- Add all party members to the member list. does not worl cross rwalm todo function AJM:AddPartyMembers() - local numberPartyMembers = GetNumSubgroupMembers() + --local numberPartyMembers = GetNumSubgroupMembers() + local numberPartyMembers = GetNumGroupMembers() for iteratePartyMembers = numberPartyMembers, 1, -1 do - local partyMemberName, partyMemberRealm = UnitName( "party"..iteratePartyMembers ) - local character = JambaUtilities:AddRealmToNameIfNotNil( partyMemberName, partyMemberRealm ) - if IsCharacterInTeam( character ) == false then - AddMember( character ) + --AJM:Print("party/raid", numberPartyMembers, iteratePartyMembers) + local inRaid = IsInRaid() + if inRaid == true then + local partyMemberName, partyMemberRealm = UnitName( "raid"..iteratePartyMembers ) + local character = JambaUtilities:AddRealmToNameIfNotNil( partyMemberName, partyMemberRealm ) + if IsCharacterInTeam( character ) == false then + AddMember( character ) + end + else + local partyMemberName, partyMemberRealm = UnitName( "party"..iteratePartyMembers ) + local character = JambaUtilities:AddRealmToNameIfNotNil( partyMemberName, partyMemberRealm ) + if IsCharacterInTeam( character ) == false then + AddMember( character ) + end end end end @@ -1048,30 +1093,25 @@ end ------------------------------------------------------------------------------------------------------------- -- Invite team to party. -function AJM:InviteTeamToParty() - -- Iterate each enabled member and invite them to a group. - AJM.inviteList = {} - AJM.inviteCount = 0 - for index, characterName in TeamListOrdered() do - if GetCharacterOnlineStatus( characterName ) == true then - -- As long as they are not the player doing the inviting. - if characterName ~= AJM.characterName then - AJM.inviteList[AJM.inviteCount] = characterName - AJM.inviteCount = AJM.inviteCount + 1 - end - end - end - AJM.currentInviteCount = 0 - AJM:ScheduleTimer( "DoTeamPartyInvite", 0.5 ) + +function AJM:InviteTeamToPartys() + --Clean up in next xpac! + AJM:Print("This Command Has Been Removed and is now used as \"/Jamba-Team Invite /") end + function AJM.DoTeamPartyInvite() InviteUnit( AJM.inviteList[AJM.currentInviteCount] ) AJM.currentInviteCount = AJM.currentInviteCount + 1 if AJM.currentInviteCount < AJM.inviteCount then --if GetTeamListMaximumOrderOnline() > 5 and AJM.db.inviteConvertToRaid == true then if AJM.inviteCount > 5 and AJM.db.inviteConvertToRaid == true then - ConvertToRaid() + if AJM.db.inviteSetAllAssistant == true then + ConvertToRaid() + SetEveryoneIsAssistant(true) + else + ConvertToRaid() + end end AJM:ScheduleTimer( "DoTeamPartyInvite", 0.5 ) else @@ -1081,28 +1121,28 @@ function AJM.DoTeamPartyInvite() end end -function AJM:InviteTeamToPartys( info, tag ) + +function AJM:InviteTeamToParty( info, tag ) -- Iterate each enabled member and invite them to a group. - if tag == nil then - return + if tag == nil or tag == "" then + tag = "all" end - if JambaPrivate.Tag.DoesCharacterHaveTag( AJM.characterName, tag ) == false then - --AJM:Print("IDONOTHAVETAG", tag) - for index, characterName in TeamListOrdered() do - --AJM:Print("NextChartohavetag", tag, characterName ) - if JambaPrivate.Tag.DoesCharacterHaveTag( characterName, tag ) then - --AJM:Print("i have tag", tag, characterName ) - AJM:JambaSendCommandToTeam( AJM.COMMAND_TAG_PARTY, characterName, tag ) - break + if JambaUtilities:InTagList(tag) == true then + if JambaPrivate.Tag.DoesCharacterHaveTag( AJM.characterName, tag ) == false then + --AJM:Print("IDONOTHAVETAG", tag) + for index, characterName in TeamListOrderedOnline() do + --AJM:Print("NextChartohavetag", tag, characterName ) + if JambaPrivate.Tag.DoesCharacterHaveTag( characterName, tag ) then + --AJM:Print("i have tag", tag, characterName ) + AJM:JambaSendCommandToTeam( AJM.COMMAND_TAG_PARTY, characterName, tag ) + break + end end - end - return - else - AJM.inviteList = {} - AJM.inviteCount = 0 - for index, characterName in TeamListOrdered() do - if GetCharacterOnlineStatus( characterName ) == true then - --AJM:Print("test", characterName, tag ) + return + else + AJM.inviteList = {} + AJM.inviteCount = 0 + for index, characterName in TeamListOrderedOnline() do if JambaPrivate.Tag.DoesCharacterHaveTag( characterName, tag ) then --AJM:Print("HasTag", characterName, tag ) -- As long as they are not the player doing the inviting. @@ -1113,17 +1153,19 @@ function AJM:InviteTeamToPartys( info, tag ) end end end - end - AJM.currentInviteCount = 0 - AJM:ScheduleTimer( "DoTeamPartyInvite", 0.5 ) + AJM.currentInviteCount = 0 + AJM:ScheduleTimer( "DoTeamPartyInvite", 0.5 ) + else + AJM:Print (L["Unknown Tag "]..tag ) + end end -function AJM:TagParty(test, characterName, tag, ...) +function AJM:TagParty(event, characterName, tag, ...) --AJM:Print("test", characterName, tag ) if AJM.characterName == characterName then --AJM:Print("this msg is for me", characterName ) if JambaPrivate.Tag.DoesCharacterHaveTag( AJM.characterName, tag ) then - AJM:InviteTeamToPartys( nil, tag) + AJM:InviteTeamToParty( nil, tag) else return end @@ -1241,14 +1283,12 @@ function AJM:PARTY_INVITE_REQUEST( event, inviter, ... ) -- Accept an invite from BNET/RealD? if AJM.db.inviteAcceptBNFriends and BNFeaturesEnabledAndConnected() == true then -- Iterate each friend; searching for the inviter in the friends list. - for bnIndex = 1, BNGetNumFriends() do - --local _, _, _, _, name, toonid = BNGetFriendGameAccountInfo( bnIndex ) + local _, numFriends = BNGetNumFriends() + for bnIndex = 1, numFriends do for toonIndex = 1, BNGetNumFriendGameAccounts( bnIndex ) do local _, toonName, client, realmName = BNGetFriendGameAccountInfo( bnIndex, toonIndex ) - --AJM:Print("Test", inviter, toonName, realmName, client ) + --AJM:Print("BNFrindsTest", toonName, client, realmName, "inviter", inviter) if client == "WoW" then - --inviter = inviter:match("(.+)%-.+") or inviter - --AJM:Print("True", toonName.."-"..realmName ) if toonName == inviter or toonName.."-"..realmName == inviter then acceptInvite = true break @@ -1371,6 +1411,9 @@ function AJM:OnInitialize() AJM.db.teamList = JambaUtilities:CopyTable( updatedTeamList ) end end + --Sets The class of the char. + setClass() + --todo look at this ebony -- local updateMatchStart = AJM.db.master:find( "-" ) -- if not updateMatchStart then @@ -1431,6 +1474,7 @@ function AJM:SettingsRefresh() AJM.settingsControl.partyInviteControlCheckBoxAcceptGuild:SetValue( AJM.db.inviteAcceptGuild ) AJM.settingsControl.partyInviteControlCheckBoxDeclineStrangers:SetValue( AJM.db.inviteDeclineStrangers ) AJM.settingsControl.partyInviteControlCheckBoxConvertToRaid:SetValue( AJM.db.inviteConvertToRaid ) + AJM.settingsControl.partyInviteControlCheckBoxSetAllAssist:SetValue( AJM.db.inviteSetAllAssistant ) -- Party Loot Control. AJM.settingsControl.partyLootControlCheckBoxSetLootMethod:SetValue( AJM.db.lootSetAutomatically ) AJM.settingsControl.partyLootControlCheckBoxSetFFA:SetValue( AJM.db.lootSetFreeForAll ) @@ -1440,6 +1484,7 @@ function AJM:SettingsRefresh() --AJM.settingsControl.partyLootControlCheckBoxFriendsNotStrangers:SetValue( AJM.db.lootToGroupFriendsAreNotStrangers ) --AJM.settingsControl.partyLootControlCheckBoxSetOptOutOfLoot:SetValue( AJM.db.lootSlavesOptOutOfLoot ) -- Ensure correct state. + AJM.settingsControl.partyInviteControlCheckBoxSetAllAssist:SetDisabled (not AJM.db.inviteConvertToRaid ) AJM.settingsControl.partyLootControlCheckBoxSetFFA:SetDisabled( not AJM.db.lootSetAutomatically ) AJM.settingsControl.partyLootControlCheckBoxSetGroupLoot:SetDisabled( not AJM.db.lootSetAutomatically ) AJM.settingsControl.partyLootControlCheckBoxSetPersLooter:SetDisabled( not AJM.db.lootSetAutomatically ) @@ -1464,6 +1509,7 @@ function AJM:JambaOnSettingsReceived( characterName, settings ) AJM.db.inviteAcceptGuild = settings.inviteAcceptGuild AJM.db.inviteDeclineStrangers = settings.inviteDeclineStrangers AJM.db.inviteConvertToRaid = settings.inviteConvertToRaid + AJM.db.inviteSetAllAssistant = settings.inviteSetAllAssistant AJM.db.lootSetAutomatically = settings.lootSetAutomatically AJM.db.lootSetFreeForAll = settings.lootSetFreeForAll AJM.db.lootSetGroupLoot = settings.lootSetGroupLoot @@ -1515,6 +1561,17 @@ function AJM:SettingsTeamListScrollRefresh() if isOnline == false then displayCharacterName = characterName.." "..L["(Offline)"] end + local class = AJM.db.characterClass[characterName] + --AJM:Print("Test", class) + -- Set Class Color + if class ~= nil then + local color = RAID_CLASS_COLORS[class] + --Debug -- AJM:Print("Name", characterName, class) + AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( color.r, color.g, color.b, 1.0 ) + if isOnline == false then + AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( color.r, color.g, color.b, 0.4 ) + end + end local isMaster = false local characterType = L["Minion"] if IsCharacterTheMaster( characterName ) == true then @@ -1525,14 +1582,13 @@ function AJM:SettingsTeamListScrollRefresh() AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetText( characterType ) -- Master is a yellow colour. if isMaster == true then - AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 ) + --AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 ) AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 ) end - -- Offline is a grey colour. - if isOnline == false then - AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 0.6 ) - AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 0.6 ) - end + -- -- Offline is a grey colour. + -- + -- AJM.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 0.6 ) + -- 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 ) @@ -1600,7 +1656,7 @@ function AJM.SettingsAddPartyClick( event ) AJM:AddPartyMembers() end function AJM:SettingsInviteClick( event ) - AJM:InviteTeamToParty() + AJM:InviteTeamToParty(nil) end function AJM:SettingsDisbandClick( event ) @@ -1665,6 +1721,10 @@ function AJM:SettingsinviteConvertToRaidToggle( event, checked ) AJM:SettingsRefresh() end +function AJM:SettingsinviteSetAllAssistToggle( event, checked ) + AJM.db.inviteSetAllAssistant = checked +end + function AJM:SettingsSetLootMethodToggle( event, checked ) AJM.db.lootSetAutomatically = checked AJM:SettingsRefresh() @@ -1806,3 +1866,5 @@ JambaApi.setOnline = setOnline JambaApi.GetTeamListMaximumOrderOnline = GetTeamListMaximumOrderOnline JambaApi.TeamListOrderedOnline = TeamListOrderedOnline JambaApi.GetPositionForCharacterNameOnline = GetPositionForCharacterNameOnline +JambaApi.GetClass = characterClass +JambaApi.SetClass = setClass diff --git a/Jamba/JambaUtilities.lua b/Jamba/JambaUtilities.lua index 8154374..682ae3d 100644 --- a/Jamba/JambaUtilities.lua +++ b/Jamba/JambaUtilities.lua @@ -120,6 +120,9 @@ end -- itemLink - the item link to extract an item id from. -- Gets an item id from an item link. Returns nil, if an item id could not be found. function JambaUtilities:GetItemIdFromItemLink( itemLink ) + if itemLink == nil then + return + end local itemIdFound = nil local itemStringStart, itemStringEnd, itemString = itemLink:find( "^|c%x+|H(.+)|h%[.*%]" ) if itemStringStart then @@ -189,16 +192,84 @@ function JambaUtilities:FixValueToRange( value, minValue, maxValue ) end - - - - - - - - - - - +function JambaUtilities:CheckIsFromMyRealm( name ) + --print("test", name) + local sameRealm = false + if name ~= nil then + local player, realm = strsplit( "-", name, 2 ) + local myRealm = string.gsub(GetRealmName(), "%s+", "") + if realm == myRealm then + --print("Real SameRealm") + sameRealm = true + else + local connectedServers = GetAutoCompleteRealms() + if connectedServers then --Check if realm matches any realm in our connection + for i = 1, #connectedServers do + if realm == connectedServers[i] then + --print("connectedRealm") + sameRealm = true + end + end + else + --print("NotFromARealm") + sameRealm = false + end + end + end + return sameRealm +end +function JambaUtilities:InTagList( tag ) + local isInTagList = false + if tag ~= nil then + local tagList = JambaApi.AllTagsList() + for i = 1, #tagList do + if tag == tagList[i] then + isInTagList = true + end + end + end + return isInTagList +end + +function JambaUtilities:TooltipScaner(item) + local text = nil + local text2 = nil + if item ~= nil then + local tooltipName = "AJMScanner" + local tooltipScanner = CreateFrame("GameTooltip", tooltipName, nil, "GameTooltipTemplate") + tooltipScanner:SetOwner(UIParent, "ANCHOR_NONE") + tooltipScanner:SetHyperlink(item) + local tooltipText = _G[tooltipName.."TextLeft2"]:GetText() + local tooltipTextTwo = _G[tooltipName.."TextLeft3"]:GetText() + --print("test", tooltipTextTwo) + text = tooltipText + text2 = tooltipTextTwo + end + --print("test9", text, text2) + return text, text2 +end + + +function JambaUtilities:ToolTipBagScaner(item, bag, slot) + --print("test", item, bag, slot ) + if item ~= nil or bag ~= nil or slot ~= nil then + local boe = nil + local ilvl = nil + local tooltipName = "AJMBagScanner" + local tooltipbagScanner = CreateFrame("GameTooltip", tooltipName , nil, "GameTooltipTemplate") + tooltipbagScanner:SetOwner(UIParent, "ANCHOR_NONE") + tooltipbagScanner:SetBagItem(bag, slot) + tooltipbagScanner:Show() + for i = 1,6 do + local t = _G[tooltipName.."TextLeft"..i]:GetText() + --print("test", t) + if (t == ITEM_SOULBOUND) then + boe = ITEM_SOULBOUND + end + end + tooltipbagScanner:Hide() + return boe + end +end \ No newline at end of file diff --git a/Jamba/Libs/AceComm-3.0/AceComm-3.0.lua b/Jamba/Libs/AceComm-3.0/AceComm-3.0.lua index 8d944a5..5815530 100644 --- a/Jamba/Libs/AceComm-3.0/AceComm-3.0.lua +++ b/Jamba/Libs/AceComm-3.0/AceComm-3.0.lua @@ -9,7 +9,7 @@ -- make into AceComm. -- @class file -- @name AceComm-3.0 --- @release $Id: AceComm-3.0.lua 1107 2014-02-19 16:40:32Z nevcairiel $ +-- @release $Id: AceComm-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $ --[[ AceComm-3.0 @@ -17,15 +17,14 @@ TODO: Time out old data rotting around from dead senders? Not a HUGE deal since ]] -local MAJOR, MINOR = "AceComm-3.0", 9 +local CallbackHandler = LibStub("CallbackHandler-1.0") +local CTL = assert(ChatThrottleLib, "AceComm-3.0 requires ChatThrottleLib") +local MAJOR, MINOR = "AceComm-3.0", 10 local AceComm,oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not AceComm then return end -local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0") -local CTL = assert(ChatThrottleLib, "AceComm-3.0 requires ChatThrottleLib") - -- Lua APIs local type, next, pairs, tostring = type, next, pairs, tostring local strsub, strfind = string.sub, string.find diff --git a/Jamba/Libs/AceConfig-3.0/AceConfig-3.0.lua b/Jamba/Libs/AceConfig-3.0/AceConfig-3.0.lua index 3bedf8c..a99ddf7 100644 --- a/Jamba/Libs/AceConfig-3.0/AceConfig-3.0.lua +++ b/Jamba/Libs/AceConfig-3.0/AceConfig-3.0.lua @@ -3,7 +3,7 @@ -- as well as associate it with a slash command. -- @class file -- @name AceConfig-3.0 --- @release $Id: AceConfig-3.0.lua 969 2010-10-07 02:11:48Z shefki $ +-- @release $Id: AceConfig-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $ --[[ AceConfig-3.0 @@ -12,13 +12,14 @@ Very light wrapper library that combines all the AceConfig subcomponents into on ]] -local MAJOR, MINOR = "AceConfig-3.0", 2 +local cfgreg = LibStub("AceConfigRegistry-3.0") +local cfgcmd = LibStub("AceConfigCmd-3.0") + +local MAJOR, MINOR = "AceConfig-3.0", 3 local AceConfig = LibStub:NewLibrary(MAJOR, MINOR) if not AceConfig then return end -local cfgreg = LibStub("AceConfigRegistry-3.0") -local cfgcmd = LibStub("AceConfigCmd-3.0") --TODO: local cfgdlg = LibStub("AceConfigDialog-3.0", true) --TODO: local cfgdrp = LibStub("AceConfigDropdown-3.0", true) diff --git a/Jamba/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua b/Jamba/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua index 2023981..33f9fe1 100644 --- a/Jamba/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua +++ b/Jamba/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua @@ -1,7 +1,7 @@ --- AceConfigCmd-3.0 handles access to an options table through the "command line" interface via the ChatFrames. -- @class file -- @name AceConfigCmd-3.0 --- @release $Id: AceConfigCmd-3.0.lua 1045 2011-12-09 17:58:40Z nevcairiel $ +-- @release $Id: AceConfigCmd-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $ --[[ AceConfigCmd-3.0 @@ -14,8 +14,9 @@ REQUIRES: AceConsole-3.0 for command registration (loaded on demand) -- TODO: plugin args +local cfgreg = LibStub("AceConfigRegistry-3.0") -local MAJOR, MINOR = "AceConfigCmd-3.0", 13 +local MAJOR, MINOR = "AceConfigCmd-3.0", 14 local AceConfigCmd = LibStub:NewLibrary(MAJOR, MINOR) if not AceConfigCmd then return end @@ -23,7 +24,6 @@ if not AceConfigCmd then return end AceConfigCmd.commands = AceConfigCmd.commands or {} local commands = AceConfigCmd.commands -local cfgreg = LibStub("AceConfigRegistry-3.0") local AceConsole -- LoD local AceConsoleName = "AceConsole-3.0" diff --git a/Jamba/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua b/Jamba/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua index 3612fe8..f2d5266 100644 --- a/Jamba/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua +++ b/Jamba/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua @@ -1,10 +1,13 @@ --- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables. -- @class file -- @name AceConfigDialog-3.0 --- @release $Id: AceConfigDialog-3.0.lua 1139 2016-07-03 07:43:51Z nevcairiel $ +-- @release $Id: AceConfigDialog-3.0.lua 1163 2017-08-14 14:04:39Z nevcairiel $ local LibStub = LibStub -local MAJOR, MINOR = "AceConfigDialog-3.0", 61 +local gui = LibStub("AceGUI-3.0") +local reg = LibStub("AceConfigRegistry-3.0") + +local MAJOR, MINOR = "AceConfigDialog-3.0", 64 local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not AceConfigDialog then return end @@ -17,9 +20,6 @@ AceConfigDialog.frame.apps = AceConfigDialog.frame.apps or {} AceConfigDialog.frame.closing = AceConfigDialog.frame.closing or {} AceConfigDialog.frame.closeAllOverride = AceConfigDialog.frame.closeAllOverride or {} -local gui = LibStub("AceGUI-3.0") -local reg = LibStub("AceConfigRegistry-3.0") - -- Lua APIs local tconcat, tinsert, tsort, tremove, tsort = table.concat, table.insert, table.sort, table.remove, table.sort local strmatch, format = string.match, string.format @@ -611,6 +611,31 @@ local function confirmPopup(appName, rootframe, basepath, info, message, func, . end end +local function validationErrorPopup(message) + if not StaticPopupDialogs["ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG"] then + StaticPopupDialogs["ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG"] = {} + end + local t = StaticPopupDialogs["ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG"] + t.text = message + t.button1 = OKAY + t.preferredIndex = STATICPOPUP_NUMDIALOGS + local dialog, oldstrata + t.OnAccept = function() + if dialog and oldstrata then + dialog:SetFrameStrata(oldstrata) + end + end + t.timeout = 0 + t.whileDead = 1 + t.hideOnEscape = 1 + + dialog = StaticPopup_Show("ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG") + if dialog then + oldstrata = dialog:GetFrameStrata() + dialog:SetFrameStrata("TOOLTIP") + end +end + local function ActivateControl(widget, event, ...) --This function will call the set / execute handler for the widget --widget:GetUserDataTable() contains the needed info @@ -696,32 +721,26 @@ local function ActivateControl(widget, event, ...) end local rootframe = user.rootframe - if type(validated) == "string" then - --validate function returned a message to display - if rootframe.SetStatusText then - rootframe:SetStatusText(validated) - else - -- TODO: do something else. - end - PlaySound("igPlayerInviteDecline") - del(info) - return true - elseif not validated then - --validate returned false - if rootframe.SetStatusText then + if not validated or type(validated) == "string" then + if not validated then if usage then - rootframe:SetStatusText(name..": "..usage) + validated = name..": "..usage else if pattern then - rootframe:SetStatusText(name..": Expected "..pattern) + validated = name..": Expected "..pattern else - rootframe:SetStatusText(name..": Invalid Value") + validated = name..": Invalid Value" end end + end + + -- show validate message + if rootframe.SetStatusText then + rootframe:SetStatusText(validated) else - -- TODO: do something else + validationErrorPopup(validated) end - PlaySound("igPlayerInviteDecline") + PlaySound(PlaySoundKitID and "igPlayerInviteDecline" or 882) -- SOUNDKIT.IG_PLAYER_INVITE_DECLINE || XXX _DECLINE is actually missing from the table del(info) return true else diff --git a/Jamba/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua b/Jamba/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua index cf81973..b84e770 100644 --- a/Jamba/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua +++ b/Jamba/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua @@ -8,16 +8,16 @@ -- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName". -- @class file -- @name AceConfigRegistry-3.0 --- @release $Id: AceConfigRegistry-3.0.lua 1139 2016-07-03 07:43:51Z nevcairiel $ -local MAJOR, MINOR = "AceConfigRegistry-3.0", 16 +-- @release $Id: AceConfigRegistry-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $ +local CallbackHandler = LibStub("CallbackHandler-1.0") + +local MAJOR, MINOR = "AceConfigRegistry-3.0", 17 local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR) if not AceConfigRegistry then return end AceConfigRegistry.tables = AceConfigRegistry.tables or {} -local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0") - if not AceConfigRegistry.callbacks then AceConfigRegistry.callbacks = CallbackHandler:New(AceConfigRegistry) end diff --git a/Jamba/Libs/AceEvent-3.0/AceEvent-3.0.lua b/Jamba/Libs/AceEvent-3.0/AceEvent-3.0.lua index 578ae25..bbf55c2 100644 --- a/Jamba/Libs/AceEvent-3.0/AceEvent-3.0.lua +++ b/Jamba/Libs/AceEvent-3.0/AceEvent-3.0.lua @@ -9,8 +9,10 @@ -- make into AceEvent. -- @class file -- @name AceEvent-3.0 --- @release $Id: AceEvent-3.0.lua 975 2010-10-23 11:26:18Z nevcairiel $ -local MAJOR, MINOR = "AceEvent-3.0", 3 +-- @release $Id: AceEvent-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $ +local CallbackHandler = LibStub("CallbackHandler-1.0") + +local MAJOR, MINOR = "AceEvent-3.0", 4 local AceEvent = LibStub:NewLibrary(MAJOR, MINOR) if not AceEvent then return end @@ -18,8 +20,6 @@ if not AceEvent then return end -- Lua APIs local pairs = pairs -local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0") - AceEvent.frame = AceEvent.frame or CreateFrame("Frame", "AceEvent30Frame") -- our event frame AceEvent.embeds = AceEvent.embeds or {} -- what objects embed this lib 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 482fb71..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,4 +1,4 @@ -## Interface: 60200 +## 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 @@ -16,4 +16,4 @@ # Libs\AceGUI-3.0\AceGUI-3.0.xml #@end-no-lib-strip@ -widget.xml +widget.xml \ No newline at end of file diff --git a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/widget.xml b/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/widget.xml index 43c46a1..15cd102 100644 --- a/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/widget.xml +++ b/Jamba/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/widget.xml @@ -6,4 +6,4 @@