GS2-Enchant SDK for Game Engine API リファレンス

ゲームエンジン向け GS2-SDK の モデルの仕様 と API のリファレンス

モデル

EzBalanceParameterModel

バランスパラメーターモデル

バランスパラメーターの抽選条件を定義します。

有効化条件必須デフォルト値の制限説明
namestring
~ 128文字バランスパラメーターモデル名
metadatastring~ 2048文字メタデータ
totalValuelong
~ 9223372036854775805合計値
initialValueStrategyenum {
  “average”,
  “lottery”
}
“average”~ 128文字初期値の設定方針
parametersList<EzBalanceParameterValueModel>
1 ~ 10 itemsバランスパラメーター値モデルのリスト

initialValueStrategy に指定する列挙型の定義

定義説明
average平均値
lottery抽選

EzBalanceParameterValueModel

バランスパラメーター値モデル

有効化条件必須デフォルト値の制限説明
namestring
~ 64文字名前
metadatastring~ 512文字メタデータ

EzBalanceParameterStatus

バランスパラメーターの状態

有効化条件必須デフォルト値の制限説明
parameterNamestring
~ 128文字バランスパラメーターモデル名
propertyIdstring
~ 1024文字パラメーターの保有元リソースのプロパティID
parameterValuesList<EzBalanceParameterValue>
1 ~ 10 itemsバランスパラメーターの値リスト

EzBalanceParameterValue

バランスパラメーター値モデル

有効化条件必須デフォルト値の制限説明
namestring
~ 64文字名前
valuelong
~ 9223372036854775805

EzRarityParameterModel

レアリティパラメーターモデル

レアリティパラメーターの抽選条件を定義します。

有効化条件必須デフォルト値の制限説明
namestring
~ 128文字レアリティパラメーターモデル名
metadatastring~ 2048文字メタデータ
maximumParameterCountint
1 ~ 10付与するパラメーターの最大数
parameterCountsList<EzRarityParameterCountModel>
1 ~ 10 itemsレアリティパラメーターの付与数モデルのリスト
parametersList<EzRarityParameterValueModel>
1 ~ 1000 itemsレアリティパラメーター値モデルのリスト

EzRarityParameterCountModel

レアリティパラメーターの付与数モデル

有効化条件必須デフォルト値の制限説明
countint
~ 10
weightint
1 ~ 2147483646排出重み

EzRarityParameterValueModel

バランスパラメーター値モデル

有効化条件必須デフォルト値の制限説明
namestring
~ 64文字名前
metadatastring~ 512文字メタデータ
resourceNamestring
~ 64文字ゲーム内で使用するパラメーターリソースの種類を表す名前(GS2の動作のためには使用しません)
resourceValuelong
~ 9223372036854775805ゲーム内で使用するパラメーターリソースの値(GS2の動作のためには使用しません)
weightint
1 ~ 2147483646排出重み

EzRarityParameterStatus

レアリティパラメーターの状態

有効化条件必須デフォルト値の制限説明
parameterNamestring
~ 128文字レアリティパラメーターモデル名
propertyIdstring
~ 1024文字パラメーターの保有元リソースのプロパティID
parameterValuesList<EzRarityParameterValue>~ 10 itemsレアリティパラメーターの値リスト

EzRarityParameterValue

レアリティパラメーター値モデル

有効化条件必須デフォルト値の制限説明
namestring
~ 64文字名前
resourceNamestring
~ 64文字リソースの名前
resourceValuelong
~ 9223372036854775805リソースの値

EzVerifyActionResult

検証アクションの実行結果

