|
SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
|
An active non-player entity inside an MMORoom. More...
#include <MMOItem.h>
Public Member Functions | |
| int32_t | getId () const |
| std::shared_ptr< MMOItemVariable > | getVariable (const std::string &name) const |
| Retrieves a Variable of this item from its name. | |
| std::vector< std::shared_ptr< MMOItemVariable > > | getVariables () const |
| bool | containsVariable (const std::string &name) const |
| std::optional< Vec3D > | getAOIEntryPoint () const |
| The point within the user's area of interest where this item "appeared" with the last proximity list update. | |
| std::string | toString () const |
An active non-player entity inside an MMORoom.
MMOItems can represent bonuses, triggers, bullets, or any other non-player entity handled with the MMORoom's rules of visibility: whenever one falls within the area of interest of a user, its presence is notified to that user with a event::SFSEvent::PROXIMITY_LIST_UPDATE event.
Items are identified by a unique id and can carry any number of MMOItem Variables holding custom data.
NOTE: MMOItems can be created in a server side Extension only; client side creation is not allowed.
|
inline |
| std::shared_ptr< MMOItemVariable > sfs3::entities::MMOItem::getVariable | ( | const std::string & | name | ) | const |
| std::vector< std::shared_ptr< MMOItemVariable > > sfs3::entities::MMOItem::getVariables | ( | ) | const |
| bool sfs3::entities::MMOItem::containsVariable | ( | const std::string & | name | ) | const |
|
inline |
The point within the user's area of interest where this item "appeared" with the last proximity list update.
It is set only when the MMORoom is configured to send the entry points; otherwise the optional stays empty.
| std::string sfs3::entities::MMOItem::toString | ( | ) | const |