WoW:API UnitHealthMax: Difference between revisions

m
Updated with new information: This function returns the actual max health of any unit.
(Factual correction)
m (Updated with new information: This function returns the actual max health of any unit.)
Line 13: Line 13:
Print the maximum health of ''player'' and ''target'' units to the chat window:
Print the maximum health of ''player'' and ''target'' units to the chat window:
  ChatFrame1:AddMessage('Player max health: ' .. UnitHealthMax("player") .. " HP");
  ChatFrame1:AddMessage('Player max health: ' .. UnitHealthMax("player") .. " HP");
  ChatFrame1:AddMessage('Target max health: ' .. UnitHealthMax("target").. "%");
  ChatFrame1:AddMessage('Target max health: ' .. UnitHealthMax("target") .. " HP");
Anonymous user