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

モデル

EzComplete

ミッションの達成状況

必須デフォルト値の制限説明
missionGroupNamestring~ 128文字ミッショングループ名
completedMissionTaskNamesList<string>[]~ 1000 items達成済みのタスク名リスト
receivedMissionTaskNamesList<string>[]~ 1000 items報酬の受け取り済みのタスク名リスト

EzCounterScopeModel

カウンターリセットタイミングモデル

必須デフォルト値の制限説明
resetTypeenum [
“notReset”,
“daily”,
“weekly”,
“monthly”
]
~ 128文字リセットタイミング
resetDayOfMonthint{resetType} == “monthly”1 ~ 31リセットをする日にち(月の日数を超える場合は、最終日として扱われます)
resetDayOfWeekenum [
“sunday”,
“monday”,
“tuesday”,
“wednesday”,
“thursday”,
“friday”,
“saturday”
]
{resetType} == “weekly”~ 128文字リセットする曜日
resetHourint{resetType} in [“monthly”, “weekly”, “daily”]~ 23リセット時刻

EzConfig

コンフィグ設定

スタンプシートの変数に適用する設定値

必須デフォルト値の制限説明
keystring~ 64文字名前
valuestring~ 51200文字

EzAcquireAction

入手アクション

必須デフォルト値の制限説明
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:UnlockIncrementalExchangeByUserId",
"Gs2Exchange:CreateAwaitByUserId",
"Gs2Exchange:SkipByUserId",
"Gs2Experience:AddExperienceByUserId",
"Gs2Experience:SetExperienceByUserId",
"Gs2Experience:AddRankCapByUserId",
"Gs2Experience:SetRankCapByUserId",
"Gs2Experience:MultiplyAcquireActionsByUserId",
"Gs2Formation:AddMoldCapacityByUserId",
"Gs2Formation:SetMoldCapacityByUserId",
"Gs2Formation:AcquireActionsToFormProperties",
"Gs2Formation:SetFormByUserId",
"Gs2Formation:AcquireActionsToPropertyFormProperties",
"Gs2Grade:AddGradeByUserId",
"Gs2Grade:ApplyRankCapByUserId",
"Gs2Grade:MultiplyAcquireActionsByUserId",
"Gs2Idle:IncreaseMaximumIdleMinutesByUserId",
"Gs2Idle:SetMaximumIdleMinutesByUserId",
"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",
"Gs2Quest:CreateProgressByUserId",
"Gs2Schedule:TriggerByUserId",
"Gs2SerialKey:RevertUseByUserId",
"Gs2Showcase:DecrementPurchaseCountByUserId",
"Gs2Showcase:ForceReDrawByUserId",
"Gs2SkillTree:MarkReleaseByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
"Gs2Stamina:RaiseMaxValueByUserId",
"Gs2Stamina:SetMaxValueByUserId",
"Gs2Stamina:SetRecoverIntervalByUserId",
"Gs2Stamina:SetRecoverValueByUserId",
"Gs2StateMachine:StartStateMachineByUserId",
]
~ 128文字スタンプシートを使用して実行するアクションの種類
requeststring~ 1048576文字リクエストのJSON

EzCounter

カウンター

カウンターはミッションの進行状況をゲームプレイヤー毎に保持するエンティティです。 カウンターの値は関連付けられたタスクの期間ごとに集計されます。

そのため、1つのカウンターは複数の値を持ちます。 例えば、クエストのクリア回数カウンターであれば、今月のクリア回数、今週のクリア回数、今日のクリア回数。といった具合です。

必須デフォルト値の制限説明
namestring~ 128文字カウンター名
valuesList<EzScopedValue>~ 32 items

EzCounterModel

カウンターモデル

カウンターモデルはミッションタスクの達成条件に設定可能なエンティティです。 カウンターの値は複数のミッショングループから参照可能なため、1つのカウンターでウィークリーミッションとデイリーミッションといった複数のミッショングループの達成条件に設定ができます。

必須デフォルト値の制限説明
namestring~ 128文字カウンター名
metadatastring~ 1024文字メタデータ
scopesList<EzCounterScopeModel>[]1 ~ 100 itemsカウンターのリセットタイミングリスト
challengePeriodEventIdstring~ 1024文字カウンターの操作が可能な期間を設定した GS2-Schedule イベントGRN

