WoW:API UnitHealthMax: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 25: Line 25:
----
----
;''Example''
;''Example''
  local max_health = UnitHealth("player");
  local max_health = UnitHealthMax("player");
  local max_health2 = UnitHealth("target");
  local max_health2 = UnitHealthMax("target");
  ChatFrame1:AddMessage('player max health: ' .. max_health);
  ChatFrame1:AddMessage('player max health: ' .. max_health);
  ChatFrame1:AddMessage('target max health: ' .. max_health2 .. "%");
  ChatFrame1:AddMessage('target max health: ' .. max_health2 .. "%");
Line 33: Line 33:
  Prints the player's maximum health to the chat frame as
  Prints the player's maximum health to the chat frame as
   
   
  'player max health: 900' and 'taget max health: 100%'
  'player max health: 900' and 'target max health: 100%'


----
----
Anonymous user