GS2-Inventory トランザクションアクション

ConsumeAction

Gs2Inventory:ConsumeItemSetByUserId

ユーザーIDを指定してインベントリのアイテムを消費

説明
namespaceNamestringネームスペース名
inventoryNamestringインベントリモデルの名前
userIdstring#{userId} と設定することでログイン中のユーザーIDに置換されます
itemNamestringアイテムモデルの名前
consumeCountlong消費する量
itemSetNamestringアイテムセットを識別する名前
{
    "action": "Gs2Inventory:ConsumeItemSetByUserId",
    "request": {
        "namespaceName": "[string]ネームスペース名",
        "inventoryName": "[string]インベントリモデルの名前",
        "userId": "[string]ユーザーID",
        "itemName": "[string]アイテムモデルの名前",
        "consumeCount": "[long]消費する量",
        "itemSetName": "[string]アイテムセットを識別する名前"
    }
}
action: Gs2Inventory:ConsumeItemSetByUserId
request:
  namespaceName: "[string]ネームスペース名"
  inventoryName: "[string]インベントリモデルの名前"
  userId: "[string]ユーザーID"
  itemName: "[string]アイテムモデルの名前"
  consumeCount: "[long]消費する量"
  itemSetName: "[string]アイテムセットを識別する名前"

Gs2Inventory:VerifyReferenceOfByUserId

ユーザーIDを指定して参照元に関する検証

説明
namespaceNamestringネームスペース名
inventoryNamestringインベントリモデルの名前
userIdstring#{userId} と設定することでログイン中のユーザーIDに置換されます
itemNamestringアイテムモデルの名前
itemSetNamestringアイテムセットを識別する名前
referenceOfstringこの所持品の参照元
verifyTypeenum [’not_entry’, ‘already_entry’, ’empty’, ’not_empty’]検証の種類
{
    "action": "Gs2Inventory:VerifyReferenceOfByUserId",
    "request": {
        "namespaceName": "[string]ネームスペース名",
        "inventoryName": "[string]インベントリモデルの名前",
        "userId": "[string]ユーザーID",
        "itemName": "[string]アイテムモデルの名前",
        "itemSetName": "[string]アイテムセットを識別する名前",
        "referenceOf": "[string]この所持品の参照元",
        "verifyType": "[string]検証の種類"
    }
}
action: Gs2Inventory:VerifyReferenceOfByUserId
request:
  namespaceName: "[string]ネームスペース名"
  inventoryName: "[string]インベントリモデルの名前"
  userId: "[string]ユーザーID"
  itemName: "[string]アイテムモデルの名前"
  itemSetName: "[string]アイテムセットを識別する名前"
  referenceOf: "[string]この所持品の参照元"
  verifyType: "[string]検証の種類"

AcquireAction

Gs2Inventory:AddCapacityByUserId

キャパシティサイズを加算

説明
namespaceNamestringネームスペース名
inventoryNamestringインベントリモデル名
userIdstring#{userId} と設定することでログイン中のユーザーIDに置換されます
addCapacityValueint加算するキャパシティサイズ
{
    "action": "Gs2Inventory:AddCapacityByUserId",
    "request": {
        "namespaceName": "[string]ネームスペース名",
        "inventoryName": "[string]インベントリモデル名",
        "userId": "[string]ユーザーID",
        "addCapacityValue": "[int]加算するキャパシティサイズ"
    }
}
action: Gs2Inventory:AddCapacityByUserId
request:
  namespaceName: "[string]ネームスペース名"
  inventoryName: "[string]インベントリモデル名"
  userId: "[string]ユーザーID"
  addCapacityValue: "[int]加算するキャパシティサイズ"

Gs2Inventory:SetCapacityByUserId

キャパシティサイズを設定

説明
namespaceNamestringネームスペース名
inventoryNamestringインベントリモデル名
userIdstring#{userId} と設定することでログイン中のユーザーIDに置換されます
newCapacityValueintインベントリの新しい最大キャパシティ
{
    "action": "Gs2Inventory:SetCapacityByUserId",
    "request": {
        "namespaceName": "[string]ネームスペース名",
        "inventoryName": "[string]インベントリモデル名",
        "userId": "[string]ユーザーID",
        "newCapacityValue": "[int]インベントリの新しい最大キャパシティ"
    }
}
action: Gs2Inventory:SetCapacityByUserId
request:
  namespaceName: "[string]ネームスペース名"
  inventoryName: "[string]インベントリモデル名"
  userId: "[string]ユーザーID"
  newCapacityValue: "[int]インベントリの新しい最大キャパシティ"

