Download
(276 Kb)
Download
Updated: 05-22-13 11:34 PM
Pictures
File Info
Updated:05-22-13 11:34 PM
Created:03-30-12 03:18 PM
Downloads:3,896
Favorites:30
MD5:
Click Box Healer  Updated less than 3 days ago!
Version: 1.5.4
by: Solsis00, niemassacre
NOTE: Change of pace. We are back in action. Slowly, but back. See comments area for updates.

1.5.4 - No end user updates were made. Just basic error checking and ownership updates on the back-end. Hang in there with me as we get this thing going again.

**PLEASE READ**
To simplify the update process, update notes will no longer be updated here. Going forward, please view either the changelog or the comment area for addon changes/updates


PLEASE LEAVE FEEDBACK! Your feedback helps develop this addon with features desired by everyone, rather than just myself. If you have any likes, dis-likes, suggestions, or just general thanks, please feel free to leave them in the comments or send me a pm. Thanks again for the continued support! Enjoy!




###########################################################

OVERVIEW:

Click Box Healer is primarily viewed as a healing addon, but can be useful to all roles. CBH is used to quicken healing and more efficiently identify the current status of your party, displaying everything from health to buffs and debuffs on each member. This addon allows macros to be bound to click actions that are performed on a set of raid frames that will cast the selected abilities/macro. These frames are usable when solo, in a party, with pets (groups 5 or less), or in a raid. It accepts up to the basic 5 mouse buttons, along with scroll up and down, as input (as limited by the RiftAPI). These inputs can be bound in conjunction with keyboard buttons (shift, ctrl, alt) for even more possibilities.

The addon can be moved and resized to fit any screen comfortably. This addon has the ability to track up to 3 customizable buffs (one for each available corner), as well as debuffs on each frame for poisons (green), diseases (orange), curses (purple), and whitelisted debuffs (red). Debuffs are displayed as a colored box around the health percentage accordingly colored to the debuff.


###########################################################

CONFIGURATION:
  • There is a minimap button included that will do the following: LeftClick - Opens options window and unlocks raid frame, MiddleClick to toggle hiding/showing the raid frames, RightClick and drag to move minimap icon

The configuration of the addon is fairly simple. It has an in-game option menu that allows you to set the macro binds to each mouse button with an optional keyboard key for more combination possibilities. In these fields you can pretty well write anything that you can put in a macro. The bindings are saved by the current spec/role you are in. ie. 1-6 and will change automatically if/when you change roles.

In the 2nd options tab you will find the ability to change the health bar settings. Multiple pre-defined textures as well as many color options settings for various pieces of the unit frames including the backdrop, healthframe, text colors, etc.

The last tab is where you can setup all your buff and debuff options. You can setup de/buffs to track. Tracking a buff will cause it to show up in a resizeable square on the affected raid frame. You can whitelist debuffs that don’t normally show up for added flexibility as well as blacklist ones you would like to hide.


Command line options available: (type /cbh in game to see list)
/cbh show - Show window
/cbh hide - Hide window
/cbh reset - Reset default addon settings

/cbh config - Display config window
/cbh toggle - Toggles displaying main window
/cbh lock - Allows you to move the frame. Type again to lock.
/cbh tt - Toggles tooltips on frame mouseover


###########################################################

KNOWN ISSUES:
  • The frame for the Defiler pet "Beacon of Despair" will bug out if it despawns because you run far away from it. I'm trying to create a fix for this, but it's rooted in an issue with how Trion handles the pet. If the pet frame becomes unresponsive, you may need to relog to clear it.

Due to limitation of the API in RIFT at this time, while you are in combat, no changes can be made to the addon. You cannot get in the options window, unlock the frame, toggle the tooltips, or close the frame.

###########################################################

THANKS AND APPRECIATIONS:

An extra thanks to the recent addition of Niemassacre to the dev team.
A huge thanks to dOxxx's LibSimpleWidgets library. Made several pieces of this addon much more functional and usable.
Thanks also go to ZorbaTHut for LibUnitChange.
And a big thanks to Protonova for the tips they provided that helped initially fix the performance bugs.
Nice work to the original authors on WoWAce for some of the health frame artwork used in this addon.

All feedback and ideas are welcome. Please let me know if you have any feedback at all. It is appreciated and contributes to the continuation this project.
Change Log:

5/23 - v1.5.4 Reborn
  • As stated in the addon details, nothing major here. Just some infrastructure changes.
  • Updated file location for option window.
  • Updated author ownership information.


12/18 - v1.5.3
  • Added option to show icons on buffs.
  • Absorption bar is now larger for Warriors and Rogues.
  • Custom buffs now match if the beginning of the spell matches what you've entered. "Link of" will catch all your Defiler links!
  • Other small bug fixes.


12/5 - v1.5.2
  • Fixed issue with absorption bar not correctly responding to Burnout debuff.


12/4 - v1.5.1
  • Fixed issue with "duration" and "begin" errors on buffs and debuffs that did not contain those values.


11/28 - v1.5
  • Rewrote buff monitoring section for improved CPU performance.
  • Fixed performance issue when in a raid of 5 or fewer people.
  • Added absorption tracking to frames. This tracker also shows if Burnout is present on the target (pink coloring, vs normal cyan coloring).
  • Hopefully fixed last issue of floating point math errors.
  • Frames now correctly display the new graphical raid markers
  • Ability and Buff lists are now created when Options pane is loaded, to reduce performance error warnings.


11/5 - v1.4
  • Added scroll wheel casting options.
  • Fixed more parameter bug issues.


