SmartFoxServer 2X C++ API
Sfs2X::Entities::MMOItem Class Reference

An MMOItem object represents an active non-player entity inside an MMORoom. More...

#include <MMOItem.h>

Inheritance diagram for Sfs2X::Entities::MMOItem:
Sfs2X::Entities::IMMOItem

Public Member Functions

 MMOItem (long int id)
 <exclude>
 
virtual long int Id ()
 Indicates the id of this item.
 
virtual boost::shared_ptr< vector< boost::shared_ptr< IMMOItemVariable > > > GetVariables ()
 Retrieves all the MMOItem Variables of this item.
 
virtual boost::shared_ptr< IMMOItemVariableGetVariable (string name)
 Retrieves an MMOItem Variable from its name.
 
virtual void SetVariable (boost::shared_ptr< IMMOItemVariable > variable)
 <exclude>
 
virtual void SetVariables (boost::shared_ptr< vector< boost::shared_ptr< IMMOItemVariable > > > variables)
 <exclude>
 
virtual bool ContainsVariable (string name)
 Indicates whether this item has the specified MMOItem Variable set or not.
 
virtual boost::shared_ptr< Vec3DAOIEntryPoint ()
 Returns the entry point of this item in the current user's AoI.
 

Static Public Member Functions

static boost::shared_ptr< IMMOItemFromSFSArray (boost::shared_ptr< ISFSArray > encodedItem)
 <exclude>
 

Detailed Description

An MMOItem object represents an active non-player entity inside an MMORoom.

MMOItems can be used to represent bonuses, triggers, bullets, etc, or any other non-player entity that will be handled using the MMORoom's rules of visibility. This means that whenever one or more MMOItems fall within the Area of Interest of a user, their presence will be notified to that user by means of the PROXIMITY_LIST_UPDATE event.

MMOItems are identified by a unique ID and can have one or more MMOItem Variables associated to store custom data.

NOTE: MMOItems can be created in a server side Extension only; client side creation is not allowed.

See also
Sfs2X.Entities.MMORoom, Sfs2X.Entities.Variables.MMOItemVariable