Gs2Inventory:AcquireItemSetByUserId

アイテムをインベントリに追加

説明
namespaceNamestringネームスペース名
inventoryNamestringインベントリの名前
itemNamestringアイテムモデルの名前
userIdstring#{userId} と設定することでログイン中のユーザーIDに置換されます
acquireCountlong入手する量
expiresAtlong有効期限
createNewItemSetbool既存の ItemSet に空きがあったとしても、新しい ItemSet を作成するか
itemSetNamestringアイテムセットを識別する名前
{
    "action": "Gs2Inventory:AcquireItemSetByUserId",
    "request": {
        "namespaceName": "[string]ネームスペース名",
        "inventoryName": "[string]インベントリの名前",
        "itemName": "[string]アイテムモデルの名前",
        "userId": "[string]ユーザーID",
        "acquireCount": "[long]入手する量",
        "expiresAt": "[long]有効期限",
        "createNewItemSet": "[bool]既存の ItemSet に空きがあったとしても、新しい ItemSet を作成するか",
        "itemSetName": "[string]アイテムセットを識別する名前"
    }
}
action: Gs2Inventory:AcquireItemSetByUserId
request:
  namespaceName: "[string]ネームスペース名"
  inventoryName: "[string]インベントリの名前"
  itemName: "[string]アイテムモデルの名前"
  userId: "[string]ユーザーID"
  acquireCount: "[long]入手する量"
  expiresAt: "[long]有効期限"
  createNewItemSet: "[bool]既存の ItemSet に空きがあったとしても、新しい ItemSet を作成するか"
  itemSetName: "[string]アイテムセットを識別する名前"

Gs2Inventory:AddReferenceOfByUserId

ユーザーIDを指定して参照元を追加

説明
namespaceNamestringネームスペース名
inventoryNamestringインベントリモデルの名前
userIdstring#{userId} と設定することでログイン中のユーザーIDに置換されます
itemNamestringアイテムモデルの名前
itemSetNamestringアイテムセットを識別する名前
referenceOfstringこの所持品の参照元
{
    "action": "Gs2Inventory:AddReferenceOfByUserId",
    "request": {
        "namespaceName": "[string]ネームスペース名",
        "inventoryName": "[string]インベントリモデルの名前",
        "userId": "[string]ユーザーID",
        "itemName": "[string]アイテムモデルの名前",
        "itemSetName": "[string]アイテムセットを識別する名前",
        "referenceOf": "[string]この所持品の参照元"
    }
}
action: Gs2Inventory:AddReferenceOfByUserId
request:
  namespaceName: "[string]ネームスペース名"
  inventoryName: "[string]インベントリモデルの名前"
  userId: "[string]ユーザーID"
  itemName: "[string]アイテムモデルの名前"
  itemSetName: "[string]アイテムセットを識別する名前"
  referenceOf: "[string]この所持品の参照元"

Gs2Inventory:DeleteReferenceOfByUserId

ユーザーIDを指定して参照元を削除

説明
namespaceNamestringネームスペース名
inventoryNamestringインベントリモデルの名前
userIdstring#{userId} と設定することでログイン中のユーザーIDに置換されます
itemNamestringアイテムモデルの名前
itemSetNamestringアイテムセットを識別する名前
referenceOfstringこの所持品の参照元
{
    "action": "Gs2Inventory:DeleteReferenceOfByUserId",
    "request": {
        "namespaceName": "[string]ネームスペース名",
        "inventoryName": "[string]インベントリモデルの名前",
        "userId": "[string]ユーザーID",
        "itemName": "[string]アイテムモデルの名前",
        "itemSetName": "[string]アイテムセットを識別する名前",
        "referenceOf": "[string]この所持品の参照元"
    }
}
action: Gs2Inventory:DeleteReferenceOfByUserId
request:
  namespaceName: "[string]ネームスペース名"
  inventoryName: "[string]インベントリモデルの名前"
  userId: "[string]ユーザーID"
  itemName: "[string]アイテムモデルの名前"
  itemSetName: "[string]アイテムセットを識別する名前"
  referenceOf: "[string]この所持品の参照元"