---
# System prepended metadata

title: Item_Method
tags: [API]

---

---
title: 'Item_Method'
disqus: hackmd
tags: 'API'
---

## **Method**
## **GetItemInstance**
***• public static void GetItemInstance(CloudGame game, OnCallCompletionWithData cb, object token)***   

Obtain the objects the player owns in that game. Also called an object instance.   

| parameter | note  |
|:---- |:---------- |
| game | the game logged in |

Types of back-sendings:
`void cb(int code, object obj, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the obtaining succeeds                 |
| not 0   | the obtaining fails, the code is the error code, and obj is meaningless and negligible |

obj which is cast as List<Hashtable>, stores the instance of the object the player owns.
The object’s data is recorded by Hashtable, the Keys and Values in it are:


| Key    | Value                                                                                                                               |
|:------ |:----------------------------------------------------------------------------------------------------------------------------------- |
| iguid  | the object’s iguid          |
| name   | the object’s name     |
| id     | the id of the object’s instance  |
| now    | the system’s time in the current server, and the formatting is yyyy/mm/dd hh:mm:ss     |
| expire | the time the object instance expires, and the formatting is yyyy/mm/dd hh:mm:ss  |
| attr   | The attribute data is key = value. The Key is already designated by the developers when setting the object’s category backstage. Except for the preset value during defining, the value can be changed. |
   

Since there can be more than one attribute, the element is saved as Hashtable, and the Keys are:
    
| Key   | Value                |
| ----- |:-------------------- |
| name  | attribute’s name, which is the Key|
| value | attribute’s value   |
| stamp | the time this attribute is written in   |
       
       
If the object is not set with an attribute, Hashtable[“attr”] = null   
       
The following example demonstrates how to obtain elements one by one:   

```
C#
void CB_GetItemInstance(int code, object obj, object token)
{
	if (code == 0)
	{
		List<Hashtable> list = obj as List<Hashtable>;

		for (int i = 0; i < list.Count; i++)
		{
			Debug.Log("iguid : " + list[i]["iguid"].ToString());
			Debug.Log("id : " + list[i]["id"].ToString());
			Debug.Log("name : " + list[i]["name"].ToString());
			Debug.Log("now : " + list[i]["now"].ToString());
			Debug.Log("expire : " + list[i]["expire"].ToString());

			Hashtable btb = list[i]["attr"] as Hashtable;
			foreach (DictionaryEntry itemm in btb)
			{
				Hashtable attr = itemm.Value as Hashtable;
				Debug.Log(attr["name"].ToString() + " / " + attr["value"].ToString());
			}
		}
	}
	else
	{
		Debug.Log("GetItemInstance Fail! Code : " + code);
	}
}
                                   
