Overview of Rotation APIs
The Rotation APIs provide various functions to manage and optimize player rotations within the Ghost API. These APIs cover a wide range of operations, from checking spell cooldowns to managing unit health and power.
Key Points
- Efficiency: The Rotation APIs help optimize player actions and rotations, ensuring efficient gameplay.
- Flexibility: Provide a variety of functions to handle different aspects of player rotations.
- Ease of Use: Simplify the process of managing player rotations with straightforward functions.
Covered APIs
aura_stacks
Returns the number of stacks of a specific aura on a unit.
aura_duration
Returns the remaining duration of a specific aura on a unit.
face_away_from
Faces the player away from a specified location.
in_angle
Checks if a unit is within a specified angle from another unit.
valid_enemy
Checks if a unit is a valid enemy.
unit_health_percent
Returns the health percentage of a unit.
enemies
Returns a list of enemies within a specified distance.
unit_cast_percent
Returns the cast percentage of a unit's current spell.
friends
Returns a list of friendly units within a specified distance.
enemies_around_unit
Returns a list of enemies around a specified unit within a certain distance.
get_friendlies_around_unit
Returns a list of friendly units around a specified unit within a certain distance.
units_attacking_unit
Returns a list of units attacking a specified unit.
spell_cooldown
Returns the cooldown of a specified spell.
lowest_party_member
Returns the lowest health party member from a list of objects.
enemies_in_combat
Returns a list of enemies in combat within a specified range.
friends_in_party_or_raid
Returns a list of friendly units in the player's party or raid.
use_trinkets
Uses trinkets in the specified slot.
is_melee
Checks if a unit is a melee unit.
unit_skinnable
Checks if a unit is skinnable.
is_item_on_cooldown
Checks if a specified item is on cooldown.
slots_free
Returns the number of free slots in the player's inventory.
is_spell_talented
Checks if a specified spell is talented.
get_gcd
Returns the global cooldown duration.
get_totem_time_remains
Returns the remaining time for a specified totem.
unit_power
Returns the power of a unit for a specified power type.
spell_charges
Returns the number of charges for a specified spell.
spell_known
Checks if a specified spell is known.
is_spiteful
Checks if a unit is spiteful.
is_incorporeal
Checks if a unit is incorporeal.
is_afflicted
Checks if a unit is afflicted.
is_shade
Checks if a unit is a shade.
casting_or_channeling
Checks if a unit is casting or channeling a spell.
object
Returns the object associated with a unit.
specialation_id
Returns the specialization ID of the player.
centroid
Returns the centroid of a group of units within a specified distance.
Conclusion
The Rotation APIs provide essential functions that facilitate the management and optimization of player rotations, making it easier for developers to enhance gameplay efficiency and responsiveness. By leveraging these APIs, developers can create more dynamic and effective rotation strategies for players.