# Class WorldObject [-] [+]

Inherits all methods from: Object

## Methods

Data | Returns a runtime-persistent cache tied to the WorldObject. This data will remain for as long as the WorldObject exists, or until a server restart.
GetAngle | Returns the angle between this WorldObject and another WorldObject or a point.
GetAreaId | Returns the current area ID of the WorldObject
GetCellX | Returns the current cell X coordinate of the WorldObject
GetCellY | Returns the current cell X coordinate of the WorldObject
GetCreaturesInRange | Returns a table of Creature objects in sight of the WorldObject or within the given range and/or with a specific entry ID
GetDistance | Returns the distance from this WorldObject to another WorldObject, or from this WorldObject to a point in 3d space.
GetDistance2d | Returns the distance from this WorldObject to another WorldObject, or from this WorldObject to a point in 2d space.
GetExactDistance | Returns the distance from this WorldObject to another WorldObject, or from this WorldObject to a point in 3d space.
GetExactDistance2d | Returns the distance from this WorldObject to another WorldObject, or from this WorldObject to a point in 2d space.
GetGameObjectsInRange | Returns a table of GameObject objects in sight of the WorldObject or within the given range and/or with a specific entry ID
GetGridX | Returns the current grid X coordinate of the WorldObject
GetGridY | Returns the current grid Y coordinate of the WorldObject
GetInstanceId | Returns the current instance ID of the WorldObject
GetLocation | Returns the coordinates and orientation of the WorldObject
GetMap | Returns the current Map object of the WorldObject
GetMapId | Returns the current map ID of the WorldObject
GetName | Returns the name of the WorldObject
GetNearObject | Returns nearest WorldObject in sight of the WorldObject. The distance, type, entry and hostility requirements the WorldObject must match can be passed.
GetNearObjects | Returns a table of WorldObjects in sight of the WorldObject. The distance, type, entry and hostility requirements the WorldObject must match can be passed.
GetNearbyPlayers | Returns nearby players within the specified distance of the Unit
GetNearestCreature | Returns the nearest Creature object in sight of the WorldObject or within the given range and/or with a specific entry ID
GetNearestGameObject | Returns the nearest GameObject object in sight of the WorldObject or within the given range and/or with a specific entry ID
GetNearestPlayer | Returns the nearest Player object in sight of the WorldObject or within the given range
GetO | Returns the current orientation of the WorldObject
GetPhaseMask | Returns the current phase of the WorldObject
GetPlayersInRange | Returns a table of Player objects in sight of the WorldObject or within the given range
GetRelativePoint | Returns the x, y and z of a point dist away from the WorldObject.
GetX | Returns the current X coordinate of the WorldObject
GetY | Returns the current Y coordinate of the WorldObject
GetZ | Returns the current Z coordinate of the WorldObject
GetZoneId | Returns the current zone ID of the WorldObject
IsInBack | Returns true if the target is in the given arc behind the WorldObject
IsInFront | Returns true if the target is in the given arc in front of the WorldObject
IsInMap | Returns true if the WorldObjects are on the same map
IsInRange | Returns true if the target is within given range
IsInRange2d | Returns true if the point is within given range
IsInRange3d | Returns true if the point is within given range
IsWithinDist | Returns true if the target is in the given distance of the WorldObject
IsWithinDist2d | Returns true if the point is in the given distance of the WorldObject
IsWithinDist3d | Returns true if the point is in the given distance of the WorldObject
IsWithinDistInMap | Returns true if the WorldObject is on the same map and within given distance
IsWithinLoS | Returns true if the given WorldObject or coordinates are in the WorldObject's line of sight
PlayDirectSound | The WorldObject plays a sound to a Player
PlayDistanceSound | The WorldObject plays a sound to a Player
PlayMusic | The WorldObject plays music to a Player
RegisterEvent | Registers a timed event to the WorldObject When the passed function is called, the parameters `(eventId, delay, repeats, worldobject)` are passed to it. Repeats will decrease on each call if the event does not repeat indefinitely
RemoveEventById | Removes the timed event from a WorldObject by the specified event ID
RemoveEvents | Removes all timed events from a WorldObject
SendPacket | Sends a WorldPacket to Players in sight of the WorldObject.
SendPacketInRange | Sends a WorldPacket to all Player's within the range
SetPhaseMask | Sets the WorldObject's phase mask.
SetVisibleBySummonerOnly | Sets the WorldObject to be only visible by the summoner (or owner)
SpawnCreature | Spawns the creature at specified location.
SummonGameObject | Spawns a GameObject at specified location.

# Keyboard shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

# Search tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct` (or `str`), `enum`, `trait`, `typedef` (or `tdef`).

Generated on
© 2010 - 2024 Eluna Lua Engine