9/16 - v1.3
  • Updated code to be compatible with the new API changes.


7/18 - v1.2
  • Fixed bug that caused a nil error on line 162 upon initially loading.
  • Added the ability to save profiles across characters. This includes Frame spacing, sizes, textures, location on the screen and health colors. THIS DOES NOT INCLUDE ANY BUFF COLORING OPTIONS.
  • Added a message that gets displayed if you try to open the config window while in combat.
  • Added some more performance checks to help reduce the occurrence of watchdog (addon performance monitor)


7/11 - v1.1
  • Characters who are dead now show “Dead” for health, rather then “0%”
  • Fixed a bug with certain slider values creating floating point errors.
  • Minimap button no longer responds in combat, to fix “secured frame” error.
  • Added health warning color option - colors the frame yellow/red at low health levels.
  • Adjusted several textures slightly to represent the colors better.
  • Added dynamic length for unit names - changes as you change your frame width!
  • Updated the addon help file that is packaged with the addon.
  • New screenshots uploaded of the addon.
  • Fixed a bug that caused it to show selected unit boxes for units that aren’t available.
  • Fixed a bug that prevented new unit frames being drawn after leaving combat.
  • Fixed a bug with the offline text still showing on units when hide percent is active.
  • Fixed a bug with Buff list selection not clearing when selections change.
  • Added an option to set custom buffs to watch. This can include debuffs such as ones from Cleric’s shield abilities.
  • Fixed a bug where buffs that were removed from the watch list were still showing on frames.
  • Fixed a bug that caused units to show out of range/los incorrectly. (hopefully permanently fixed this time)
  • Fixed a bug that was causing unit frames to target pets or not be targetable at all due to incorrect party status/counts.


7/3 - v1.0.9
  • Fixed bug with Role Icon size not loading the saved value.
  • Fixed positioning for buffs to be proportional to the frame size.
  • Fixed bug with check box option for frame right to left being checked when it wasn't true.
  • Fixed issue with buff colors not updating after role change.
  • Added more filters to spell ability list populating to weed out unnecessary listings.
  • Fixed issue with obscured text with certain checked boxes in options window.
  • Fixed issue with text listing of saved buff locations not resetting on role change.


7/2 - v1.0.8
  • Added option for buffs to flash as they expire. Choices now are flash or fade.
  • Adjusted the colors for the debuffs. Curses are a little more purple, poisons are a little more teal-green, and diseases are a yellow-orange.
  • Fixed a bug that caused errors when disabling the role icon monitor.
  • Fixed a bug with out of range and los not detecting members when they are zoned in different areas and newly joined to party.
  • Fixed an los bug that caused the player to show faded when a group is disbanded.
  • Added separate background for manabars.
  • Added options to have buff expiration warning colors as well the option to customize the colors.
  • Fixed a bug that was causing whitelisted debuffs to not show up when using the full frame debuff option.


6/27 - v1.0.7
  • Added ability to change the buff color.
  • Added 2 additional buff slots. Left Center and Left Right.
  • Fixed an issue where the ability list was not auto-refreshing.
  • Modified Ready Check icon.
  • Added buff fading as the duration falls off.
  • Added an option to change the alpha for out of range and los frames.
  • Added an option to color the whole frame when debuffs are present.
  • Fixed a bug with frames not showing warfront status'.


6/20 - v1.0.6
  • Fixed an issue with warfront status' not being displayed on group members.
  • Fixed offline status not showing up correctly on login or /reloadui
  • Fixed mana bar detection and updates to only happen on mana changes.
  • Fixed a bug found in the player pet selection highlight causing it to not show as selected.
  • Fixed a bug found in the pets that was causing the wrong group status.


6/19 - v1.0.5d
  • Re-coded group determination check allowing slightly better performance.
  • Added configuration to allow growing frames from right to left.
  • Fixed the reverse growth to no longer require a /reloadui. All settings can now be changed on the fly.
  • Added the ability to hide the role icon. When role isn't tracked it will hide it.
  • Fixed ghost frame (yet again, hopefully for good this time)
  • Fixed a bug that caused pets to be highlighted even when not displayed.
  • Fixed a bug that caused incorrect role values and out of sync saved keybind information.
  • Made some adjustments to the range check to allow slightly better performance.


6/5 - v1.0.4
  • Attempted again to fix the bug that is causing frames to still show as selected after group members disband. Should be fixed this time. Will continue to monitor.
  • Fixed a but with the mouseoverunit that sometimes caused an error while in combat.

### Going forward: Updates will be spread out a little farther going forward to provide more time for testing and error checking. I will continue to update my comments area as I have in the past to inform my followers of progress. Thanks everyone for the continued support.
6/2 - v1.0.3
  • Fixed a bug where under some specific circumstances, keybinds would be incorrect for the original spec you started the addon with. This was due to its base default value being 1. This has been changed to read the correct spec that you load the addon with at initial login.
  • Fixed the right click menu not pulling up for the correct target.
  • Corrected a bug that caused the Buff watch selections to DISPLAY incorrectly after changing roles.
  • Added some more performance tweaks to help reduce CPU. **This will be ongoing to insure CBH does not break with 1.9**


5/31 - 1.0.2
  • Corrected a bug found that was not clearing hots properly when you are solo.
  • Corrected an issue when units are 100% the frame was slightly off appearing as though they were damaged.
  • Added Explosive Venom to the debuff list as a default debuff to monitor.


5/29 - 1.0.1a
  • Corrected an issue found with some units still not showing correctly after group members were moved changed.
  • Tested more performance changes. Looking at about 3.5-4% CPU in a full raid group. Those changes are included.


