ObjectId

Returns the ID of a WowGameObject.

ObjectId(--[[(1)]]objectReference) : id | false
  1. See Object Reference for more information on possible values.

Example

Get the targets id.

local id = ObjectId('target')

Do something with the ids of all objects.

for i, object in ipairs(Objects()) do
local id = ObjectId(object)
-- do something with id
end