有効化条件必須デフォルト値の制限説明
actionenum {
"Gs2Dictionary:VerifyEntryByUserId",
"Gs2Distributor:IfExpressionByUserId",
"Gs2Distributor:AndExpressionByUserId",
"Gs2Distributor:OrExpressionByUserId",
"Gs2Enchant:VerifyRarityParameterStatusByUserId",
"Gs2Experience:VerifyRankByUserId",
"Gs2Experience:VerifyRankCapByUserId",
"Gs2Grade:VerifyGradeByUserId",
"Gs2Grade:VerifyGradeUpMaterialByUserId",
"Gs2Guild:VerifyCurrentMaximumMemberCountByGuildName",
"Gs2Guild:VerifyIncludeMemberByUserId",
"Gs2Inventory:VerifyInventoryCurrentMaxCapacityByUserId",
"Gs2Inventory:VerifyItemSetByUserId",
"Gs2Inventory:VerifyReferenceOfByUserId",
"Gs2Inventory:VerifySimpleItemByUserId",
"Gs2Inventory:VerifyBigItemByUserId",
"Gs2Limit:VerifyCounterByUserId",
"Gs2Matchmaking:VerifyIncludeParticipantByUserId",
"Gs2Mission:VerifyCompleteByUserId",
"Gs2Mission:VerifyCounterValueByUserId",
"Gs2Ranking2:VerifyGlobalRankingScoreByUserId",
"Gs2Ranking2:VerifyClusterRankingScoreByUserId",
"Gs2Ranking2:VerifySubscribeRankingScoreByUserId",
"Gs2Schedule:VerifyTriggerByUserId",
"Gs2Schedule:VerifyEventByUserId",
"Gs2SerialKey:VerifyCodeByUserId",
"Gs2Stamina:VerifyStaminaValueByUserId",
"Gs2Stamina:VerifyStaminaMaxValueByUserId",
"Gs2Stamina:VerifyStaminaRecoverIntervalMinutesByUserId",
"Gs2Stamina:VerifyStaminaRecoverValueByUserId",
"Gs2Stamina:VerifyStaminaOverflowValueByUserId",
}
~ 128文字検証アクションで実行するアクションの種類
verifyRequeststring
~ 524288文字リクエストのJSON
statusCodeint~ 999ステータスコード
verifyResultstring~ 1048576文字結果内容

EzConsumeActionResult

消費アクションの実行結果

有効化条件必須デフォルト値の制限説明
actionenum {
"Gs2AdReward:ConsumePointByUserId",
"Gs2Dictionary:DeleteEntriesByUserId",
"Gs2Enhance:DeleteProgressByUserId",
"Gs2Exchange:DeleteAwaitByUserId",
"Gs2Experience:SubExperienceByUserId",
"Gs2Experience:SubRankCapByUserId",
"Gs2Formation:SubMoldCapacityByUserId",
"Gs2Grade:SubGradeByUserId",
"Gs2Guild:DecreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:DecreaseMaximumIdleMinutesByUserId",
"Gs2Inbox:OpenMessageByUserId",
"Gs2Inbox:DeleteMessageByUserId",
"Gs2Inventory:ConsumeItemSetByUserId",
"Gs2Inventory:ConsumeSimpleItemsByUserId",
"Gs2Inventory:ConsumeBigItemByUserId",
"Gs2JobQueue:DeleteJobByUserId",
"Gs2Limit:CountUpByUserId",
"Gs2LoginReward:MarkReceivedByUserId",
"Gs2Mission:ReceiveByUserId",
"Gs2Mission:BatchReceiveByUserId",
"Gs2Mission:DecreaseCounterByUserId",
"Gs2Mission:ResetCounterByUserId",
"Gs2Money:WithdrawByUserId",
"Gs2Money:RecordReceipt",
"Gs2Money2:WithdrawByUserId",
"Gs2Money2:VerifyReceiptByUserId",
"Gs2Quest:DeleteProgressByUserId",
"Gs2Ranking2:CreateGlobalRankingReceivedRewardByUserId",
"Gs2Ranking2:CreateClusterRankingReceivedRewardByUserId",
"Gs2Schedule:DeleteTriggerByUserId",
"Gs2SerialKey:UseByUserId",
"Gs2Showcase:IncrementPurchaseCountByUserId",
"Gs2SkillTree:MarkRestrainByUserId",
"Gs2Stamina:DecreaseMaxValueByUserId",
"Gs2Stamina:ConsumeStaminaByUserId",
}
~ 128文字消費アクションで実行するアクションの種類
consumeRequeststring
~ 524288文字リクエストのJSON
statusCodeint~ 999ステータスコード
consumeResultstring~ 1048576文字結果内容

EzAcquireActionResult

入手アクションの実行結果