5/29 - 0.9.9a
  • Corrected an issue found with some units still not showing correctly after group members were moved changed.
  • Some performance testing was done. Will make some changes for the next update.



v0.9.8d just updated some properties so my addon will now generate it's files in a ClickBoxHealer Sub-directory inside the zip. Otherwise nothing has changed. Await the next update.


5/21 - 0.9.8c
  • Added 2 titles to identify the debuff selections as whitelist or blacklist
  • Added Raid Markers. ** Placement a little difficult and might move.
  • Fixed the issue with buffs/status' not following units when moved in group or when UI is reloaded.


05/19 - 0.9.8a
  • Added a debuff whitelist for the ability to add specific debuffs to monitor.
  • Added a debuff blacklist to ignore specified debuffs and not show them.
  • Completely re-coded the coloring options on tab 2 for the frames. Fixed some bugs with colors not changing in the preview and colors not applying correctlly under different scenarios.
  • Made the default frame color black on a reset or new setup.


05/14 - 0.9.7a
  • Spell lists should now load automatically at initial login.
  • NEW BUFF SYSTEM LIVE! Buffs can now be assigned to specific corners.
  • Buffs now show stack count for relevant buffs.
  • Added an option to change the Role Icon size.
  • Moved unit frame buff square resize to the frame options tab.
  • Several textures were darkened and should take better to being colored now.
  • Reduced CPU overhead by 4%+ with the new buff setup.


05/13 - 0.9.6g
  • Fixed an issue with calling colors not applying properly when changed.
  • Corrected the buff watcher sizing to reflect the new multi buff system.
  • Converted the buff watcher size config to a slidebar for easier input.
  • Change the locked frame graphic.



05/11 - 0.9.6f
  • Fixed the unit frame spacing so it gaps horizontal/vertical accordingly.
  • Added vertical gapping.
  • Removed the drag window.
  • *** Changed to a drag button/orb in the left corner.
  • Added resizing of the unit frames to the config window.
  • Converted the texture list to a dropdown to utilitze space.
  • Did some more code cleanup and itemization.



05/08 - 0.9.6d
  • Fixed the options window so when closed it will always lock the unit frames.
  • Fixed an issue with roles not loading at initial login.
  • Fixed the issue with frames not updating on add/remove/re-arranging party/raid members.
  • Shrunk the ready check size about 30%.
  • Added an option to change the font sizes on the unit frame.
  • Added current target highlighting.
  • Added mouseover targeting. You can now use mouseover macros with these raid frames.
  • Added multiple HOTs tracking (not configurable currently). Tracks Soothing Stream, Healing Spray, and Healing Current as well as the stack count for Soothing Stream.
  • Structure for the new debuff list is in place. Working on the configuration and retrieval of stored debuffs.
  • Added the ability to sort groups bottom to top.
  • Added the ability to sort groups left to right.
  • Fixed an issue with the target highlighting empty frames for pets that aren't being shown.
  • Contexts menus are in. ***Due to API limitations, while enabled you can't use right click spell bindings.
  • Fixed all the old current textures to allow better coloring.
  • Added 15 new textures of different variety to allow more customizing.
  • Current texture selection now applies to the mana bars.
  • Changed health color configuration to only apply when "Apply Colors" button is clicked.
  • Added the ability to change the horizontal gapping for unit frames.