```
 
***• public static void GetItemInstance(CloudGame game, string iguid, OnCallCompletionWithData cb, object token)***   
                               
Obtain the objects that player owns their iguids in that game. Also called an object instance. 
| parameter | note  |
|:---- |:---------- |
| game | the game logged in |

Types of back-sendings:
`void cb(int code, object obj, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the obtaining succeeds                 |
| not 0   | the obtaining fails, the code is the error code, and obj is meaningless and negligible |

obj which is cast as List<Hashtable>, stores the instance of the object the player owns. The object’s data is recorded by Hashtable, the Keys and Values in it are:


| Key    | Value                                                                                                                               |
|:------ |:----------------------------------------------------------------------------------------------------------------------------------- |
| iguid  | the object’s iguid          |
| name   | the object’s name     |
| id     | the id of the object’s instance  |
| now    | the system’s time in the current server, and the formatting is yyyy/mm/dd hh:mm:ss     |
| expire | the time the object instance expires, and the formatting is yyyy/mm/dd hh:mm:ss  |
| attr   | The attribute data is key = value. The Key is already designated by the developers when setting the object’s category backstage. Except for the preset value during defining, the value can be changed. |
   

Since there can be more than one attribute, the element is saved as Hashtable, and the Keys are:
    
| Key   | Value                |
| ----- |:-------------------- |
| name  | attribute’s name, which is the Key|
| value | attribute’s value   |
| stamp | the time this attribute is written in   |
                                                                     
| parameter | note  |
|:---- |:---------- |
| game | the game logged in |
| iguid | the iguid of the object one designates to obtain |
             
Types of back-sendings:
`void cb(int code, object obj, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the obtaining succeeds                 |
| not 0   | the obtaining fails, the code is the error code, and obj is meaningless and negligible |
           
obj which is cast as List<Hashtable>, stores the instance of the object the player owns. 
The object’s data is recorded by Hashtable, the Keys and Values in it are:      

| Key    | Value                                                                                                                               |
|:------ |:----------------------------------------------------------------------------------------------------------------------------------- |
| iguid  | the object’s iguid          |
| name   | the object’s name     |
| id     | the id of the object’s instance  |
| now    | the system’s time in the current server, and the formatting is yyyy/mm/dd hh:mm:ss     |
| expire | the time the object instance expires, and the formatting is yyyy/mm/dd hh:mm:ss  |
| attr   | The attribute data is key = value. The Key is already designated by the developers when setting the object’s category backstage. Except for the preset value during defining, the value can be changed. |

Since there can be more than one attribute, the elements are cast as Hashtables. The Keys and Values them it are:
    
| Key   | Value                |
| ----- |:-------------------- |
| name  | attribute’s name, which is the Key|
| value | attribute’s value   |
| stamp | the time this attribute is written in   |
      
If no attribute is set for this object, Hashtable[“attr”] = null. 
       
***• public static void GetItemInstance(CloudGame game, string iguid, bool autonew, OnCallCompletionWithData cb, object token)***
    
Obtain the objects that player owns their iguids in that game. Also called an object instance.
    
| parameter | note  |
|:---- |:---------- |
| game | the game logged in |
| iguid | the iguid of the object one designates to obtain |
| autonew | true: When the player does not have this object’s instance, send it back after automatically adding it. |
          
Types of back-sendings:
`void cb(int code, object obj, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the obtaining succeeds                 |
| not 0   | the obtaining fails, the code is the error code, and obj is meaningless and negligible |
 
obj which is cast as List<Hashtable>, stores the instance of the object the player owns.
The object’s data is recorded by Hashtable, the Keys and Values in it are:

| Key    | Value                                                                                                                               |
|:------ |:----------------------------------------------------------------------------------------------------------------------------------- |
| iguid  | the object’s iguid          |
| name   | the object’s name     |
| id     | the id of the object’s instance  |
| now    | the system’s time in the current server, and the formatting is yyyy/mm/dd hh:mm:ss     |
| expire | the time the object instance expires, and the formatting is yyyy/mm/dd hh:mm:ss  |
| attr   | The attribute data is key = value. The Key is already designated by the developers when setting the object’s category backstage. Except for the preset value during defining, the value can be changed. |

Since there can be more than one attribute, the elements are cast as Hashtables. The Keys and Values them it are:
    
| Key   | Value                |
| ----- |:-------------------- |
| name  | attribute’s name, which is the Key|
| value | attribute’s value   |
| stamp | the time this attribute is written in   |
      
If no attribute is set for this object, Hashtable[“attr”] = null.    
      
***• public static void GetItemInstance(CloudGame game, string[] iguidArray, OnCallCompletionWithData cb, object token)***
    
Obtain the objects that the player owns their iguids in that game. Also called an object instance. This overloading delivers the iguid array to designate several objects.
    
| parameter | note  |
|:---- |:---------- |
| game | the game logged in |
| iguidArray | the iguid’s word string array of the object one designates to obtain |
    
Types of back-sendings:
`void cb(int code, object obj, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the obtaining succeeds                 |
| not 0   | the obtaining fails, the code is the error code, and obj is meaningless and negligible |
 
     
obj which is cast as List<Hashtable>, stores the instance of the object the player owns.
The object’s data is recorded by Hashtable, the Keys and Values in it are:      

| Key    | Value                                                                                                                               |
|:------ |:----------------------------------------------------------------------------------------------------------------------------------- |
| iguid  | the object’s iguid          |
| name   | the object’s name     |
| id     | the id of the object’s instance  |
| now    | the system’s time in the current server, and the formatting is yyyy/mm/dd hh:mm:ss     |
| expire | the time the object instance expires, and the formatting is yyyy/mm/dd hh:mm:ss  |
| attr   | The attribute data is key = value. The Key is already designated by the developers when setting the object’s category backstage. Except for the preset value during defining, the value can be changed. |

Since there can be more than one attribute, the elements are cast as Hashtables. The Keys and Values them it are:  
 
| Key   | Value                |
| ----- |:-------------------- |
| name  | attribute’s name, which is the Key|
| value | attribute’s value   |
| stamp | the time this attribute is written in   |
      
If no attribute is set for this object, Hashtable[“attr”] = null.        
    
<mark>Please be aware that if there are any wrong iguids in parameter iguidArray, it will not send any errors, but the List that is sent back will not contain the instance data of those iguids.</mark> 
         
***• public static void GetItemInstance(CloudGame game, uint poid, OnCallCompletionWithData cb, object token)***     
            
To read other players’ (poid) Item Instance, Item has to be set open backstage. As for the other parameters, please go to the description for function `GetItemInstance()` overloading.   
          
***• public static void GetItemInstance(CloudGame game, uint poid, string iguid, OnCallCompletionWithData cb, object token)***        
             
To read other players’ (poid) Item Instance, Item has to be set open backstage. As for the other parameters, please go to the description for function `GetItemInstance()` overloading.        
               
***• public static void GetItemInstance(CloudGame game, uint poid, string iguid, bool autonew, OnCallCompletionWithData cb, object token)***        
         
To read other players’ (poid) Item Instance, parameter iguid has to be set as an open Item backstage. As for the other parameters, please go to the description for function `GetItemInstance()` overloading.        
               
***• public static void GetItemInstance(CloudGame game, uint poid, string[] iguidArray, OnCallCompletionWithData cb, object token)***          
         
To read other players’ (poid) Item Instance, parameter iguid has to be set as an open Item backstage. As for the other parameters, please go to the description for function `GetItemInstance()` overloading.             
         
***• public static void GetItemInstanceEx(CloudGame game, string userid, OnCallCompletionWithData cb, object token)***     
        
To read other players’ (poid) Item Instance, Item has to be set open backstage. As for the other parameters, please go to the description for function `GetItemInstance()` overloading.        
          
***• public static void GetItemInstanceEx(CloudGame game, string userid, string iguid, OnCallCompletionWithData cb, object token)***         
            
To read other players’ (userid) Item Instance, parameter iguid has to be set as an open Item backstage. As for the other parameters, please go to the description for function `GetItemInstance()` overloading.         
              
***• public static void GetItemInstanceEx(CloudGame game, string userid, string iguid, bool autonew, OnCallCompletionWithData cb, object token)***   
           
To read other players’ (userid) Item Instance, parameter iguid has to be set as an open Item backstage. As for the other parameters, please go to the description for function `GetItemInstance()` overloading.           
               
***• public static void GetItemInstanceEx(CloudGame game, string userid, string[] iguidArray, OnCallCompletionWithData cb, object token)***        
           
To read other players’ (userid) Item Instance, parameter iguidArray has to be set as an open Item backstage. As for the other parameters, please go to the description for function `GetItemInstance()` overloading. 
            
## **GetItemClass**
***• public static void GetItemClass(CloudGame game, int option, OnCallCompletionWithData cb, object token)***           
            
Based on the value of parameter option, obtain the objects developers define backstage, which are also called item instances.

| parameter | note  |
|:---- |:---------- |
| game | the game logged in |
| option | Number 0-3 |

Supplementary Note for option:

| Number | note                    |
| ------ |:--------------------------------------------- |
| 0      | only obtain the categories (traits) of the objects that are not sold in the market      |
| 1      | only obtain the categories (traits) of the objects that are sold in the market  |
| 2      | the categories of all objects (except for those that are concealed from players)(traits+merchandise) |
| 3      | objects (data) that are concealed from players       |
   
Types of back-sendings:
`void cb(int code, object obj, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the obtaining succeeds                 |
| not 0   | the obtaining fails, the code is the error code, and obj is meaningless and negligible |

obj which is cast as List<Hashtable>, stores the instance of the object the player owns.
The object’s data is recorded by Hashtable, the Keys and Values in it are:

| Key    | Value                                                                                                                               |
|:------ |:----------------------------------------------------------------------------------------------------------------------------------- |
| iguid  | the object’s iguid          |
| name   | the object’s name     |
| desc  | the object’s description               |
| type  | the object’s type, 1: merchandise, 2: trait, 3: data                  |
| now   | the system’s time in the current server. The formatting is yyyy/mm/dd hh:mm:ss and the timezone is UTC |
| attr  | attribute, and the attribute data is Key = Value.                        |

Since there can be more than one attribute, the elements are cast as Hashtables. The Keys and Values them it are:
    
| Key   | Value                |
| ----- |:-------------------- |
| name  | attribute’s name, which is the Key|
| value | attribute’s value   |
      
If no attribute is set for this object, Hashtable[“attr”] = null.
   
      
The following example demonstrates how to obtain elements one by one:
       
```
C#
void CB_GetItemClass(int code, object obj, object token)
{
	if (code == 0)
	{
		List<Hashtable> list = obj as List<Hashtable>;
		
		Debug.Log("iguid : " + list[0]["iguid"].ToString());
		Debug.Log("name : " + list[0]["name"].ToString());
		Debug.Log("desc : " + list[0]["desc"].ToString());
		Debug.Log("type : " + list[0]["type"].ToString());
		Debug.Log("now : " + list[0]["now"].ToString());

		Hashtable attr_ht = list[0]["attr"] as Hashtable;
		foreach (DictionaryEntry itemm in attr_ht)
		{
			Debug.Log(itemm.Key + " / " + itemm.Value);
		}
	}
	else
	{
		Debug.LogWarning("GetItemClass Fail! Code : " + code);
	}
}
```
   
***• public static void GetItemClass(CloudGame game, string iguid, OnCallCompletionWithData cb, object token)***
   
Based on the object’s iguid, obtain the object’s category that the developers define backstage. 

| parameter | note  |
|:---- |:---------- |
| game | the game logged in |
| iguid | the iguid of the object one designates to obtain |
          
Types of back-sendings:
`void cb(int code, object obj, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the obtaining succeeds                 |
| not 0   | the obtaining fails, the code is the error code, and obj is meaningless and negligible |
          
obj, which is cast as List<Hashtable>, stores items defined for the developers. Since this function only sends back one object’s category, the List that is sent back contains only one Hashtable, and the Keys and Values that record the item's data are:
    
| Key    | Value                                                                                                                               |
|:------ |:----------------------------------------------------------------------------------------------------------------------------------- |
| iguid  | the object’s iguid          |
| name   | the object’s name     |
| desc  | the object’s description               |
| type  | the object’s type, 1: merchandise, 2: trait, 3: data                  |
| now   | the system’s time in the current server. The formatting is yyyy/mm/dd hh:mm:ss and the timezone is UTC |
| attr  | attribute, and the attribute data is Key = Value.                        |

Since there can be more than one attribute, the elements are cast as Hashtables. The Keys and Values them it are:
       
| Key   | Value                |
| ----- |:-------------------- |
| name  | attribute’s name, which is the Key|
| value | attribute’s value   |  
      
If no attribute is set for this object, Hashtable[“attr”] = null. 

       
***• public static void GetItemClass(CloudGame game, string[] iguidArray, OnCallCompletionWithData cb, object token)***
         
Based on the object’s iguid, obtain the object’s category that the developers define backstage.
    
| Key   | Value                |
|:---------- |:------------------------------- |
| game       | the game logged in       |
| iguidArray | the iguid’s word string array of the objects one designates to obtain |

    	    
Types of back-sendings:
`void cb(int code, object obj, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the obtaining succeeds                 |
| not 0   | the obtaining fails, the code is the error code, and obj is meaningless and negligible |    
	          
obj, which is cast as List<Hashtable>, stores items defined for the developers. Since this function only sends back one object’s category, the List that is sent back contains only one Hashtable, and the Keys and Values that record the item's data are:   
                                                  
| Key    | Value                                                                                                                               |
|:------ |:----------------------------------------------------------------------------------------------------------------------------------- |
| iguid  | the object’s iguid          |
| name   | the object’s name     |
| desc  | the object’s description               |
| type  | the object’s type, 1: merchandise, 2: trait, 3: data                  |
| now   | the system’s time in the current server. The formatting is yyyy/mm/dd hh:mm:ss and the timezone is UTC |
| attr  | attribute, and the attribute data is Key = Value.                        |
             
Since there can be more than one attribute, the elements are cast as Hashtables. The Keys and Values them it are:
       
| Key   | Value                |
| ----- |:-------------------- |
| name  | attribute’s name, which is the Key|
| value | attribute’s value   |  
      
If no attribute is set for this object, Hashtable[“attr”] = null.  
         
<mark>Please be aware that if there are any wrong iguids in parameter iguidArray, it will not send any errors, but the List that is sent back will not contain the instance data of those iguids.</mark>  
      
***• public static void GetItemClass(CloudGame game, uint poid, int option, OnCallCompletionWithData cb, object token)***      
        
To read other players’ (poid) Item Instance, Item has to be set open backstage. As for the other parameters, please go to the description for function `GetItemClass()` overloading.   
            
***• public static void GetItemClass(CloudGame game, uint poid, string iguid, OnCallCompletionWithData cb, object token)***        
           
To read other players’ (poid) Item Instance, parameter iguid has to be set as an open Item backstage. As for the other parameters, please go to the description for function `GetItemClass()` overloading.    
		   
***• public static void GetItemClass(CloudGame game, uint poid, string[] iguidArray, OnCallCompletionWithData cb, object token)***        
          
To read other players’ (poid) Item Instance, parameter iguidArray has to be set as an open Item backstage. As for the other parameters, please go to the description for function `GetItemClass()` overloading.  
           
## **NewItemInstance**
***• public static void NewItemInstance(CloudGame game, string iguid, OnCallCompletionWithData cb, object token)***
    
During the game, when the player gets the object for some reason, he can add a new object instance with this method.     
    
| parameter | note  |
|:---- |:---------- |
| game | the game logged in |
| iguid | the iguid of the object one designates to obtain |
          
Types of back-sendings:
`void cb(int code, object id, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the item-adding succeeds                 |
| not 0   | the item-adding fails, the code is the error code, and id is meaningless and negligible |
   
Supplementary Note:
When adding an object successfully, the id that is sent back here is the instance id of the newly-added object instance. Please cast this parameter as a string.
    
<mark>Please be aware that if the added item is set to be “combine attribute values and do not create a new object,” backstage, itemid sends back as 0</mark>   
          
## **SetItemInstanceAttribute**
***• public static void SetItemInstanceAttribute(CloudGame game, string iguid, string id, string[] attrNameArray, string[] attrValueArray, OnCallCompletion cb, object token)***    
       
Set the attribute value of the object instance the player owns in the game.
    
| parameter | note  |
|:-------------- |:------------------------------------------------ |
| game           |the game logged in                           |
| iguid          | the iguid of the object’s category                          |
| id             | the instance id of the object that the player owns and wants to set its attribute |
| attrNameArray  | the array word string of the attribute’s name one wants to set    |
| attrValueArray | the array word string of the attribute’s value one wants to set|
    

Types of back-sendings:
`void cb(int code, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the setting succeeds                 |
| not 0   | the setting fails, and the code is the error code |

***• public static void SetItemInstanceAttribute(CloudGame game, string iguid, string id, string[] attrNameArray, string[] attrValueArray, string[] syncToGuildRegArray, OnCallCompletion cb, object token)***    
    
Set the array word string of the object instance’s value that the player owns in the game and simultaneously write it in to the register that stores the guild’s personal information. 
    
| parameter | note  |
|:-------------- |:------------------------------------------------ |
| game           |the game logged in                           |
| iguid          | the iguid of the object’s category                          |
| id             | the instance id of the object that the player owns and wants to set its attribute |
| attrNameArray  | the array word string of the attribute’s name one wants to set    |
| attrValueArray | the array word string of the attribute’s value one wants to set|
| syncToGuildRegArray | The register that written ins the guild’s personal information. Set as a word string array in R1 ~ R4. |
    
Types of back-sendings:
`void cb(int code, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the setting succeeds                 |
| not 0   | the setting fails, and the code is the error code |
       
***• public static void SetItemInstanceAttribute(CloudGame game, string iguid, string id, string attrName, string attrValue, OnCallCompletion cb, object token)***          
    
Set the attribute’s value of the object instance that the player owns in the game.  

| parameter | note  |
|:-------------- |:------------------------------------------------ |
| game           |the game logged in                           |
| iguid          | the iguid of the object’s category                          |
| id             | the instance id of the object that the player owns and wants to set its attribute |
| attrNameArray  | the array word string of the attribute’s name one wants to set    |
| attrValueArray | the array word string of the attribute’s value one wants to set|

Types of back-sendings:
`void cb(int code, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the setting succeeds                 |
| not 0   | the setting fails, and the code is the error code |       
         
***• public static void SetItemInstanceAttribute(CloudGame game, string iguid, string id, string attrName, string attrValue, string syncToGuildReg, OnCallCompletion cb, object token)***           
           
Set the attribute’s value of the object instance that the player owns in the game and simultaneously write it in to the register that stores the guild’s personal information.
    
| parameter | note  |
|:-------------- |:------------------------------------------------ |
| game           |the game logged in                           |
| iguid          | the iguid of the object’s category                          |
| id             | the instance id of the object that the player owns and wants to set its attribute |
| attrNameArray  | the array word string of the attribute’s name one wants to set    |
| attrValueArray | the array word string of the attribute’s value one wants to set|
| syncToGuildRegArray | The register that written ins the guild’s personal information. Set as a word string array in R1 ~ R4. |
      
Types of back-sendings:
`void cb(int code, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the setting succeeds                 |
| not 0   | the setting fails, and the code is the error code |         
         
## **GetItemInstanceAttribute**
***• public static void GetItemInstanceAttribute(CloudGame game, string iguid, string id, string attrName, OnCallCompletionWithData cb, object token)***      
       
Obtain the attribute’s value of the object instance that the player owns in the game.

| parameter | note  |
|:-------------- |:------------------------------------------------ |
| game           |the game logged in                           |
| iguid          | the iguid of the object’s category                          |
| id             | the instance id of the object that the player owns and wants to set its attribute |
| attrName  | the attribute’s name which one wants to obtain its value       |

Types of back-sendings:
`void cb(int code, object obj, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the obtaining succeeds                 |
| not 0   | the obtaining fails, the code is the error code, and obj is meaningless and negligible |
       
obj is cast as List<Hashtable> and its Keys and Values  are: 
    
| Key   | Value                                            |
| ----- |:------------------------------------------------ |
| name  | the attribute’s name, which is parameter attrName         |
| value | the attribute’s value                  |
| stamp | the time this attribute’s value is written in                   |
| now   | the system time of the current server, and the formatting is yyyy/mm/dd hh:mm:ss |
      
***• public static void GetItemInstanceAttribute(CloudGame game, string iguid, string id, string[] attrNameArray, OnCallCompletionWithData cb, object token)***      
       
Obtain the attribute’s value of the object instance that the player owns in the game.   
    
| parameter | note  |
|:-------------- |:------------------------------------------------ |
| game           |the game logged in                           |
| iguid          | the iguid of the object’s category                          |
| id             | the instance id of the object that the player owns and wants to set its attribute |
| attrNameArray  | the array word string of the attribute’s name one wants to set     |
 
Types of back-sendings:
`void cb(int code, object obj, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the obtaining succeeds                 |
| not 0   | the obtaining fails, the code is the error code, and obj is meaningless and negligible |

obj is cast as List<Hashtable> and stores attribute data. Its Keys and Values  are:

| Key   | Value                                            |
| ----- |:------------------------------------------------ |
| name  | the attribute’s name, which is parameter attrName         |
| value | the attribute’s value                  |
| stamp | the time this attribute’s value is written in                   |
| now   | the system time of the current server, and the formatting is yyyy/mm/dd hh:mm:ss |
         
<mark>Please be aware that if there are any wrong or inexistent attribute names in the designated parameter attrNameArray, it will not send any errors, but the List that is sent back will not contain the data of those wrong attributes.</mark>    
	  
## **DeleteItemInstance**  
***• public static void DeleteItemInstance(CloudGame game, string iguid, string id, OnCallCompletion cb, object token)***          
      
Delete object instance.
    
| parameter | note  |
|:-------------- |:------------------------------------------------ |
| game           |the game logged in                           |
| iguid          | the iguid of the object’s category                          |
| id             | the instance id of the object that the player owns and wants to set its attribute |
      
Types of back-sendings:
`void cb(int code, object token)`    

Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the deletion succeeds                 |
| not 0   | the deletion fails, and the code is the error code |
             
## **GetItemInstanceNumber** 
***• public static void GetItemInstanceNumber(CloudGame game, string iguid, OnCallCompletionWithData cb, object token)***            
       
Obtain the number of the object instances one object category has created, and send it back with callback cb()’s parameter obj.
    
| parameter | note  |
|:-------------- |:------------------------------------------------ |
| game           |the game logged in                           |
| iguid          | the iguid of the object’s category     |
             
Types of back-sendings:     
       
`void cb(int code, object obj, object token)`          
            
Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the obtaining succeeds                 |
| not 0   | the obtaining fails, and the code is the error code |   

Supplementary Note:  
obj is cast as int, and it sends back the number of object instances.                 
        
## **ResetMallItemStatus** 
***• public static void ResetMallItemStatus(CloudGame game, string iguid, OnCallCompletion cb, object token)***
       
Reset the status in the market of the object whose iguid is designated. There are three statuses for merchandise, which are normal, conceal, and locked. After resetting, the merchandise will be set back as “normal.”
    
| parameter | note  |
|:-------------- |:------------------------------------------------ |
| game           |the game logged in                           |
| iguid          | the iguid of the object’s category     |
    
Types of back-sendings:     
       
`void cb(int code, object token)`          
            
Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the resetting succeeds                 |
| not 0   | the resetting fails, and the code is the error code | 
      
## **ChangeMallItemStatus**
***• public static void ChangeMallItemStatus(CloudGame game, string iguid, int status, OnCallCompletion cb, object token)***          
      
Based on the value of parameter status, change the status in the market of the merchandise whose iguid is designated.	  
        
| parameter | note  |
|:-------------- |:------------------------------------------------ |
| game           |the game logged in                           |
| iguid          | the iguid of the object’s category     |
| status | merchandise’s status. 0: normal / 1: concealed / 2: locked |
        
Types of back-sendings:     
       
`void cb(int code, object token)`          
            
Here are the codes' status codes and their notes.     
           
| status code | note                               |
|:------ |:---------------------------------------------- |
| 0      | the setting succeeds                 |
| not 0   | the setting fails, and the code is the error code |