X-Perl UnitFrames

243 - Health format: maxhp (-deficithp)

As a healer I found myself mostly interested in people's deficit hp. But in general, I also want to see people's max hp.
With this patch, selecting healer mode will use the following format on the health bars (applies to all unitframes with healer mode):

34135 (-4298)

or, if the unit is full health:

34135

It could be added as a whole different (additional) mode, but that would require a lot more changes.

XPerl\XPerl.lua
Line 722, REPLACE:

					hbt:SetFormattedText("%d", health)


WITH:

					if (abs(health) > 0) then
						hbt:SetFormattedText("%d |c00FF4040%d|r", Max, health)
					else
						hbt:SetFormattedText("%d", Max)
					end

XPerl_RaidFrames\XPerl_Raid.lua
Line 518, REPLACE

				self.statsFrame.healthBar.text:SetText(-(healthmax - health))


WITH:

				if health < healthmax then
					self.statsFrame.healthBar.text:SetFormattedText("%d |c00FF4040%d|r", healthmax, health - healthmax)
				else
					self.statsFrame.healthBar.text:SetFormattedText("%d", healthmax)
				end
User When Change
Zeksie Sun, 23 Aug 2009 02:09:46 Changed status from New to Waiting
Dracula Fri, 21 Aug 2009 18:35:17 Create

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of Zeksie Zeksie Sun, 23 Aug 2009 02:09:41

    Would have to have a think about the colour. If they're at say 90% hp, you're gonna get red text on a green back. Which is kinda aweful.

    Also, doesn't the health values clip out on the raid frames with this format? There's not a whole lot of room in those.

  • 1 comment

Facts

Last updated on
23 Aug 2009
Reported on
21 Aug 2009
Status
Waiting - Waiting for more information.
Type
Patch - Source code patch for review
Priority
Medium - Normal priority.

Reported by

Possible assignees