Skip to content

Actor Positions

bees edited this page Jan 9, 2025 · 17 revisions

Several types of combat events include the position of one of the actors. The table below uses the event types found in the Event.type field. This information may be incomplete!

type Actor with position notes
damage target Only successful attacks have a position. A hitType of "miss", "parry", "immune", or "absorbedHit" does not.
heal target Absorbed healing (type "absorbed") does not have a position.
cast source Only successful casts (type "cast") have a position, events with type "begincast" do not. MOST casts have a source position, but there are some which do not. Some casts have a target position alone, for example Anti-Magic Zone applying its absorb to players. Some casts simply have no position associated with them. This is rare.
resourcechange target Most "resourcechange" events are self-targeted and have a source position as well. There are a few abilities which target another actor (Blessing of Winter, Source of Magic, Mana Spring) and also Mindbender resource gain (Power Leech) transfers resource from the pet to the priest.
drain target These events are rare, the only drain events I'm aware of are feral druid's Ferocious Bite, and it targets the druid so the source and target are identical.

Actor positions listed are the actor which most consistently has a position. Some events as noted will also give a position to the other actor, but this is unreliable.

Events not listed don't have a position associated with them.

Structure

The location information for the source or target is stored within the sourceResources or targetResources property respectively.

Here is an example structure of the resources objects on a "damage" event:

"targetResources": {
  ...
  "x":-36000
  "y":52899
  "facing":-708
  ...
}

There are three different positional properties:

  • x: The x-coordinate of the actor's location, multiplied by 100.
  • y: The y-coordinate of the actor's location, multiplied by 100.
  • facing: The direction the actor is looking. See the facing section below for info.

Facing

The game reports the actor's facing as a value in radians, where north is 0 and values increase counter-clockwise to 2π (6.28). This is different from the typical representation where 0 would represent "east".

Warcraft Logs reports this value as a negative integer, representing the facing in radians, multiplied by 100, where north is -5π/2 and values increase clockwise to -π/2. These values are rounded up, so the total range is -7.86 to -1.58.

For graphing purposes, if you want a second x, y pair to represent a line from the actor's location along it's facing, you can use the following:

// Let D be some distance (the length of the line)
const x1 = x + D * Math.cos(facing / 100);
const y1 = y - D * Math.sin(facing / 100);

And if you want to transform the facing into an angle in the typical representation (0 is east, increasing counter-clockwise to 2π) you can use this:

const newFacing = Math.atan2(-Math.sin(facing / 100), Math.cos(facing / 100));

Or if you've already calculated the above coordinate pair,

const newFacing = Math.atan2(y1 - y, x1 - x);

Miscellany

  • A GeoGebra file showing the relationship between the different angles described in the facing section.
  • Light of the Martyr triggers a "damage" event on the paladin despite being categorized under "healing". If this event is immuned (has a hitType of "immune" or "absorbedHit") it will not have a position associated with it.
Clone this wiki locally