This addon updates the health of player/party/raid members and pets much faster then normal by using the combat log rather then
waiting for the server to send updated health info. Normally the health of a unit doesn't update faster then at most 3 times per
second and there is often a delay between someone taking damage and the health updating. With this addon the health is updated
instantly and the health updates as many times per second as the unit is taking hits and heals.
New in version 1.1
- Added the ability for other addons to register for faster health updates.
- Added a option for the user to choose if faster updates should be done for all addons or just the addons that has registered for faster updates.
- Included a optional module that registers and handles the updates for blizzards default frames.
One of the advantages with only speeding up the health updates for addons that has registered for them is better performance,
most noticeably in fights where a lot is going on while having a damage meter running. Another is that the tainting of blizzards frames
can be avoided so that the targetOfTarget frame works (see tainting for details).
One issue you might get from this version is that addons that have not registered for faster health updates and which saves a local variable of UnitHealth(unit) won't receive faster health updates. In this case you might be better off using version 1.0.6 of the addon.
(this version of the addon has been tested in the WotLK beta and appears to be working without any issues. As a bonus the health of
ALL units are being updated faster in WotLK, including hostile mobs and players)
Tainting
In short all blizzard code starts off as 'secure' but becomes tainted if a 3rd party addon such as this messes with it. Tainted code is
unable to do some things such as showing or hiding frames while in combat. In the case of blizzards targetOfTarget frame it stops working
properly if it gets tainted since the blizzard code tries to show and hide it during combat.
This version of the addon comes with a option to enable and disable a filter. This filter when enabled will only update addons that
have registered for the faster health updates. As long as this filter is enabled it will not mess with blizzards code and will NOT
cause tainting issues. If this filter is disabled however the addon will attempt to speed up the health updates of any and all addons
and in the process it will taint blizzards code causing issues with blizzards unit frames such as the targetOfTarget frame.
How to avoid taint
Be sure the filter is enabled when you log in, if it's disabled at any time while playing blizzards code will get tainted, the only
way of removing the taint is enabling the filter and reloading the UI ( /script ReloadUI() ).
Slash commands
Type '/instantHealth list' to see a list of addons that has registered for faster health updates. If you enable the filter these will
be the only addons receiving faster health updates. If some addons are not on the list that you wish should receive faster updates it
might be better to have the filter disabled.
Type '/instantHealth filter enable' to enable the filter.
Type '/instantHealth filter disable' to disable the filter.
About the server
- The server doesn't send health updates for a unit faster then once every 0.3 seconds, often it's slower.
- Combat log messages are sent as soon as the event happens making damage and healing show at the client before the affected units health is updated.
- There are strong indications that the server not just sends health updates a bit slow, but that it in fact calculates the health at intervals of roughly 0.3 seconds.
- It is possible, sometimes, to get in a heal on someone with negative health if the heal lands almost exactly after the health drops to negative (the reaction time plus latency needs to be around 0.3 seconds or less).
This addon in itself uses very little system resources (up to around 100 kb of memory in 25 man raids), it does however make all
addons listening for the UNIT_HEALTH event to do a lot more work (such as unit frames, damage meters and threat meters), depending
on what other addons you have installed and the cpu of your computer you may notice anywhere from no performance impact at all to a
fairly large performance impact from using this addon.
For addon authors
I have tried to do the API as simple as possible and documentation as clear as possible (still messy?), if you have comments on how I can change or improve either feel free to leave a comment/message here
or send a e-mail to meloeth@hotmail.com.
IH_UnitHealth(unitID)
Get the current health of unitID.
args
unitID - any valid unitID
returns
health - integer. Current health of the unit, can be negative. Returns 0 if the unit doesn't exist.
IH_Register(key, method [, extra])
Registers a method to be called when a units health changes. The unitID of the unit which health changed will be passed as the first argument.
args
key - must be of type String, must be unique. This is what the user will see when they list addons that has registered for faster health updates. It's recommended that you use your addons name as key!
method - the function to be called
[extra] - type boolean. Set to false or ignore if the function should only be notified of the same unitIDs you would expect if you registered for UNIT_HEALTH
events. Set to true if the function should be notified of ANY valid unitID such as 'targettarget', 'raid1pettarget' or even names such as 'Imatank'
(if that was the name of someone in the raid/party). Notice that Instant_Health has no way of tracking these extra unitIDs by itself. To active a unitID
it has to be passed to IH_UnitHealth(unitID) after which Instant_Health will remember it until the GUID targeted by the unitID changes. Then it needs to be passed
again to trigger the unitID to be sent again. So it's up to you to call IH_UnitHealth(unitID) whenever the unitID starts referring to someone else (like when the
ToT changes you need to pass 'targettarget' to IH_UnitHealth(unitID) if you want to make sure your addon is notified of the ToTs health changing).
Example
a easy way to modify a addon for faster health updates. Might not be this easy with every addon and might not be the most optimal way with some
addons, but just to give you a idea of how you can do it. The addon in this example is modified so that if Instant_Health is not available it works like normal
and if Instant_Health is available it registers for the faster health updates and makes the function that is registered for the updates simply call the original
function that handles the updates.
-- create a local variable pointing to the function UnitHealth(unit)
local UnitHealth = UnitHealth
-- the function that will be called by Instant_Health
function PixieUnitHealth(unitID)
-- the function you already use for updating the health
PF_event.UNIT_HEALTH(unitID)
end
-- your function listening for ADDON_LOADED events
function PF_event.ADDON_LOADED(arg1)
if arg1 == "PixieFrames" then
...
...
-- first check if these functions exists!
if IH_Register and IH_UnitHealth then
-- register function to be called when a units health changes
IH_Register("PixieCore", PixieUnitHealth)
-- change the local variable to point to IH_UnitHealth(unitID)
-- instead (be sure you have saved a local variable of UnitHealth
-- and hat you are changing the local variable!)
UnitHealth = IH_UnitHealth
-- unregister the UNIT_HEALTH event so your function doesn't get
-- called more often then needed
PF_eventFrame:UnregisterEvent("UNIT_HEALTH")
end
end
end
IH_Unregister(key)
Unregister health change notifications.
args
key - type String. (the exact same key that was used to register)
returns
True if the function related to this key got unregistered, false otherwise.
IH_IterateRegister()
Returns a iterator over keys used to register.
Example
for key, method in IH_IterateRegister() do
DEFAULT_CHAT_FRAME:AddMessage(key)
end
Installation Guide
- Exit "World of Warcraft" completely
- Download the mod you want to install
- Make a folder on your desktop called "My Mods"
- Save the .zip/.rar files to this folder.
- If, when you try to download the file, it automatically "opens" it... you need to RIGHT click on the link and "save as..." or "Save Target As".
- Extract the file - commonly known as 'unzipping'
Do this ONE FILE AT A TIME!
- Windows
- Windows XP has a built in ZIP extractor. Double click on the file to open it, inside should be the file or folders needed. Copy these outside to the "My Mods" folder.
- WinRAR: Right click the file, select "Extract Here"
- WinZip: You MUST make sure the option to "Use Folder Names" is CHECKED or it will just extract the files and not make the proper folders how the Authors designed
- Mac Users
- StuffitExpander: Double click the archive to extract it to a folder in the current directory.
- Verify your WoW Installation Path
That is where you are running WoW from and THAT is where you need to install your mods.
- Move to the Addon folder
- Open your World of Warcraft folder. (default is C:\Program Files\World of Warcraft\)
- Go into the "Interface" folder.
- Go into the "AddOns" folder.
- In a new window, open the "My Mods" folder.
- The "My Mods" folder should have the "Addonname" folder in it.
- Move the "Addonname" folder into the "AddOns" folder
- Start World of Warcraft
- Make sure AddOns are installed
- Log in
- At the Character Select screen, look in lower left corner for the "addons" button.
- If button is there: make sure all the mods you installed are listed and make sure "load out of date addons" is checked.
- If the button is NOT there: means you did not install the addons properly. Look at the above screenshots. Try repeating the steps or getting someone who knows more about computers than you do to help.
Translations
When you download a mod, please be sure that the mod is compatible with your translation of wow. Some mods only work on the US versions, while some only work on some of the various European versions. These variations are called "Localizations".
TOC Numbers (Out of Date Mods)
When Blizzard patches WoW, they change the Interface number. This means that all mods will be "out of date" unless or until the author releases a new version for that interface. Some people go into the .toc files and update the numbers themselves, but this is STRONGLY advised against as it will cause problems locating possible incompatibilities addons. When you log into WoW after a patch, you DO NOT have to delete your interface directory. All you have to do is simply tell WoW to ignore the interface numbers and load all the mods anyway. All you have to do is, while at the "character select" screen, look in the lower left corner and click on the "addons" button. A window will pop up listing all your installed mods.
If you look in the upper left corner of that window there should be a box that says "Load Out of Date AddOns". You want to CHECK this box. Now simply go into WoW normally and all your mods should load. As of the 1.9 patch, you will have to do this after EVERY patch/update that Blizzard posts! If you encounter any problems with a mod after a patch, please be sure to let the author of the mod know so they can fix it.
See also: About "Out Of Date AddOns"
Mac Support
WoW addons are not platformed based. As such, they can be used on either Mac or PC. You can extract both .zip and .rar files on a Mac using StuffitExpander.
Directory Structure
World of Warcraft
|_ Interface
|_AddOns
|_*AddonName*
|_ *AddonName*.toc
|_ *AddonName*.xml
|_ *AddonName*.lua
|_ (possibly others as well)...