EzMissionGroupModel

ミッショングループモデル

ミッショングループはカウンターのリセットタイミングでタスクをグルーピングするエンティティです。 たとえば、デイリーミッションで1つのグループ。ウィークリーミッションで1つのグループとなります。

必須デフォルト値の制限説明
namestring~ 128文字ミッショングループ名
metadatastring~ 1024文字メタデータ
tasksList<EzMissionTaskModel>~ 1000 itemsミッションタスクリスト
resetTypeenum [
“notReset”,
“daily”,
“weekly”,
“monthly”
]
“notReset”~ 128文字リセットタイミング
resetDayOfMonthint{resetType} == “monthly”1 ~ 31リセットをする日にち(月の日数を超える場合は、最終日として扱われます)
resetDayOfWeekenum [
“sunday”,
“monday”,
“tuesday”,
“wednesday”,
“thursday”,
“friday”,
“saturday”
]
{resetType} == “weekly”~ 128文字リセットする曜日
resetHourint{resetType} in [“monthly”, “weekly”, “daily”]~ 23リセット時刻
completeNotificationNamespaceIdstring~ 1024文字ネームスペースGRN

EzMissionTaskModel

ミッションタスクモデル

ミッションタスクは関連付けたカウンターの値が一定を超えたら報酬が貰える条件を定義するエンティティです。

必須デフォルト値の制限説明
namestring~ 128文字タスク名
metadatastring~ 1024文字メタデータ
counterNamestring~ 128文字カウンター名
targetResetTypeenum [
“notReset”,
“daily”,
“weekly”,
“monthly”
]
~ 128文字目標リセットタイミング
targetValuelong1 ~ 9223372036854775805目標値
completeAcquireActionsList<EzAcquireAction>[]~ 100 itemsミッション達成時の報酬
challengePeriodEventIdstring~ 1024文字報酬が受け取り可能な期間を設定した GS2-Schedule イベントGRN
premiseMissionTaskNamestring~ 128文字このタスクに挑戦するために達成しておく必要のあるタスクの名前

EzScopedValue

リセットタイミング

必須デフォルト値の制限説明
resetTypeenum [
“notReset”,
“daily”,
“weekly”,
“monthly”
]
~ 128文字リセットタイミング
valuelong0~ 9223372036854775805カウント

メソッド

getComplete

ミッショングループを指定して達成したミッションを取得

Request

必須デフォルト値の制限説明
namespaceNamestring~ 32文字ネームスペース名
missionGroupNamestring~ 128文字ミッショングループ名
accessTokenstring~ 128文字ユーザーID

Result

説明
itemEzComplete達成状況

実装例

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

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

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

listCompletes

達成したミッションの一覧を取得

Request

必須デフォルト値の制限説明
namespaceNamestring~ 32文字ネームスペース名
accessTokenstring~ 128文字ユーザーID
pageTokenstring~ 1024文字データの取得を開始する位置を指定するトークン
limitint301 ~ 1000データの取得件数

Result

説明
itemsList<EzComplete>達成状況のリスト
nextPageTokenstringリストの続きを取得するためのページトークン

実装例

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var items = await domain.CompletesAsync(
    ).ToListAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.Completes(
    );
    List<EzComplete> items = new List<EzComplete>();
    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->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    const auto It = Domain->Completes(
    );
    TArray<Gs2::UE5::Mission::Model::FEzCompletePtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
