WowAddons

World of Warcraft Forever API · C_DamageMeter.md, for your AI

C_DamageMeter

8 functions, 3 events, 6 tables, as Blizzard documents them for Forever 1.60.1 (70959).

Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.

Functions

C_DamageMeter.GetAvailableCombatSessions

availableSessions = C_DamageMeter.GetAvailableCombatSessions()

Returns a list of combat sessions currently being tracked.

Returns

availableSessionsDamageMeterAvailableCombatSession[]

C_DamageMeter.GetCombatSessionFromID

session = C_DamageMeter.GetCombatSessionFromID(sessionID, type)

Returns the data for the player's combat session with the specified ID.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

sessionIDnumber
typeDamageMeterType

Returns

sessionDamageMeterCombatSession

C_DamageMeter.GetCombatSessionFromType

session = C_DamageMeter.GetCombatSessionFromType(sessionType, type)

Returns the data for the player's current combat session.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

sessionTypeDamageMeterSessionType
typeDamageMeterType

Returns

sessionDamageMeterCombatSession

C_DamageMeter.GetCombatSessionSourceFromID

sessionSource = C_DamageMeter.GetCombatSessionSourceFromID(sessionID, type, [sourceGUID], [sourceCreatureID])

Returns the data for a single source (unit) in the player's current combat session with the specified ID.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

sessionIDnumber
typeDamageMeterType
sourceGUIDWOWGUID may be nil
sourceCreatureIDnumber may be nil

Returns

sessionSourceDamageMeterCombatSessionSource

C_DamageMeter.GetCombatSessionSourceFromType

sessionSource = C_DamageMeter.GetCombatSessionSourceFromType(sessionType, type, [sourceGUID], [sourceCreatureID])

Returns the data for a single source (unit) in the player's current combat session.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

sessionTypeDamageMeterSessionType
typeDamageMeterType
sourceGUIDWOWGUID may be nil
sourceCreatureIDnumber may be nil

Returns

sessionSourceDamageMeterCombatSessionSource

C_DamageMeter.GetSessionDurationSeconds

durationSeconds = C_DamageMeter.GetSessionDurationSeconds(sessionType)

Returns the amount of time a combat session has lasted

Arguments

sessionTypeDamageMeterSessionType

Returns

durationSecondsnumber may be nil

C_DamageMeter.IsDamageMeterAvailable

isAvailable, failureReason = C_DamageMeter.IsDamageMeterAvailable()

Returns whether the player can enable and use the Damage Meter.

Returns

isAvailablebool
failureReasonstring

C_DamageMeter.ResetAllCombatSessions

C_DamageMeter.ResetAllCombatSessions()

Clears the data for all the player's combat sessions.

Events

DAMAGE_METER_COMBAT_SESSION_UPDATED

typeDamageMeterType
sessionIDnumber

DAMAGE_METER_CURRENT_SESSION_UPDATED

No payload.

DAMAGE_METER_RESET

No payload.

Tables

DamageMeterAvailableCombatSession structure

Data for a combat session currently being tracked.

sessionIDnumber
namecstring
durationSecondsnumber may be nil

DamageMeterCombatSession structure

Aggregated data for all sources (units) in a damage meter combat session.

combatSourcesDamageMeterCombatSource[]
maxAmountnumber default 0
totalAmountnumber default 0
durationSecondsnumber may be nil

DamageMeterCombatSessionSource structure

Data for a single source (unit) in a combat session.

combatSpellsDamageMeterCombatSpell[]
maxAmountnumber default 0
totalAmountnumber default 0

DamageMeterCombatSource structure

Aggregated data for a single source (unit) in a damage meter combat session.

sourceGUIDWOWGUID may be nil
sourceCreatureIDnumber may be nil
namecstring
classFilenamecstring
specIconIDfileID
totalAmountnumber
amountPerSecondnumber
isLocalPlayerbool
deathRecapIDnumber
deathTimeSecondsnumber
classificationcstring
sourceDisplayTypeDamageMeterSourceDisplayType
factionGroupcstring may be nil

DamageMeterCombatSpell structure

Aggregated data for all spells of the same ID cast by a single source (unit) in a combat session.

spellIDnumber
totalAmountnumber
amountPerSecondnumber
creatureNamecstring
overkillAmountnumber
isAvoidablebool
isDeadlybool
combatSpellDetailsDamageMeterCombatSpellUnitDetails

DamageMeterCombatSpellUnitDetails structure

Amount for a single target for all casts of the same spellID by a single source (unit) in a combat session.

unitNamecstring
unitClassFilenamecstring
classificationcstring
isPetbool
isMobbool
amountnumber
specIconIDfileID

It takes WowAddons

Free, for Windows, macOS and Linux: it puts the addon in your game in one click and keeps it up to date. Open it once, then press Install again.

WowAddons runs on your computer: open wowaddons.gg there.

Download for Windows