[04/28/2012 - 0.9.5
  • Only thing in this update really was fixing the ready checks. They should now work with no issues. Tested with multiple people in the guild. Thanks for the patience and again I apologize for any inconvenience it may have caused.



04/26/2012 - 0.9.4
  • Added ready checks. Some people are having problems with this. It has been disabled until 9.5
  • Added current version number to welcome message.
  • Added range checks.
  • ***Range checks added some cpu to the addon. Looking into ways of reducing this back to normal.
  • ***Until the CPU issue is resolved I have added an option to disable the range checking in case it causes difficulties.
  • Continuing to find/add ways to reduce the CPU load from the addon.
  • Fixed a coding problem that caused the LoS to not work on initially loading.
  • Added Warfront status checks. Will now show unit as being in a warfront.
  • Changed minimap settings. Now LeftClick opens config window and unlocks frame, MiddleClick now toggles hide/show frame, RightClick moves the minimap button.
  • Added a new tab in the config window for general options.
  • Added an option to enable/disable the minimap button.
  • Added tooltips for unit frames that shows current keybinds. (Brought this back upon a few requests but is disabled by default)



04/23/2012 -- 0.9.3
  • Changed LoS settings to make it more apparent which frames aren't available
  • Added health frame coloring
  • Added some more performance checks to further reduce lag in large groups
  • More changes to the options screen. Tabs are renamed to better locate the desired options.
  • Color settings in the config now has an Apply Colors button to apply the colors.
  • Color preview is complete and can now fully view all changes to the unit frames.



04/20/2012 -- 0.9.2
  • Fixed an issue with empty values that were causing errors in some of new updates No more cbh reset with new updates
  • Added binding being saved by current "spec/role"
  • Added a minimap mouse icon for ease of access to options and to toggle moving the unit frames.



04/18/2012 - 0.9.1
  • MAJOR PERFORMANCE FIX. After two long nights and some reading I managed to fix the performance issues.
  • With the added performance fix, I also increased the refresh speed allowing frames to stay more accurate.
  • ADDED MANA BARS!
  • Frames will now fade out when units are LOS rather than turning grey.
  • Changed Aggro box texture. Subject to change again. Not sure I like it yet.
  • Finished the unit frame border texture. I think it looks better now.
  • Can now change the size of the HoT Buff Icon.
  • Still doing code cleanup and commenting on the backend. Removing old test and debugging code.



04/14/2012 - 0.8.4
  • Due to requests I re-added the borders around the frame.
  • Made some adjustments to the border image. Still looks kind of crappy to me but works for now.
  • Added 4 new textures. Nothing special. Put in place for testing the upcoming color customizing.
  • Added a new texture for the HOT buffs.
  • Made some ongoing changes to the configuration window. Looks a little better now.
  • Increased some of the font sizes for more visibility and readability. More to do here.
  • Made the ability list physically longer to reduce scrolling. Filtered out more un-needed spells.
  • Moved the refresh ability list button to the bottom of the options window.
  • Cleaned up the boxes on each tab.
  • Re-arranged color selections and settings on tab 2. **Might turn into a drop-down selector thanks to SimpleWidgets most recent update.
  • Added the ability to change to backdrop color behind the health frame.
  • Added to the texture preview to allow viewing the background color change as well.
  • Made some minor performance changes. Located an overall design flaw in the performance and will be working to correct it in the upcoming releases.
  • Did lots and lots of code cleanup and optimization. Removed a lot of old un-needed coding. Organized a little better for easier reading. Separated code into more files for easier location. Added many commented areas helping identify the functions of the code.



03/31/2012 - 0.8.2
  • Repositioned health percentage
  • Enlarged health percentage to make it a little more noticeable
  • Corrected an issue with being able to drag the frame
  • Added a color highlight to the whole frame when unlocked
  • Changed the color behind the health bars to a faded black

Quick fix:
  • Corrected an issue with the resizing ability while the frame was unlocked.
Optional Files (0)


Archived Files (18)
File Name
Version
Size
Author
Date
1.5.3
265kB
Solsis00
12-18-12 01:15 AM
1.5.2
265kB
Solsis00
12-05-12 02:27 AM
1.5.1
265kB
Solsis00
12-04-12 03:11 AM
1.5
265kB
Solsis00
11-29-12 01:16 AM
1.4
263kB
Solsis00
11-05-12 04:14 AM
1.3
262kB
Solsis00
09-16-12 05:08 PM
1.2
262kB
Solsis00
07-18-12 04:22 AM
1.1
258kB
Solsis00
07-11-12 05:28 AM
1.0.9
262kB
Solsis00
07-03-12 03:03 AM
1.0.8b
262kB
Solsis00
07-02-12 09:40 PM
1.0.8
262kB
Solsis00
07-02-12 09:22 PM
1.0.7
260kB
Solsis00
06-27-12 04:29 PM
1.0.6a
256kB
Solsis00
06-20-12 12:52 AM
1.0.5d
255kB
Solsis00
06-19-12 02:52 PM
1.0.4
269kB
Solsis00
06-07-12 07:24 AM
1.0.4
269kB
Solsis00
06-05-12 05:41 AM
1.0.3
269kB
Solsis00
06-03-12 12:33 AM
1.0.2
256kB
Solsis00
05-31-12 01:45 PM


Post A Reply Comment Options
Old 01-31-13, 03:07 PM  
Solsis00
Claw of Regulos
 
Solsis00's Avatar
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 139
Uploads: 1
I might be making a come-back around to Rift. Checking out SL. Thanks again for your interest and for using CBH. The unit frame being added in combat and not click-able is a restriction of the API and can't be fixed. However, You are correct in that it can be updated immediately after leaving combat. This was at one point fixed but may need to be re-visited. Thanks for letting us know.

~Solsis



Quote:
Originally Posted by Solf
You're welcome

I'm using it, so I have vested interest in it working properly

Oh, by the way, I've added additional line to the fix in cbhUnitUpdate() a couple of posts down (edited original post).


And also another bug report that I didn't have time yet to track or fix -- summoning pet (in my case defiler's totem or whatsitsname was) in combat breaks its unit frame in the sense that @mouseover macros don't target it.

I don't know if this can be fixed in-combat (due to lockdown), but it ought to be fixable after combat ends (and it doesn't fix itself right now).

Also considering the relatively high likelyhood of this actually happening (at least for defiler), some thought ought to be given as to how to make it work during the combat where pet is summoned.
Solsis00 is offline Report comment to moderator  
Reply With Quote
Old 01-08-13, 03:50 AM  
Solf

Forum posts: 0
File comments: 14
Uploads: 0
You're welcome

I'm using it, so I have vested interest in it working properly

Oh, by the way, I've added additional line to the fix in cbhUnitUpdate() a couple of posts down (edited original post).


And also another bug report that I didn't have time yet to track or fix -- summoning pet (in my case defiler's totem or whatsitsname was) in combat breaks its unit frame in the sense that @mouseover macros don't target it.

I don't know if this can be fixed in-combat (due to lockdown), but it ought to be fixable after combat ends (and it doesn't fix itself right now).

Also considering the relatively high likelyhood of this actually happening (at least for defiler), some thought ought to be given as to how to make it work during the combat where pet is summoned.
Solf is offline Report comment to moderator  
Reply With Quote
Old 01-08-13, 02:03 AM  
Solsis00
Claw of Regulos
 
Solsis00's Avatar
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 139
Uploads: 1
Thanks for all the suggestions and help Solf. Niemassacre should be back on the scene before too long. Appreciate all the support.
Solsis00 is offline Report comment to moderator  
Reply With Quote
Old 01-07-13, 05:37 AM  
Solf

