Class SFS2X.Entities.Variables.MMOItemVariable

The MMOItem Variable entity representation on the client.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a new MMOItemVariable instance.

Field Summary

Method Summary

Class Detail

SFS2X.Entities.Variables.MMOItemVariable(name, value, type)
Creates a new MMOItemVariable instance.

An MMOItemVariable is a custom value attached to an MMOItem object that gets automatically synchronized between client and server on every change, provided that the MMOItem is inside the Area of Interest of the current user in a MMORoom.

NOTE: MMOItem Variables behave exactly like User Variables and support the same data types, but they can be created, updated and deleted on the server side only.

Parameters:
{String} name
The name of the MMOItem Variable.
{*} value
The value of the MMOItem Variable; valid data types are: Boolean, Number, String, Object, Array. The value can also be null.
{Number} type Optional, Default: -1
The type id of the MMOItem Variable among those available in the VariableType class. Usually it is not necessary to pass this parameter, as the type is auto-detected from the value.
See also:
SFS2X.Entities.Variables.VariableType
SFS2X.Entities.MMOItem
SFS2X.Entities.MMORoom

Method Detail

  • {String} toString()
    Returns a string that contains the MMOItem Variable name, type and value.
    Returns:
    {String} The string representation of the MMOItemVariable object.