World of Warcraft

80
View All Posts by This User Toggle Ignore / Unignore This User
  • Twisting Nether
  • 0. Making Grid show the Unit's Current Health   03/17/2009 01:32:08 AM PDT
quote reply
Hi guys,

I'm trying to make Grid show the Unit's Current Health in one of the CenterText Indicators. There's a Status called "Unit Health" but when I use it, it displays the health as a deficit, which isn't what I want. I want to see the unit's absolute current health.

My use case is, for example, to be able to heal people who have 5000 health first so that if Bad Things Happen, no one will die from AOE damage or anything. So that's why I'd like to be able to see their absolute current health.

How can I set up Grid to do this?

Thanks.

P.S. One of the change log entries in Grid reads as follows:

------------------------------------------------------------------------

r699 | pastamancer | 2008-04-07 23:32:03 +0000 (Mon, 07 Apr 2008) | 3 lines
Changed paths:
M /tmp/trunk/Grid/GridStatusHealth.lua

Grid:
- GridStatusHealth: unit_health provides the same text as unit_healthDeficit.


I hope that there's still some way for me to make Grid do what I want.
80
View All Posts by This User Toggle Ignore / Unignore This User
  • 1. Re: Making Grid show the Unit's Current Healt   03/17/2009 02:27:19 AM PDT
quote reply
Glancing at the options and playing around a bit, it seems like you can't. However, if you're adventurous enough to edit the code, one line should do it. Open GridStatusHealth.lua in Notepad or some other plain text editor, then find
local deficit = max - cur

replace with
local deficit = cur

and that should work.
80
View All Posts by This User Toggle Ignore / Unignore This User
  • Twisting Nether
  • 2. Re: Making Grid show the Unit's Current Healt   03/18/2009 12:25:12 AM PDT
quote reply
I tried that, unfortunately it made it so that both the Deficit health and the Current health fields displayed the current health. It seems the same code is linked into both health texts.

I don't know how to program WoW Addons but I know enough about programming to try a few things...

Anyone know why this was changed in the first place?


UPDATE: I hacked grid and added a new function that displays the Current Health text, and changed the SendStatusGained call to set the unit_health string appropriately.

[ Post edited by Eponina ]

Forum Nav : Jump To This Forum
Blizzard Entertainment