WorldObject
Represents an ingame weenie object. All selectable (and some non-selectable) objects are weenies.
Fields:
AllItemIds number[]
List of weenie ids contained with this item. It also returns item ids contained within containers within this container.
AllItems WorldObject[]
List of weenies contained with this item. It also returns items contained within containers within this container.
AmmoType AmmoType
The type of ammo this is, only applicable if its projectile ammo todo: what defines something being projectile ammo?
Burden number
Burden
ClassId number
Weenie ClassId
ClothingPriority CoverageMask
Equipment coverage priority
CombatMode CombatMode
The combat mode the weenie is in, only applies to creatures.
Container WorldObject
The container weenie this weenie is inside. null if none
ContainerId number
the container id this is inside, 0 if none.
ContainerIds number[]
child container ids, including foci (assuming this item is a container)
ContainerProperties ContainerProperties
Type of container
Containers WorldObject[]
List of child container weenies, including foci
CooldownTimeoutMilliseconds number
The number of milliseconds until the shared cooldown for this item is expired, or 0 if it is not on cooldown.
CreateFlags WeenieHeaderFlag
Weenie creation header flags. These are flags for if data fields are present during a weenie description
CreateFlags2 WeenieHeaderFlag2
More weenie creation header flags. These are flags for if data fields are present during a weenie description
CurrentWieldedLocation EquipMask
If this item is wielded, the slots it currently covers
EnchantmentIds LayeredSpellId[]
List of layered spell ids of active enchantments this item has.
Equipment WorldObject[]
List of weenies equipped to this weenie.
EquipmentIds number[]
item ids equipped to this weenie
HasAppraisalData boolean
Wether or not this weenie has appraisal data from the server.
IconEffects IconHighlight
Icon effects, like border highlights
Id number
The id of this weenie object
Items WorldObject[]
child item weenies, excluding containers // equipped (assuming this item is a container) (not recursive, meaning it doesn't include child container items, just non-container items contained directly in this container)
LastAccessTime DateTime
Last time this weenie received data from the server
LastAppraisalResponse DateTime
The last time we got appraisal data from the server
Material MaterialType
Material
Name string
The name of this weenie object.
ObjectClass ObjectClass
ObjectClass, for decal compatibility / familiarity (also a bit more granular than ObjectType)
ObjectDescription ObjectDescription
ObjectDescriptionFlag ObjectDescriptionFlag
Object description
ObjectType ObjectType
Type of object this is
PhysicsDesc PhysicsDescription
PhysicsState PhysicsState
Physics State
RadarBehavior RadarBehavior
Radar Behavior
RadarColor RadarColor
Radar blip color
ServerPosition Position
Last position the server reported this weenie at, only applies to items in the landscape
SpellId number
The spell id of this item, like for built-in wand spells
SpellIds LayeredSpellId[]
List of layered spell ids this item has. (this is not active spells, these are spells that the item contains)
Stance MotionStance
The stance the weenie is in, only applies to creatures.
TargetType ObjectType
Type of items that this can be used on?
ValidWieldedLocations EquipMask
The valid locations this item can be wielded to
WeenieClassId number
The class id for this weenie
Wielder WorldObject
The weenie wielding this weenie, null if none
WielderId number
the id of the object wielding this item, 0 if none
Events:
OnDestroyed ObjectReleasedEventArgs
Fired when this WorldObject is being destroyed, like when the client forgets about it.
OnPositionChanged ServerPositionChangedEventArgs
Fired when this weenie's position is updated by the server
Methods:
AddToSalvage(options?: ActionOptions = nil, callback?: fun(SalvageAddAction) : nil = nil) : SalvageAddAction
Adds a salvageable weenie to the salvage panel.
Name | Type | Default | Summary |
options | ActionOptions | nil | Action options |
callback | fun(SalvageAddAction) : nil | nil | Called when the action completes |
AddToTrade(options?: ActionOptions = nil, callback?: fun(TradeAddAction) : nil = nil) : TradeAddAction
Adds the specified object id to your side of the trade window
Name | Type | Default | Summary |
options | ActionOptions | nil | Action options |
callback | fun(TradeAddAction) : nil | nil | Called when the action completes |
Appraise(options?: ActionOptions = nil, callback?: fun(ObjectAppraiseAction) : nil = nil) : ObjectAppraiseAction
Request assessment data for a n object
Name | Type | Default | Summary |
options | ActionOptions | nil | Action options |
callback | fun(ObjectAppraiseAction) : nil | nil | Called when the action completes |
DistanceTo2D(other: WorldObject) : number
Get the 2d distance from one weenie to another weenie
Name | Type | Default | Summary |
other | WorldObject | The weenie to get the distance to from this one |
DistanceTo2d(otherId: number) : number
Get the 2d distance from one weenie to another weenie Id
Name | Type | Default | Summary |
otherId | number | The id of the other weenie to get the distance to from this one |