Item prototype. Items are described in detail in Items and Bundles article.

Constructor

new (s:Server, row:Dynamic)

Fields

read only attrs:ItemAttributesCore

Item attributes.

read only group:String

Item group string ID.

read only groupID:Int

Item group ID.

read only id:Int

Item ID.

read only locale:LocaleMap<{note:String, name:String}>

Item localization map.

read only name:String

Item name.

read only note:String

Item description.

read only slotID:Int

Item slot ID.

read only stringID:String

Item string ID.

read only type:String

Item type string ID.

read only typeID:Int

Item type ID.

Methods

dump (lang:String):Dynamic

Dumps item attributes into an anonymous object for client response.

Parameters:

lang

Client language. Used for adding localized item name and description.

Returns:

Anonymous object with item attributes.

getVar (name:String):Dynamic

Returns temporary item variable value. Item variables live only until the server restart.

Parameters:

name

Variable name.

Returns:

Variable value. Returns null if the variable does not exist.

setVar (name:String, val:Dynamic):Void

Sets temporary item variable. Item variables live only until the server restart.

Parameters:

name

Variable name.

val

Variable value.

dynamic updatePost ():Void

This method is called each time after item attributes were updated in database.

Static methods

static inline skipField (f:String):Void

Add this object field name to the list of skipped object fields in dump().