有効化条件必須デフォルト値の制限説明
actionenum {
"Gs2AdReward:AcquirePointByUserId",
"Gs2Dictionary:AddEntriesByUserId",
"Gs2Enchant:ReDrawBalanceParameterStatusByUserId",
"Gs2Enchant:SetBalanceParameterStatusByUserId",
"Gs2Enchant:ReDrawRarityParameterStatusByUserId",
"Gs2Enchant:AddRarityParameterStatusByUserId",
"Gs2Enchant:SetRarityParameterStatusByUserId",
"Gs2Enhance:DirectEnhanceByUserId",
"Gs2Enhance:UnleashByUserId",
"Gs2Enhance:CreateProgressByUserId",
"Gs2Exchange:ExchangeByUserId",
"Gs2Exchange:IncrementalExchangeByUserId",
"Gs2Exchange:CreateAwaitByUserId",
"Gs2Exchange:AcquireForceByUserId",
"Gs2Exchange:SkipByUserId",
"Gs2Experience:AddExperienceByUserId",
"Gs2Experience:SetExperienceByUserId",
"Gs2Experience:AddRankCapByUserId",
"Gs2Experience:SetRankCapByUserId",
"Gs2Experience:MultiplyAcquireActionsByUserId",
"Gs2Formation:AddMoldCapacityByUserId",
"Gs2Formation:SetMoldCapacityByUserId",
"Gs2Formation:AcquireActionsToFormProperties",
"Gs2Formation:SetFormByUserId",
"Gs2Formation:AcquireActionsToPropertyFormProperties",
"Gs2Friend:UpdateProfileByUserId",
"Gs2Grade:AddGradeByUserId",
"Gs2Grade:ApplyRankCapByUserId",
"Gs2Grade:MultiplyAcquireActionsByUserId",
"Gs2Guild:IncreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Guild:SetMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:IncreaseMaximumIdleMinutesByUserId",
"Gs2Idle:SetMaximumIdleMinutesByUserId",
"Gs2Idle:ReceiveByUserId",
"Gs2Inbox:SendMessageByUserId",
"Gs2Inventory:AddCapacityByUserId",
"Gs2Inventory:SetCapacityByUserId",
"Gs2Inventory:AcquireItemSetByUserId",
"Gs2Inventory:AcquireItemSetWithGradeByUserId",
"Gs2Inventory:AddReferenceOfByUserId",
"Gs2Inventory:DeleteReferenceOfByUserId",
"Gs2Inventory:AcquireSimpleItemsByUserId",
"Gs2Inventory:SetSimpleItemsByUserId",
"Gs2Inventory:AcquireBigItemByUserId",
"Gs2Inventory:SetBigItemByUserId",
"Gs2JobQueue:PushByUserId",
"Gs2Limit:CountDownByUserId",
"Gs2Limit:DeleteCounterByUserId",
"Gs2LoginReward:DeleteReceiveStatusByUserId",
"Gs2LoginReward:UnmarkReceivedByUserId",
"Gs2Lottery:DrawByUserId",
"Gs2Lottery:ResetBoxByUserId",
"Gs2Mission:RevertReceiveByUserId",
"Gs2Mission:IncreaseCounterByUserId",
"Gs2Mission:SetCounterByUserId",
"Gs2Money:DepositByUserId",
"Gs2Money:RevertRecordReceipt",
"Gs2Money2:DepositByUserId",
"Gs2Quest:CreateProgressByUserId",
"Gs2Schedule:TriggerByUserId",
"Gs2Schedule:ExtendTriggerByUserId",
"Gs2Script:InvokeScript",
"Gs2SerialKey:RevertUseByUserId",
"Gs2SerialKey:IssueOnce",
"Gs2Showcase:DecrementPurchaseCountByUserId",
"Gs2Showcase:ForceReDrawByUserId",
"Gs2SkillTree:MarkReleaseByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
"Gs2Stamina:RaiseMaxValueByUserId",
"Gs2Stamina:SetMaxValueByUserId",
"Gs2Stamina:SetRecoverIntervalByUserId",
"Gs2Stamina:SetRecoverValueByUserId",
"Gs2StateMachine:StartStateMachineByUserId",
}
~ 128文字入手アクションで実行するアクションの種類
acquireRequeststring
~ 524288文字リクエストのJSON
statusCodeint~ 999ステータスコード
acquireResultstring~ 1048576文字結果内容

EzTransactionResult

トランザクション実行結果

サーバーサイドでのトランザクションの自動実行機能を利用して実行されたトランザクションの実行結果

