Class WorldObject [-] [+]

Represents a WorldObject in the game world.

Inherits all methods from: Object

Methods

GetAngle Returns the angle between this WorldObject and another WorldObject or a point.
GetAreaId Returns the current area ID 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
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.
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.
GetTransport Returns the transport the WorldObject is on, or nil if not on a transport
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.
SetPhaseMask Sets the WorldObject's phase mask.
SpawnCreature Spawns the creature at specified location.
SummonGameObject Spawns a GameObject at specified location.