LibMobHealth-4.0
From WowAce Wiki
| Summary | |
|---|---|
| Lib: MobHealth-4.0 | |
| Estimates a mob's health | |
| TOC | 2.4 (20400) |
| Category | Libraries |
| Author | ckknight |
| Details | |
| Version | 1.0 |
| Credits | neronix |
| Links | |
| Betas | Ace SVN Zip |
| Changelog | FishEye |
Contents |
[edit]
API Documentation
Note: This documentation is auto-generated. Please note that direct modifications may be overwritten on next autogenerate. number boolean
[edit]
:GetMaxHP("name" , level , "kind" [, difficulty] [, known])
[edit]
Arguments
- "name"
- string - name of the unit in question in the form of "Someguy", "Someguy-Some Realm"
- level
- number - level of the unit in question
- "kind"
- string - kind of unit, can be "npc", "pc", "pet"
- difficulty
- number - difficulty of the unit, only applies to "npc". see http://wowwiki.com/API_GetInstanceDifficulty for details. Can be 1, 2, or 3. 1 by default.
- known
- boolean - whether not to guess at the mob's health based on other levels of said mob.
[edit]
Returns
number or nil - the maximum health of the unit or nil if unknown
[edit]
Example
local hp = LibStub("LibMobHealth-4.0"):GetMaxHP("Young Wolf", 2)
[edit]
:GetUnitCurrentHP("unit")
[edit]
Arguments
- "unit"
- string - a unit ID
[edit]
Returns
number, boolean - the current health of the unit, whether the health is known or not
[edit]
Example
local curhp, found = LibStub("LibMobHealth-4.0"):GetUnitCurrentHP("target")
[edit]
:GetUnitHealth("unit")
[edit]
Arguments
- "unit"
- string - a unit ID
[edit]
Returns
number, number, boolean - the current health of the unit, the maximum health of the unit, whether the health is known or not
[edit]
Example
local curhp, maxhp, found = LibStub("LibMobHealth-4.0"):GetUnitHealth("target")
[edit]
:GetUnitMaxHP("unit")
[edit]
Arguments
- "unit"
- string - a unit ID
[edit]
Returns
number, boolean - the maximum health of the unit, whether the health is known or not
[edit]
Example
local maxhp, found = LibStub("LibMobHealth-4.0"):GetUnitMaxHP("target")

