SFS2X Objective-C API  1.7.13
iOS / macOS / tvOS
MMOItemVariable.h
1 //
2 // MMOItemVariable.h
3 // SFS2X
4 //
5 // Created by Lapo on 28/11/13.
6 // Copyright (c) 2013 A51 Integrated | http://a51integrated.com. All rights reserved.
7 //
8 
9 #import "IMMOItemVariable.h"
10 #import "SFSUserVariable.h"
11 
12 
13 /** The MMOItemVariable object represents a SmartFoxServer MMOItem Variable entity on the client.
14 
15  It 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 (AoI) of the current user in the MMORoom.
16 
17  Changes in the MMOItemVariables are dispatched via the [ISFSEvents onMMOItemVariablesUpdate] event
18 
19  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.</p>
20 
21  @see SFSUserVariable
22  @see MMORoom
23  @see MMOItem
24  @see [ISFSEvents onMMOItemVariablesUpdate]
25 
26  */
27 @interface MMOItemVariable : BaseVariable<IMMOItemVariable>
28 
29 +(id <IMMOItemVariable>) fromSFSArray:(id <ISFSArray>)sfsa;
30 
31 /**
32  @param name the name of the variable
33  @param value the variable value ( can be BOOL, Integer, Double, String, SFSObject, SFSArray )
34  @param type (optional -1) it's usually not necessary to pass this parameter as the variable value is auto-detected
35  */
36 +(id)variableWithName:(NSString *)name value:(id)value type:(NSInteger)type;
37 
38 /**
39  @param name the name of the variable
40  @param value the variable value ( can be BOOL, Integer, Double, String, SFSObject, SFSArray )
41  */
42 +(id)variableWithName:(NSString *)name value:(id)value;
43 
44 
45 @end
BaseVariable
Definition: BaseVariable.h:12
MMOItemVariable
Definition: MMOItemVariable.h:27