値の変更イベントハンドリング
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.SubscribeCompletes(
        () => {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    domain.UnsubscribeCompletes(callbackId);
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.Completes(
    );
    List<EzComplete> items = new List<EzComplete>();
    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->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->SubscribeCompletes(
        []() {
            // リストの要素が変化した時に呼び出される
        }
    );

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

receiveRewards

ミッションの達成報酬を取得

Request

必須デフォルト値の制限説明
namespaceNamestring~ 32文字ネームスペース名
missionGroupNamestring~ 128文字ミッショングループ名
missionTaskNamestring~ 128文字タスク名
accessTokenstring~ 128文字ユーザーID

Result

説明
transactionIdstring発行されたスタンプシートのトランザクションID
stampSheetstringミッションの達成報酬を受領するスタンプシート
stampSheetEncryptionKeyIdstringスタンプシートの署名計算に使用した暗号鍵GRN
autoRunStampSheetboolスタンプシートの自動実行が有効か

実装例

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Complete(
        missionGroupName: "mission-group-0001"
    );
    var result = await domain.ReceiveRewardsAsync(
        missionTaskName: "mission-task-0001"
    );
    // New Experience ではスタンプシートはSDKレベルで自動的に実行されます。
    // エラーが発生すると TransactionException がスローされます。
    // TransactionException::Retry() でリトライが可能です。
    // In New Experience, stamp sheets are automatically executed at the SDK level.
    // If an error occurs, a TransactionException is thrown.
    // you can retry with TransactionException::Retry().
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Complete(
        missionGroupName: "mission-group-0001"
    );
    var future = domain.ReceiveRewardsFuture(
        missionTaskName: "mission-task-0001"
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    // New Experience ではスタンプシートはSDKレベルで自動的に実行されます。
    // エラーが発生すると TransactionException がスローされます。
    // TransactionException::Retry() でリトライが可能です。
    // In New Experience, stamp sheets are automatically executed at the SDK level.
    // If an error occurs, a TransactionException is thrown.
    // you can retry with TransactionException::Retry().
    const auto Domain = Gs2->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Complete(
        "mission-group-0001" // missionGroupName
    );
    const auto Future = Domain->ReceiveRewards(
        "mission-task-0001" // missionTaskName
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

getCounter

ミッショングループを指定して達成したミッションを取得

Request

必須デフォルト値の制限説明
namespaceNamestring~ 32文字ネームスペース名
accessTokenstring~ 128文字ユーザーID
counterNamestring~ 128文字カウンター名

Result

説明
itemEzCounterカウンター

実装例

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

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

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

listCounters

達成したミッションの一覧を取得

Request

必須デフォルト値の制限説明
namespaceNamestring~ 32文字ネームスペース名
accessTokenstring~ 128文字ユーザーID
pageTokenstring~ 1024文字データの取得を開始する位置を指定するトークン
limitint301 ~ 1000データの取得件数

Result

説明
itemsList<EzCounter>カウンターのリスト
nextPageTokenstringリストの続きを取得するためのページトークン

実装例

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var items = await domain.CountersAsync(
    ).ToListAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.Counters(
    );
    List<EzCounter> items = new List<EzCounter>();
    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->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    const auto It = Domain->Counters(
    );
    TArray<Gs2::UE5::Mission::Model::FEzCounterPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
値の変更イベントハンドリング
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.SubscribeCounters(
        () => {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    domain.UnsubscribeCounters(callbackId);
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.Counters(
    );
    List<EzCounter> items = new List<EzCounter>();
    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->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->SubscribeCounters(
        []() {
            // リストの要素が変化した時に呼び出される
        }
    );

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

getCounterModel

カウンターモデルを取得

Request

必須デフォルト値の制限説明
namespaceNamestring~ 32文字ネームスペース名
counterNamestring~ 128文字カウンター名

Result

説明
itemEzCounterModelカウンターモデル

実装例

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

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

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

listCounterModels

カウンターモデルの一覧を取得

Request

必須デフォルト値の制限説明
namespaceNamestring~ 32文字ネームスペース名

Result

説明
itemsList<EzCounterModel>カウンターモデルのリスト

実装例

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    var items = await domain.CounterModelsAsync(
    ).ToListAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    var it = domain.CounterModels(
    );
    List<EzCounterModel> items = new List<EzCounterModel>();
    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->Mission->Namespace(
        "namespace-0001" // namespaceName
    );
    const auto It = Domain->CounterModels(
    );
    TArray<Gs2::UE5::Mission::Model::FEzCounterModelPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
値の変更イベントハンドリング
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.SubscribeCounterModels(
        () => {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    domain.UnsubscribeCounterModels(callbackId);
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    var it = domain.CounterModels(
    );
    List<EzCounterModel> items = new List<EzCounterModel>();
    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->Mission->Namespace(
        "namespace-0001" // namespaceName
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->SubscribeCounterModels(
        []() {
            // リストの要素が変化した時に呼び出される
        }
    );

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

getMissionGroupModel

ミッショングループ名を指定してミッショングループモデルを取得

Request

必須デフォルト値の制限説明
namespaceNamestring~ 32文字ネームスペース名
missionGroupNamestring~ 128文字ミッショングループ名

Result

説明
itemEzMissionGroupModelミッショングループモデル

実装例

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

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

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

listMissionGroupModels

ミッショングループモデルの一覧を取得

Request

必須デフォルト値の制限説明
namespaceNamestring~ 32文字ネームスペース名

Result

説明
itemsList<EzMissionGroupModel>ミッショングループモデルのリスト

実装例

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    var items = await domain.MissionGroupModelsAsync(
    ).ToListAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    var it = domain.MissionGroupModels(
    );
    List<EzMissionGroupModel> items = new List<EzMissionGroupModel>();
    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->Mission->Namespace(
        "namespace-0001" // namespaceName
    );
    const auto It = Domain->MissionGroupModels(
    );
    TArray<Gs2::UE5::Mission::Model::FEzMissionGroupModelPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
値の変更イベントハンドリング
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.SubscribeMissionGroupModels(
        () => {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    domain.UnsubscribeMissionGroupModels(callbackId);
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    );
    var it = domain.MissionGroupModels(
    );
    List<EzMissionGroupModel> items = new List<EzMissionGroupModel>();
    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->Mission->Namespace(
        "namespace-0001" // namespaceName
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->SubscribeMissionGroupModels(
        []() {
            // リストの要素が変化した時に呼び出される
        }
    );

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

getMissionTaskModel

ミッションタスク名を指定してミッションタスクモデルを取得

Request

必須デフォルト値の制限説明
namespaceNamestring~ 32文字ネームスペース名
missionGroupNamestring~ 128文字ミッショングループ名
missionTaskNamestring~ 128文字タスク名

Result

説明
itemEzMissionTaskModelミッションタスクモデル

実装例

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

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

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

listMissionTaskModels

ミッションタスクモデルの一覧を取得

Request

必須デフォルト値の制限説明
namespaceNamestring~ 32文字ネームスペース名
missionGroupNamestring~ 128文字ミッショングループ名

Result

説明
itemsList<EzMissionTaskModel>ミッションタスクモデルのリスト

実装例

    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    );
    var items = await domain.MissionTaskModelsAsync(
    ).ToListAsync();
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    );
    var it = domain.MissionTaskModels(
    );
    List<EzMissionTaskModel> items = new List<EzMissionTaskModel>();
    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->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->MissionGroupModel(
        "mission-group-0001" // missionGroupName
    );
    const auto It = Domain->MissionTaskModels(
    );
    TArray<Gs2::UE5::Mission::Model::FEzMissionTaskModelPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
値の変更イベントハンドリング
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.SubscribeMissionTaskModels(
        () => {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    domain.UnsubscribeMissionTaskModels(callbackId);
    var domain = gs2.Mission.Namespace(
        namespaceName: "namespace-0001"
    ).MissionGroupModel(
        missionGroupName: "mission-group-0001"
    );
    var it = domain.MissionTaskModels(
    );
    List<EzMissionTaskModel> items = new List<EzMissionTaskModel>();
    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->Mission->Namespace(
        "namespace-0001" // namespaceName
    )->MissionGroupModel(
        "mission-group-0001" // missionGroupName
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->SubscribeMissionTaskModels(
        []() {
            // リストの要素が変化した時に呼び出される
        }
    );

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

イベントハンドラ

OnCompleteNotification

ミッションのタスクを達成したときに使用する通知

名前説明
namespaceNamestringネームスペース名
groupNamestringミッショングループ名
userIdstringユーザーID
taskNamestringミッションタスク名

実装例

    gs2.Mission.OnCompleteNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var groupName = notification.GroupName;
        var userId = notification.UserId;
        var taskName = notification.TaskName;
    };
    gs2.Mission.OnCompleteNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var groupName = notification.GroupName;
        var userId = notification.UserId;
        var taskName = notification.TaskName;
    };
    Gs2->Mission->OnCompleteNotification().AddLambda([](const auto Notification)
    {
        const auto NamespaceName = Notification->NamespaceNameValue;
        const auto GroupName = Notification->GroupNameValue;
        const auto UserId = Notification->UserIdValue;
        const auto TaskName = Notification->TaskNameValue;
    });