Forum posts: 0
File comments: 14
Uploads: 0
And while I was at it, I've added what I call "action tracking" functionality to CBH:
- When your CBH action (say heal) is accepted by the game, target unit frame flashes green.
- When your action cannot be accepted because of GCD or spell cast, target unit frame glows red until such time as next action can be accepted.
- If you have command queuing enabled ('full' in my case), red glow is replaced by green flash once current command ends and your queued action takes place.

I find this functionality extremely helpful when there's "a situation" and I have to manage my GCDs and casts.

Note: by default this works with actions set via CBH. To make your existing @mouseover macros work with this functionality, simply add to them this line (probably somewhere in the beginning):
Code:
/script cbha()

To make this work, I've made tiny change optionWindow1Abilities.lua in the processMacroText() function:
Code:
		for i = 1, cbhConstants.buttons do
			if string.find(cbhMacroText[cbhValues.roleset][i], "\13") then
				-- string.gsub("Hello banana", "banana", "Lua user")
				tt[i] = "suppressmacrofailures\13"..cbhMacroText[cbhValues.roleset][i]
				tt[i] = string.gsub(string.gsub(tt[i], "##", "@" .. k), "\13", "\n")
			elseif string.find(cbhMacroText[cbhValues.roleset][i], "group##") then
				tt[i] = string.gsub(cbhMacroText[cbhValues.roleset][i], "@group##", "@"..k)
			elseif string.find(cbhMacroText[cbhValues.roleset][i], "##") then
				tt[i] = string.gsub(cbhMacroText[cbhValues.roleset][i], "##", "@"..k)
			else
				tt[i] = cbhMacroText[cbhValues.roleset][i]
			end
			tt[i] = "/script cbha("..tnum..")\n"..tt[i]
		end
(just last line before last 'end' was added)