有効化条件必須デフォルト値の制限説明
transactionIdstring
36 ~ 36文字トランザクションID
verifyResultsList<EzVerifyActionResult>~ 10 items検証アクションの実行結果リスト
consumeResultsList<EzConsumeActionResult>[]~ 10 items消費アクションの実行結果リスト
acquireResultsList<EzAcquireActionResult>[]~ 100 items入手アクションの実行結果リスト

メソッド

getBalanceParameterModel

バランスパラメーターモデル情報を取得

Request

有効化条件必須デフォルト値の制限説明
namespaceNamestring
~ 128文字ネームスペース名
parameterNamestring
~ 128文字バランスパラメーターモデル名

Result

説明
itemEzBalanceParameterModelバランスパラメーターモデル

実装例

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).BalanceParameterModel(
        parameterName: "balance-0001"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).BalanceParameterModel(
        parameterName: "balance-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->BalanceParameterModel(
        "balance-0001" // parameterName
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
値の変更イベントハンドリング
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).BalanceParameterModel(
        parameterName: "balance-0001"
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.Subscribe(
        value => {
            // 値が変化した時に呼び出される
            // value には変更後の値が渡ってくる
        }
    );

    // イベントハンドリングを停止
    domain.Unsubscribe(callbackId);
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).BalanceParameterModel(
        parameterName: "balance-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->BalanceParameterModel(
        "balance-0001" // parameterName
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Enchant::Model::FBalanceParameterModel> value) {
            // 値が変化した時に呼び出される
            // value には変更後の値が渡ってくる
        }
    );

    // イベントハンドリングを停止
    Domain->Unsubscribe(CallbackId);

listBalanceParameterModels

バランスパラメーターモデル情報の一覧を取得

Request

有効化条件必須デフォルト値の制限説明
namespaceNamestring
~ 128文字ネームスペース名

Result

説明
itemsList<EzBalanceParameterModel>バランスパラメーターモデルのリスト

実装例

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    );
    var items = await domain.BalanceParameterModelsAsync(
    ).ToListAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    );
    var it = domain.BalanceParameterModels(
    );
    List<EzBalanceParameterModel> items = new List<EzBalanceParameterModel>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    );
    const auto It = Domain->BalanceParameterModels(
    );
    TArray<Gs2::UE5::Enchant::Model::FEzBalanceParameterModelPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
値の変更イベントハンドリング
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.SubscribeBalanceParameterModels(
        () => {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    domain.UnsubscribeBalanceParameterModels(callbackId);
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    );
    var it = domain.BalanceParameterModels(
    );
    List<EzBalanceParameterModel> items = new List<EzBalanceParameterModel>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->SubscribeBalanceParameterModels(
        []() {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    Domain->UnsubscribeBalanceParameterModels(CallbackId);

getBalanceParameterStatus

バランスパラメーターの状態を取得

Request

有効化条件必須デフォルト値の制限説明
namespaceNamestring
~ 128文字ネームスペース名
parameterNamestring
~ 128文字バランスパラメーターモデル名
accessTokenstring
~ 128文字アクセストークン
propertyIdstring
~ 1024文字パラメーターの保有元リソースのプロパティID

Result

説明
itemEzBalanceParameterStatusバランスパラメーターの状態

実装例

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).BalanceParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).BalanceParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->BalanceParameterStatus(
        "balance-0001", // parameterName
        "property-0001" // propertyId
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
値の変更イベントハンドリング
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).BalanceParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.Subscribe(
        value => {
            // 値が変化した時に呼び出される
            // value には変更後の値が渡ってくる
        }
    );

    // イベントハンドリングを停止
    domain.Unsubscribe(callbackId);
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).BalanceParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->BalanceParameterStatus(
        "balance-0001", // parameterName
        "property-0001" // propertyId
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Enchant::Model::FBalanceParameterStatus> value) {
            // 値が変化した時に呼び出される
            // value には変更後の値が渡ってくる
        }
    );

    // イベントハンドリングを停止
    Domain->Unsubscribe(CallbackId);

listBalanceParameterStatuses

バランスパラメーターの状態の一覧を取得

Request

有効化条件必須デフォルト値の制限説明
namespaceNamestring
~ 128文字ネームスペース名
parameterNamestring~ 128文字バランスパラメーターモデル名
accessTokenstring
~ 128文字アクセストークン
pageTokenstring~ 1024文字データの取得を開始する位置を指定するトークン
limitint
301 ~ 1000データの取得件数

Result

説明
itemsList<EzBalanceParameterStatus>バランスパラメーターモデルのリスト
nextPageTokenstringリストの続きを取得するためのページトークン

実装例

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var items = await domain.BalanceParameterStatusesAsync(
        parameterName: "balance-0001"
    ).ToListAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.BalanceParameterStatuses(
        parameterName: "balance-0001"
    );
    List<EzBalanceParameterStatus> items = new List<EzBalanceParameterStatus>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    const auto It = Domain->BalanceParameterStatuses(
        "balance-0001" // parameterName
    );
    TArray<Gs2::UE5::Enchant::Model::FEzBalanceParameterStatusPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
値の変更イベントハンドリング
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.SubscribeBalanceParameterStatuses(
        () => {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    domain.UnsubscribeBalanceParameterStatuses(callbackId);
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.BalanceParameterStatuses(
        parameterName: "balance-0001"
    );
    List<EzBalanceParameterStatus> items = new List<EzBalanceParameterStatus>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->SubscribeBalanceParameterStatuses(
        []() {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    Domain->UnsubscribeBalanceParameterStatuses(CallbackId);

getRarityParameterModel

レアリティパラメーターモデル情報を取得

Request

有効化条件必須デフォルト値の制限説明
namespaceNamestring
~ 128文字ネームスペース名
parameterNamestring
~ 128文字レアリティパラメーターモデル名

Result

説明
itemEzRarityParameterModelレアリティパラメーターモデル

実装例

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).RarityParameterModel(
        parameterName: "rarity-0001"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).RarityParameterModel(
        parameterName: "rarity-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->RarityParameterModel(
        "rarity-0001" // parameterName
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
値の変更イベントハンドリング
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).RarityParameterModel(
        parameterName: "rarity-0001"
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.Subscribe(
        value => {
            // 値が変化した時に呼び出される
            // value には変更後の値が渡ってくる
        }
    );

    // イベントハンドリングを停止
    domain.Unsubscribe(callbackId);
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).RarityParameterModel(
        parameterName: "rarity-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->RarityParameterModel(
        "rarity-0001" // parameterName
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Enchant::Model::FRarityParameterModel> value) {
            // 値が変化した時に呼び出される
            // value には変更後の値が渡ってくる
        }
    );

    // イベントハンドリングを停止
    Domain->Unsubscribe(CallbackId);

listRarityParameterModels

レアリティパラメーターモデル情報の一覧を取得

Request

有効化条件必須デフォルト値の制限説明
namespaceNamestring
~ 128文字ネームスペース名

Result

説明
itemsList<EzRarityParameterModel>レアリティパラメーターモデルのリスト

実装例

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    );
    var items = await domain.RarityParameterModelsAsync(
    ).ToListAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    );
    var it = domain.RarityParameterModels(
    );
    List<EzRarityParameterModel> items = new List<EzRarityParameterModel>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    );
    const auto It = Domain->RarityParameterModels(
    );
    TArray<Gs2::UE5::Enchant::Model::FEzRarityParameterModelPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
