PQRotation (PQR) provides a small set of functions to provide more functionality to profile writers than would normally be available by simple WoW API calls. Below is a list of all current functions provided by PQR.
საThese global variables can be used/changed to suit your needs. Note that most of these will change back to their default values when a new rotation is started to ensure that a profile is running the way it's creator intended.
General PQR FunctionsEdit
PQR_AddToSpellDelayList(spellID, itemID, secondsToDelay)Edit
NOTE: DelayList is cleared on rotation change.
Returns true if the player is currently casting or channeling the indicated spell. Returns false otherwise.
Note that the spell ID is simply translated to the spell name, and the current casting state is then compared to the spell name. If two spells share the same name, but different IDs, this will return true if the player is casting either spell.
Returns true if we have received a "Must be behind the target." red message in the last 3 seconds. Returns false otherwise. An example of using this would be a feral druid where you must be behind the target to shred.
if PQR_NotBehindTarget() == false then
if PQR_NotBehindTarget() then
Returns true if the player has been moving for X seconds. Returns false otherwise.
Note that by default this function will return false once the player has been stationary for 1 second. This reset timer can be controlled by assigning a value to the variable "PQR_ResetMovementTime." For example, to change the reset time to 0.5 seconds, you would use "PQR_ResetMovementTime = 0.5" somewhere near the top of your rotation. This variable is global, and will effect all instances of PQR_IsMoving() in your rotation. Note that changing from one rotation to another will reset this value to 1.0.
Returns true if the specified unit has been out of sight in the last X seconds (default 3.) Returns false otherwise.
Note that the unit is converted to UnitName, and the check is based on unit name, so if 2 mobs both share the same name this will return the same value for either of them regardless of if one is out of sight and the other is not.
UnitBuffID(unit, spellID, filter) and UnitDebuffID(unit, spellID, filter)Edit
name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId
Note that this function is simply a version of UnitBuff() and UnitDebuff() that accept a spell ID instead of a spell name. This is to ease the pains of multiple language localizations.
Filter: This parameter can be any of "HELPFUL", "HARMFUL", "PLAYER", "RAID", "CANCELABLE", "NOT_CANCELABLE". You can also specify several filters separated by a | or space character to chain multiple filters together (e.g. "HELPFUL|RAID" or "HELPFUL RAID" == helpful buffs that you can cast on your raid). You can, for example, use the "PLAYER" filter when checking to make sure the unit has your Bane of Agony on it, and not another Warlocks.
An example, UnitDebuff("target", "Forbearance") would only work on an english client. On a spanish client, you would need to use UnitDebuff("target", "Abstinencia") to check for a Forbearance debuff. To simplify this, you can now use: UnitDebuff("target", 25771) (which is the spell ID for Forbearance) to check for the debuff and be guarenteed it will work on all clients.
Note that the spell ID you provide will simply be translated into the spell name and used in a UnitBuff or Debuff function. If two spells share the same name, but different spell IDs, they will both return true.