The rest of the stuff is localized in another file (which I have as an another addon since I'm not the code owner for CBH):
Code:
-- Registers event handler.
function solfRegisterEventHandler(eventTable, handler, addonName, handlerDescription)
	table.insert(eventTable, {handler, addonName, handlerDescription})
end

-- Create CBH frames for showing 'action in process' stuff...
cbh.groupAction = {}
for i = 1, 20 do
	cbh.groupAction[i] = UI.CreateFrame("Text", "CBH Action "..i, cbh.groupBF[i])
end

local orig_cbhCreateGroups = cbhCreateGroups;
function solfCBH_addlCreateGroups()
	for a = 1, kMaxGroups do	-- 4 groups of 5
		for i = 1, kMaxGroupMembers do	-- creates each of the 5 units for each group
			frameNumber = i + ((a-1) * kMaxGroupMembers) -- Step through each frame number (1-20 currently)

			cbh.groupAction[frameNumber]:SetFontColor(1, 1, 1, 1)
			cbh.groupAction[frameNumber]:SetLayer(1)
			cbh.groupAction[frameNumber]:SetPoint("BOTTOMCENTER", cbh.groupBF[frameNumber], "BOTTOMCENTER", 0, -(cbhValues.mbheight))
			cbh.groupAction[frameNumber]:SetFontSize(cbhValues.fontsize)
			cbh.groupAction[frameNumber]:SetText("            ")
			cbh.groupAction[frameNumber]:SetBackgroundColor(1,1,1,0)
			cbh.groupAction[frameNumber]:SetVisible(true)

--			cbh.groupStatus[frameNumber]:SetBackgroundColor(1,0,0,1)
		end
	end
end
function solfCBH_cbhCreateGroups()
	orig_cbhCreateGroups()
	solfCBH_addlCreateGroups()
end
cbhCreateGroups = solfCBH_cbhCreateGroups
--solfCBH_addlCreateGroups() -- self invoke to build stuff since we are too late to hook initial invocation

local cbhActionFrameNumber;
local cbhActionStatus = "idle" -- idle, executing (notification that action is being executed), maybe (when action may start executing shortly or not), pending (when action will execute later)
local cbhActionMaybeTime = 0 -- when 'maybe' status was set
local cbhActionMaybeWindow = 0.3 -- time frame allowed for 'maybe' action to actually happen
local cbhActionExecutionStart = 0 -- time when execution started
local cbhActionExecutionDuration = 0.2 -- how long execution 'flashes'
local cbhGCD = false -- GCD indicator
local cbhPlayerCasting = false
function cbha(frameNumber)
--	print(frameNumber)
	
	if frameNumber == nil then
		-- Try to find mouseover unit
		local moUnit = Inspect.Unit.Detail("mouseover")
		if moUnit == nil then
			return -- Unknown unit, just return
		end

		frameNumber = GetIndexFromID(moUnit.id)
		if frameNumber == nil then
			return -- Unknown frame, just return
		end
	end

	if (cbhActionFrameNumber ~= nil) then
		cbh.groupAction[cbhActionFrameNumber]:SetBackgroundColor(1,1,1,0)
	end

	if cbhPlayerCasting then
		cbh.groupAction[frameNumber]:SetBackgroundColor(1,0,0,1)
		cbhActionStatus = "pending"
	else
		cbhActionStatus = "maybe"
		cbhActionMaybeTime = Inspect.Time.Frame()
	end
	cbhActionFrameNumber = frameNumber
end

-- Determines whether cooldown-related event is because of GCD. true -- GCD, false -- not (something off-gcd for example)
function cbhIsGCDAction(cooldowns)
	local gcds = 0
	local ability, cd;
	for ability, cd in pairs(cooldowns) do
		if (cd == 0) or (cd == 1) or (cd == 1.5) then
			gcds = gcds + 1
		end
		if (gcds > 2) then
--			print("GCD!")
			return true
		end
	end

--	print("not gcd")
	return false
end

function cbhCDStart(cooldowns)
	if cbhIsGCDAction(cooldowns) then
		cbhGCD = true
		cbhPlayerCasting = true
--		print("GCD!")
	end

	-- This executes regardless of whether it was GCD or off-gcd action.
	if (cbhActionStatus == "pending") or (cbhActionStatus == "maybe") then
		if cbhValues.solfHideGreenFlash then
			cbhActionStatus = "idle"
			cbh.groupAction[cbhActionFrameNumber]:SetBackgroundColor(0,0,0,0)
		else
			cbhActionStatus = "executing"
			cbh.groupAction[cbhActionFrameNumber]:SetBackgroundColor(0,1,0,1)
			cbhActionExecutionStart = Inspect.Time.Frame()
		end
	end
end
solfRegisterEventHandler(Event.Ability.New.Cooldown.Begin, cbhCDStart, "ClickBoxHealer", "CD start")

function cbhCDEnd(cooldowns)
	if cbhIsGCDAction(cooldowns) then
		cbhGCD = false
--		print("gcd over")
		if (Inspect.Unit.Castbar("player") == nil) then
			cbhPlayerCastOver()
		end
	end
end
solfRegisterEventHandler(Event.Ability.New.Cooldown.End, cbhCDEnd, "ClickBoxHealer", "CD end")

function cbhAddlOnUpdate()
	local time = Inspect.Time.Frame()
	if (cbhActionStatus == "maybe") then
		local diff = time - cbhActionMaybeTime
		if (diff < 0) or (diff > cbhActionMaybeWindow) then
			cbhActionStatus = "idle"
			cbhActionFrameNumber = nil
		end
	end

	if cbhPlayerCasting then
		if not cbhGCD then
			if (Inspect.Unit.Castbar("player") == nil) then
				cbhPlayerCastOver()
			end
		end
	end

	if (cbhActionStatus == "executing") then
		local diff = time - cbhActionExecutionStart
		local alpha = 1.0 - (diff / cbhActionExecutionDuration)
		if alpha <= 0 then
			cbh.groupAction[cbhActionFrameNumber]:SetBackgroundColor(1,1,1,0)
			cbhActionStatus = "idle"
			cbhActionFrameNumber = nil
		else
			cbh.groupAction[cbhActionFrameNumber]:SetBackgroundColor(0,1,0,alpha)
		end
	end
end
solfRegisterEventHandler(Event.System.Update.Begin, cbhAddlOnUpdate, "ClickBoxHealer", "Additional OnUpdate handler")

function cbhPlayerCastOver()
--	print("cast over")
	cbhPlayerCasting = false
	if cbhActionStatus == "pending" then
		if (cbhActionFrameNumber ~= nil) then
			cbh.groupAction[cbhActionFrameNumber]:SetBackgroundColor(1,1,1,0)
			cbhActionStatus = "maybe"
			cbhActionMaybeTime = Inspect.Time.Frame()
		end
	end
end
(as you can see, I had to hook cbhCreateGroups() and added my own Event.System.Update.Begin handler since I didn't want to modify CBH code directly)

There's half-hearted option implementation to hide green flash (cbhValues.solfHideGreenFlash) which I've added since I'm not 100% sure which way is better. There's no option for the "red light" since it was basically the whole goal of adding this functionality.


I'd really appreciate if you'd consider including this into CBH itself as it'll save me from having to maintain my separate 'hack' For inclusion it needs two things:
- Options to enable / disable.
- A better implementation of actual 'flashing' UI -- current version simply uses text field with bunch of spaces in it -- it works okay for my current frame setup, but won't work if someone makes his/her frames significantly smaller.
Solf is offline Report comment to moderator  
Reply With Quote
Old 01-06-13, 03:06 PM  
Solf

Forum posts: 0
File comments: 14
Uploads: 0
Tracked down some issues with buffs / aggro indicators 'sticking'.

First of all, in main.lua, in cbhUnitUpdate() around line 145 or so, need to add resetting of buff indicators & aggro:
Code:
			cbh.UnitBuffTable[unitident] = {}
			for i = 1, 5 do
				cbh.groupHoTs[j][i]:SetVisible(false)
			end
			cbhBuffAdd(unitID.id, buffList(unitident))
			--cbhBuffRemove(unitID.id, buffList(unitident))

			-- Reset aggro indicator
			cbh.groupBF[j]:SetTexture("ClickBoxHealer", "Textures/nbackframe.png")
			
			-- Also fix debuff indicator
			cbh.groupStatus[j]:SetBackgroundColor(0, 0, 0, 0)
(first line is present in code "as is", so you can search for it)


Also, on the basis that "it shouldn't hurt", I suggest to rewrite debuff removal fix that I proposed earlier in the same method as follows:
Code:
				if cbh.UnitBuffTable[xunitident] ~= nil then
					local unitBuffList = buffList(unitID.id)
					for buffID, buffTable in pairs(cbh.UnitBuffTable[xunitident]) do
						-- Catches debuffs that are expired but did not trigger BuffRemove call
						-- Sometimes the buff list isn't available so we need to prevent nil operations --
						if (unitBuffList == nil) or (not unitBuffList[buffID]) then
								local bs = {}
								bs[buffID] = "something"
--								print("removing: "..cbh.UnitBuffTable[xunitident][buffID].name)
								cbhBuffRemove(unitID.id, bs)
						elseif cbh.UnitBuffTable[xunitident][buffID].buffType ~= "buff" then
						elseif cbh.UnitBuffTable[xunitident][buffID].duration ~= nil and cbh.UnitBuffTable[xunitident][buffID].begin ~= nil and cbh.UnitBuffTable[xunitident][buffID].remaining ~= nil and cbh.UnitBuffTable[xunitident][buffID].slot ~= nil then
(first and last lines are original, for search purposes)

Note that it still needs fix to cbhBuffRemove that is a couple of posts down.
Last edited by Solf : 01-08-13 at 03:44 AM.
Solf is offline Report comment to moderator  
Reply With Quote
Old 01-05-13, 04:50 PM  
Solf

Forum posts: 0
File comments: 14
Uploads: 0
Kind of a bug report -- looks like something is not exactly right with pets -- when changing specs / letting them die their buff indicators and 'taking damage' alerts sometimes get stuck.
Solf is offline Report comment to moderator  
Reply With Quote
Old 01-02-13, 01:41 PM  
Solf

Forum posts: 0
File comments: 14
Uploads: 0
Yeah, well, that debuff removing code alone didn't help -- and I actually had a chance to examine state when debuff indicator got stuck.

I had something like -2 poisons and +1 curses according to ClickBox counters, so something is definitely off with debuff tracking.

So with that in mind I added the following to the cbhBuffRemove:
Code:
						-- Count how many debuffs we have remaining...
						local dRem = 0
						local di, dv
						for di, dv in pairs(cbh.UnitBuffTable[retIdent]) do
							if dv.buffType ~= "buff" then
								dRem = dRem + 1
							end
						end
						-- If we have one debuff, it's the one currently being removed, so make sure we have no remaining debuff flags.
						if dRem < 2 then
							cbh.UnitStatus[retnum][22] = 0
							cbh.UnitStatus[retnum][23] = 0
							cbh.UnitStatus[retnum][24] = 0
							cbh.UnitStatus[retnum][25] = 0
							recolor = true
						end
						-- If you need to recolor, figure out which color to change to
						if recolor then
(last two lines are the original lines from the file, so that it is clear where it was added)

This seems to work so far, but I hadn't much chance to test it out.

P.S. The previous fix to catching out debuffs needs to be applied too.
Last edited by Solf : 01-02-13 at 01:41 PM.
Solf is offline Report comment to moderator  
Reply With Quote
Old 12-29-12, 04:56 PM  
Solf

Forum posts: 0
File comments: 14
Uploads: 0
Actually... I decided to take my own advice, so I went ahead and rewrote section that "Catches debuffs that are expired but did not trigger BuffRemove call":

Code:
				if cbh.UnitBuffTable[xunitident] ~= nil then
					local unitBuffList = nil -- lazy init for performance reasons
					for buffID, buffTable in pairs(cbh.UnitBuffTable[xunitident]) do
						-- Catches debuffs that are expired but did not trigger BuffRemove call
						if cbh.UnitBuffTable[xunitident][buffID].buffType ~= "buff" then
							if unitBuffList == nil then
								unitBuffList = buffList(unitID.id) -- lazy init
							end
							-- Sometimes the buff list isn't available so we need to prevent nil operations --
							if (unitBuffList == nil) or (not unitBuffList[buffID]) then
									local bs = {}
									bs[buffID] = "something"
--									print("removing: "..cbh.UnitBuffTable[xunitident][buffID].name)
									cbhBuffRemove(unitID.id, bs)
							end
						elseif cbh.UnitBuffTable[xunitident][buffID].duration ~= nil and cbh.UnitBuffTable[xunitident][buffID].begin ~= nil and cbh.UnitBuffTable[xunitident][buffID].remaining ~= nil and cbh.UnitBuffTable[xunitident][buffID].slot ~= nil then
...

I tested it and it appears to work properly (at least on the player character). Stuff under elseif (buffs) probably needs to be redone in the same way, but since I didn't have significant problems with it so far, I left it as is.
Solf is offline Report comment to moderator  
Reply With Quote
Old 12-29-12, 04:27 PM  
Solf

Forum posts: 0
File comments: 14
Uploads: 0
Another bug-report -- I notice that sometimes -- particularly in instances against some bosses -- debuff indication seems to get stuck (it shows debuff notification even after they are gone). Since it's been happening in instances, it's difficult to diagnose properly.

I've been trying to understand what might be wrong, I found one thing:
in main.lua line:
cbhBuffRemove(unitID, cbh.UnitBuffTable[xunitident][buffID])

it needs to be completely rewritten to something like:
local bs = {}
bs[buffID] = "something"
cbhBuffRemove(unitID.id, bs)

otherwise it simply doesn't work, because cbhBuffRemove API is different (and do I hate script languages for this kind of stuff!).


Anyway, my fix certainly fixes issue with this invocation, however I doubt it'll fix the problem I had -- there must be something else going on. In general, I dislike code that relies on counting events (+buff, -buff, etc.) -- in my experience it WILL break sooner or later. I would propose to completely rewrite debuff tracking to actively re-check unit debuffs every second or so (in addition to doing it on 'buff remove event'). That is, if there's Rift API that provides buff/debuff info for a unit.



P.S. On the subject of nameCalc -- yes, I think it is way too short, screenshot can be found here: http://www.filedropper.com/unitname
Solf is offline Report comment to moderator  
Reply With Quote
Old 12-29-12, 03:16 PM  
niemassacre
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 35
Uploads: 0
Good suggestions - I'm currently on a family vacation, but will try to address these when I get back. Some things to consider though:

nameCalc - this should be leaving enough room for the top right HoT icon as well as a raid marker icon. With that in mind, do you think it's still not showing enough?

The rest of the points are all very valid and things I'd like to address.

Thanks!


Quote:
Originally Posted by Solf
I have a request for a few features / bugfixes so that I won't need to hack the code myself every update

- Improve burnout tracking -- when unit has no remaining absorption (because it's been knocked off), then it is impossible to know whether unit still has burnout (because you can't see absorption bar color when there's no bar ). It needs something extra, I'm currently using unit name fade-out.

- Improve debuff tracking when (a) 'color whole frame when debuffed' is unchecked AND (b) 'hide health percent on frames' is checked. Currently with these options you only get tiny-tiny dot for tracking. I'm currently 'fixing' it by setting groupStatus text to " " (four spaces) instead of "" (empty string).

- nameCalc function that estimates number of characters that can be set in frame is badly off (in my case it allows way too little characters). Unit Frame Font Size is set to 13, frame width is 100.

- absorption bar really needs an option to set its width (it's far too small currently for my tastes)

- an option to fix absorb bar position regardless of whether unit has mana -- currently it shifts depending on mana bar presence which breaks (imo) units look (when there are multiple with different bar positions) and (which is worse) it is overlayed by 'taking damage' highlight if unit has no mana

- an option for CBH to be shown only in-combat would be nice


Other than that -- great addon -- thanks!
niemassacre is offline Report comment to moderator  
Reply With Quote
Old 12-27-12, 03:33 PM  
Solf

Forum posts: 0
File comments: 14
Uploads: 0
I have a request for a few features / bugfixes so that I won't need to hack the code myself every update

- Improve burnout tracking -- when unit has no remaining absorption (because it's been knocked off), then it is impossible to know whether unit still has burnout (because you can't see absorption bar color when there's no bar ). It needs something extra, I'm currently using unit name fade-out.

- Improve debuff tracking when (a) 'color whole frame when debuffed' is unchecked AND (b) 'hide health percent on frames' is checked. Currently with these options you only get tiny-tiny dot for tracking. I'm currently 'fixing' it by setting groupStatus text to " " (four spaces) instead of "" (empty string).

- nameCalc function that estimates number of characters that can be set in frame is badly off (in my case it allows way too little characters). Unit Frame Font Size is set to 13, frame width is 100.

- absorption bar really needs an option to set its width (it's far too small currently for my tastes)

- an option to fix absorb bar position regardless of whether unit has mana -- currently it shifts depending on mana bar presence which breaks (imo) units look (when there are multiple with different bar positions) and (which is worse) it is overlayed by 'taking damage' highlight if unit has no mana

- an option for CBH to be shown only in-combat would be nice


Other than that -- great addon -- thanks!
Solf is offline Report comment to moderator  
Reply With Quote
Old 12-27-12, 02:10 AM  
Yell

Forum posts: 0
File comments: 7
Uploads: 0
I'm finding the same issue every warfront I run, and a /reloadui isn't fixing it.
I've switched back to version 1.5.1 and have had no issues, just missing being able to track link of *.
Yell is offline Report comment to moderator  
Reply With Quote
Old 12-22-12, 02:22 PM  
niemassacre
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 35
Uploads: 0
Quote:
Originally Posted by hwie
hello,
i have bug with mouseover macro too (only with cbh),i play only in bg,and there is always 2/3 people who i can't heal with mouseover (the tooltip don't work too so they are not selected by the game).
sorry for my english !
So, after investigating this problem, it seems I was wrong - the add-on is already set to create the mask when you drop combat, if someone joined when you were in combat.

If possible, could you (or anyone else who has experienced this problem) try to recreate the issue and see if you can narrow down when and how this is occurring?

Thanks!
niemassacre is offline Report comment to moderator  
Reply With Quote
Old 12-20-12, 07:56 PM  
niemassacre
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 35
Uploads: 0
Re: Congratulations

Quote:
Originally Posted by Solsis00
I just wanted to thank Niemassacre for doing such a great job with keeping up this addon. I have passed full ownership to him as he continues to push this forward. I have had a lack of time to work on this as much myself, but we continue to work on this together answering questions and ideas and will do what we can to make this the best we can. Thanks everyone for your continued support, ideas, comments, and feedback. This is all very helpful and allows us the opportunity to shape this into an all-around awesome addon that is suitable for all.

Thanks again to everyone and especially thanks to Niemassacre.

~Solsis
A big thanks to Solsis for all the work he's done and continues to do on CBH. His patient tutelage is the only reason I've been able to get up to speed on the Rift API, and he continues to help me improve the add-on for you guys. So don't think this means he's off the project - I wouldn't let him quit even if he wanted to
niemassacre is offline Report comment to moderator  
Reply With Quote
Old 12-20-12, 01:07 AM  
Solsis00
Claw of Regulos
 
Solsis00's Avatar
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 139
Uploads: 1
Congratulations

I just wanted to thank Niemassacre for doing such a great job with keeping up this addon. I have passed full ownership to him as he continues to push this forward. I have had a lack of time to work on this as much myself, but we continue to work on this together answering questions and ideas and will do what we can to make this the best we can. Thanks everyone for your continued support, ideas, comments, and feedback. This is all very helpful and allows us the opportunity to shape this into an all-around awesome addon that is suitable for all.

Thanks again to everyone and especially thanks to Niemassacre.

~Solsis
Solsis00 is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: