--[[ Flex Bar Author: Sean Kennedy (Based initially on Telo's sidebar) Version: 1.406: 08/25/2005 Last Modified: 08/25/2005 1. Fixed the Moving Buttons Issue (this includes related mouseenter, mouseleave, and movetomouse issues) - Sherkhan 2. Added a 3rd Text field, [ text3, shadetext3, justifytext3] - Sherkhan 3. Added a Key Binding to show button information, specifically: ID, Remap ID, and Group ID 1st Press - shows the information. 2nd press - Restores previous button information. Limitation: This functionality does not change text justification or color for the text fields - Sherkhan 4. Merge the changes for: Getting PlayerMiss to work for special attacks by Aranarth. - Sherkhan 5. Fixed a typo bug in the conditional for 'scaled' - Sherkhan 6. Added more internal code to prevent Money line deletion in the tooltips - Sherkhan 7. Added a little more checking to skip code if a button is hidden - Sherkhan 06/11/2005 1. Added the "Raid Safe" option to global options. This will keep events for health/mana/buffs from firing for raid members or their pets. 2. Fixed bug with pet check code. 06/10/2005 1. Fixed "mouseovepetr" bug, and a bug with raidpet > 9 2. Fixed a checktextsub call in UNIT_MANA and UNIT_HEALTH that was causing stutter in raids. 3. Fixed error when mousing over a settextured button 4. Fixed error when entering game already grouped. 06/08/2005 1. REALLY fixed bug in targettarget code. 06/07/2005 1. Fixed bug in targettarget code. 06/07/2005 1. Reinstated WoW Client 1.5+ functionality 2. Updated TOC for WoW version 1.5 06/01/2005 1. Changed text shading to hopefully fix flickering range text. 05/22/2005 1. Completely seperated ACTIONBAR_UPDATE_USABLE, ACTIONBAR_UPDATE_COOLDOWN, UPDATE_INVENTORY_ALERTS into seperate code blocks. Changed the way UPDATE_COOLDOWN detects whether it should call UpdateCooldown. 2. Implemented pet buttons. 3. Added an Auto-Item check to UPDATE_INVENTORY_ALERTS, MERCHANT_UPDATE, MERCHANT_CLOSED 4. Added events. 5. Added UnitClass<> conditional 6. Added PartyDebufftype conditional 7. Changed itembuffs to raise the last item enchantment in the list as its target. 8. Fixed text2 not being saved properly 05/18/2005 1. Move ACTIONBAR_UPDATE_USABLE out of the code block with ACTIONBAR_UPDATE_COOLDOWN so the frame stuttering fix for spells being interrupted doesn't break the cooldown spinner. 2. Added a delayed call to FB_ReformGroups() as a temporary workaround to MouseLeaveGroup bug 05/17/2005 1. Changed Target events - now fired off PLAYER_TARGET_CHANGED. Will now fire lose target then gain target when you switch targets. TargetReactionChanged is no more just use gain target. 2. Added TargetGainTarget, TargetLostTarget and TargetChangedTarget events. NOTE: There are limitations. While there are events for player's changing targets, there are no events for targettarget. If the target changes between two units of the same type with the same name (IE if you have your tank targetted and he switches between 1 riverpaw brute and another riverpaw brute) TargetChangedTarget will not fire, it can't detect it. 3. Changed GainPet/LosePet to not be polled. Added the CreatureFamilyType as the target of GainPet (IE imp when an imp is summoned). The drop down list in the Event Editor will be populated with the available targets as you summon/tame different types. This event always fires if the pet events is set to low or high. 4. Added PetSummoned and PetDismissed events - these events have targets of the pet unitcode (IE: pet, partypet1-partypet4, raidpet1-raidpet40). Setting the pet performance option to low will cause these to only fire for pet unit codes you have in your event list. 05/10/2005 1. Added another check to CreateQuickDispatch to not error on non-standard events 2. Reverted some xml to try and fix cooldownspinner/count/hud bug 3. Added UnitCreatureType<[ "creaturetype" ]> conditional - Thanks Stove. 5. Shift+Click on EDT in the event editor will create a new copy of that event at the bottom of the list to edit. 6. Right Clicking an entry in the scripts menu will auto-matically load it. 7. Fixed target lists in EE for UnitDebuff and UnitDebufftype. 8. Added ability to escape single quotes inside a string with the \ IE: Runmacro Macro='/echo Dhargo\'s Test' will output Dhargo's Test. use this for things like 'Hunter\'s Mark' and the like. Known Issues that are unresolved: MouseLeaveGroup occasionally not working. I can't reproduce this one. Please turn on Safe load in global options and see if this helps. Text Color flickering when out of range - reproduced once, but not long enough to track down. 05/07/2005 1. Fixed bug with /flexbar commands not working in runmacro off events. If anything ever breaks in runmacro on events - see the beginning of FB_Execute_MultilineMacro 2. Fixed issue with Editing events where multi word targets were being munged. 3. Increased text length for textboxes in event editor. 4. Fixed CheckAllBuffs - it was raising GainBuff before the stored buffs were updated with any lost buffs. It now raises all gain/lose buff/debuff/debufftypes at the end. This may fix other problems reported with these as well. 5. Fixed issue with flexactions and hidegrid. 6. Excluded "player" from target list for Unitbuff/debuff/debufftype. 7. Added Drop Down Items option to Global Options - specifies how long the dropdown menus in the Event Editor should be. 8. Modified drop down menus to scroll whole pages. 9. Modified UnitDebufftype to raise if the number of a specifice debuff type increased or decreased. 10. Fixed GainDebufftype/UnitDebufftype to not raise on in-curables. 11. Fixed the conditional parser for not and or. 12. Made HasBuff/Debuff/Debufftype and UnitBuff/Debuff/Debufftype conditionals case insensitive. 13. Added check to PLAYER_ENTERING_WORLD - don't load profile if it's already loaded. 14. 05/05/2005 1. Fixed UnitDebufftype to be raised correctly (it was accidentally working for debuffs going on, but not for them going off). 2. The conditions UnitBuff/UnitDebuff/UnitDebufftype will now be accurate when called from any of UnitBuff/UnitDebuff/UnitDebufftype events. 3. Fixed isusable, enoughmana, inrange, cooldownmet conditions - they were expecting a button ID not button # and the old way was Button # (as it is in the docs). 05/05/2005 1. Changed CheckAllBuffs to only raise one UnitBuff, UnitDebuff, UnitDebufftype event no matter how many buffs changed (to take care of occurences like changing targets where it could be raise many times) 2. Fixed code with advanced buttons not firing from hotkey clicks 3. Fixed in= on events. Was broken by code to reuse existing tables rather than create new ones. 4. Fixed Gain/Lose Debufftype and UnitDebuffType checking. 5. CHANGED UnitDebuffTypes Conditional to UnitDebuffType ( for consistency ) 6. Fixed UnitDebuffType description/example in docs. 7. Changed loadprofile timer to PLAYER_ENTERING_WORLD event to try and avoid incorrect group bounds set. 8. Changed ResetAll to get rid of any old (pre 1.32) profiles saved under the character name only - as they were being reloaded. 05/03/2005 1. REALLY got the shade problems this time - tested all modes. 2. Added a check into CreateQuickDispatch to test for an event that is not in EventGroups 3. Fixed docs typo "flexmacro" not "flexbmacro" :/ 4. Apparently fixed problem with Event Editor macro/script= fields 05/02/2005 1. Fixed UnitBuff/Debuff/Debufftype, HasBuff/Debuff/Debufftype conditionals. 2. Forced a check of buffs at profile loaded to preload buff table 3. Fixed error caused by 'ProfileLoaded' with a target 4. Fixed syntax in Condtional descriptions for multiple items. 05/01/2005 1. Fixed another bug stemming from trying to clean up color code. 2. Added ReloadUI back in to Resetall and into Restore. 05/05/2005 1. Fixed initialization code for buttns 97-120 on existing profiles 2. Fixed color bug in shadetext/2 3. Added %player, %party1-%party4, %pet and %target to texture options 04/05/2005 1. Changed XML a little so that frame-coordinates are no longer stored in the frame-layout.txt cache in WTF\Account\\ 2. Changed Scripts save function to break large text blocks into 512 character chunks. Saved variables seem to max out at ~950-970 characters in a string. 3. Added FastLoad as an option. With the frame-layout.txt file gone, the need for delayed loading seems to be obviated. 4. *may* have fixed the error that leads to misplaced buttons on successive group auto-arrange/move commands in configs. 5. Added FB_Register() to add new event handlers that process after any existing handlers. 6. Added event "ComboPoints" - target is current number of combo points 7. Added conditions ComboPtsEQ<#>, ComboPtsLT<#> anc ComboPtsGT<#> - respectively check to see if current combo points are equal to, less than or greater than the target. 8. Added event "UnitAffectingCombat", target is which unit to watch for. Affecting combat seems to be a mix of GainAggro/Start Melee combat. 9. Added conditional "AffectingCombat" - condition to check if a specific unit is currently affecting combat. 10. Added test code for PLAYER_LOST_CONTROL and PLAYER_GAINED_CONTROL. I believe that these will fire when you are CC'd in some way. Currently the code saves the messages in FBScripts under the names "PLAYER_LOST_CONTROL" and "PLAYER_GAINED_CONTROL". If someone could please look at these after being feared, charmed or stunned and let me know if what, if any, info was recorded there I can implement these events. 11. Moved FBScripts editor to FlexBar_GUI.xml and FlexBar_GUI.lua. 12. Mostly fixed FBScripts editor's scrolling weirdness. 13. Moved seperate toggles (FBFastLoad, FBSafeLoad, FBTooltips, FBVerbose) into a table. 14. Implemented a simple GUI for toggles. 15. Fixed broken Mana/Health conditionals 16. Implemented a simple GUI to toggle on and off groups of events 17. Implemented GUI for Event Editing 18. Cleaned up Timer_Class code to prevent the steady dumping of memory onto the garbage heap. 19. Implemented the behnd the scenes code for AutoItems 20. Implemented the behind the scenes code for extending buffs/debuffs to party/target/pet 21. More stuff than I could keep track of :) 04/03/2005 1. Fixed bug resulting from buffs cast before profile was loaded/ or buff wearing off before profile was loaded. -- one result is that these buffs will not be correct for the condition hasbuff<> 2. Restored the Use button to being able to specify multiple buttons 3. Added FB_CastSpellByName() and /fbcast (as slash command) - this addresses the issue with /cast and CastSpellByName() not working inside runmacro/runscript. 4. Added 2 commands for use with runscript/runmacro: SetTexture Button=# Texture='' Echo Button=