値の変更イベントハンドリング
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.SubscribeRarityParameterModels(
        () => {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    domain.UnsubscribeRarityParameterModels(callbackId);
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    );
    var it = domain.RarityParameterModels(
    );
    List<EzRarityParameterModel> items = new List<EzRarityParameterModel>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->SubscribeRarityParameterModels(
        []() {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    Domain->UnsubscribeRarityParameterModels(CallbackId);

getRarityParameterStatus

レアリティパラメーターの状態を取得

Request

有効化条件必須デフォルト値の制限説明
namespaceNamestring
~ 128文字ネームスペース名
parameterNamestring
~ 128文字レアリティパラメーターモデル名
accessTokenstring
~ 128文字アクセストークン
propertyIdstring
~ 1024文字パラメーターの保有元リソースのプロパティID

Result

説明
itemEzRarityParameterStatusレアリティパラメーターの状態

実装例

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RarityParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RarityParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->RarityParameterStatus(
        "balance-0001", // parameterName
        "property-0001" // propertyId
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
値の変更イベントハンドリング
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RarityParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.Subscribe(
        value => {
            // 値が変化した時に呼び出される
            // value には変更後の値が渡ってくる
        }
    );

    // イベントハンドリングを停止
    domain.Unsubscribe(callbackId);
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RarityParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->RarityParameterStatus(
        "balance-0001", // parameterName
        "property-0001" // propertyId
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Enchant::Model::FRarityParameterStatus> value) {
            // 値が変化した時に呼び出される
            // value には変更後の値が渡ってくる
        }
    );

    // イベントハンドリングを停止
    Domain->Unsubscribe(CallbackId);

listRarityParameterStatuses

レアリティパラメーターの状態の一覧を取得

Request

有効化条件必須デフォルト値の制限説明
namespaceNamestring
~ 128文字ネームスペース名
parameterNamestring~ 128文字レアリティパラメーターモデル名
accessTokenstring
~ 128文字アクセストークン
pageTokenstring~ 1024文字データの取得を開始する位置を指定するトークン
limitint
301 ~ 1000データの取得件数

Result

説明
itemsList<EzRarityParameterStatus>レアリティパラメーターモデルのリスト
nextPageTokenstringリストの続きを取得するためのページトークン

実装例

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var items = await domain.RarityParameterStatusesAsync(
        parameterName: "rarity-0001"
    ).ToListAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.RarityParameterStatuses(
        parameterName: "rarity-0001"
    );
    List<EzRarityParameterStatus> items = new List<EzRarityParameterStatus>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    const auto It = Domain->RarityParameterStatuses(
        "rarity-0001" // parameterName
    );
    TArray<Gs2::UE5::Enchant::Model::FEzRarityParameterStatusPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
値の変更イベントハンドリング
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.SubscribeRarityParameterStatuses(
        () => {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    domain.UnsubscribeRarityParameterStatuses(callbackId);
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.RarityParameterStatuses(
        parameterName: "rarity-0001"
    );
    List<EzRarityParameterStatus> items = new List<EzRarityParameterStatus>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->SubscribeRarityParameterStatuses(
        []() {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    Domain->UnsubscribeRarityParameterStatuses(CallbackId);

verifyRarityParameterStatus

レアリティパラメーターに関する検証

Request

有効化条件必須デフォルト値の制限説明
namespaceNamestring
~ 128文字ネームスペース名
parameterNamestring
~ 128文字レアリティパラメーターモデル名
accessTokenstring
~ 128文字アクセストークン
propertyIdstring
~ 1024文字パラメーターの保有元リソースのプロパティID
verifyTypeenum {
  “havent”,
  “have”,
  “count”
}
~ 128文字検証の種類
parameterValueNamestring{verifyType} in [“havent”, “have”]
~ 64文字名前
parameterCountint{verifyType} in [“count”]
~ 10検証するパラメーターの数

verifyType に指定する列挙型の定義

定義説明
havent指定したパラメーターを保有していないこと
have指定したパラメーターを保有していること
count保有しているパラメーターの数が指定数であること

Result

説明
itemEzRarityParameterStatusレアリティパラメーターの状態

実装例

    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RarityParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    var result = await domain.VerifyRarityParameterStatusAsync(
        verifyType: "have",
        parameterValueName: "parameter-0001",
        parameterCount: 
    );
    var item = await result.ModelAsync();
    var domain = gs2.Enchant.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RarityParameterStatus(
        parameterName: "balance-0001",
        propertyId: "property-0001"
    );
    var future = domain.VerifyRarityParameterStatusFuture(
        verifyType: "have",
        parameterValueName: "parameter-0001",
        parameterCount: 
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    var future2 = future.Result.ModelFuture();
    yield return future2;
    if (future2.Error != null)
    {
        onError.Invoke(future2.Error, null);
        yield break;
    }
    var result = future2.Result;
    const auto Domain = Gs2->Enchant->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->RarityParameterStatus(
        "balance-0001", // parameterName
        "property-0001" // propertyId
    );
    const auto Future = Domain->VerifyRarityParameterStatus(
        "have", // verifyType
        "parameter-0001", // parameterValueName
         // parameterCount
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

    // obtain changed values / result values
    const auto Future2 = Future->GetTask().Result()->Model();
    Future2->StartSynchronousTask();
    if (Future2->GetTask().IsError())
    {
        return Future2->GetTask().Error();
    }
    const auto Result = Future2->GetTask().Result();