WowGameObject
WowGameObject
is a userdata type used by the Tinkr API to reference an internal game object. This direct object reference is the most
performant way to pass objects around.
Note
All WowGameObject
references are ephemeral, and should never be stored for use later. Use the object inside
the context of the iteration or directly after obtaining it. There is no guarantee on an objects lifetime and
they will be garbage collected as soon as possible.
WowGameObject Types
Types are defined by the following Enum:
enum ObjectType { Object, // 0 Item, Container, AzeriteEmpoweredItem, AzeriteItem, Unit, Player, ActivePlayer, GameObject, DynamicObject, Corpse, AreaTrigger, SceneObject, ConversationData, // 13};
Example
Getting a single WowGameObject
reference.
local object = Object(unitID)-- handle object
Getting an array of only WowGameObject
's of type GameObject
.
local objects = Objects(8)-- handle GameObject's