TPStashEvent.UseCurrency

public int UseCurrency(
    string player_uuid,
    string character_uuid,
    string currency_slug,
    float currency_quantity,
    [float? currency_total_quantity = null],
    [entity where_to_entity = entity.None],
    [string where_to_category_slug = null],
    [string where_to_slug = null]
);

説明

キャラクターの、ゲームの財貨使用のデータを収集します。ゲームで財貨の使用イベントが発生すると必ず呼び出されるメソッドであり、財貨の使用に関係している分析モデルに使用されます。

データのアップロードに成功した場合1をリターンし、成功できなかった場合には-1をリターンします。-1リターンとなった場合TentuPlay debug modeに設定されている状態でUnity Editorを使用している場合、Unity Editorコンソールから以下のメッセージが表示されます。

TPError||ERROR inserting table_name: exception_error_message

パラメータ

名前 説明 必須か

player_uuid

プレイヤーの固有ID

必須

character_uuid

プレイヤー内キャラクターの固有ID

ゲームにキャラクターがない、もしくはキャラクターではなくプレイヤーを示す場合にはTentuPlayKeyword._DUMMY_CHARACTER_ID_に設定します。

必須

currency_slug

財貨の固有識別子 例)「gold」、「diamond」、「crystal」など

必須

currency_quantity

使用した財貨の数・量

必須

currency_total_quantity

財貨を使用した後、所持している財貨の合計数・量

必須ではないが、財貨の所持状態をより正確に把握することができるため、非常におすすめ。

オプション

where_to_entity

財貨を使用した経路。どのような行動のために財貨を使用したのかを表す。

エンティティー
public enum entity {
    None,
    Etc,
    Join,
    LoginApp,
    LoginAsCharacter,
    InAppPurchase,
    ShopPurchase,
    Trade,
    WatchAd,
    PlayQuest,
    GetBonus,
    ChangeCharacterArchetype,
    ChangeStat,
    ChangeCustomAbility,
    PlayStage,
    GetCharacter,
    GetCurrency,
    GetInfrastructure,
    GetPet,
    GetToken,
    GetConsumable,
    GetMaterial,
    GetEquipment,
    GetCostume,
    GetRandomBox,
    UseCurrency,
    EquipInfrastructure,
    EquipPet,
    UseToken,
    UseConsumable,
    UseMaterial,
    EquipEquipment,
    EquipCostume,
    OpenRandomBox,
    EquipSkill,
    DismissCharacter,
    DismissInfrastructure,
    DismissPet,
    DismissToken,
    DismissConsumable,
    DismissMaterial,
    DismissEquipment,
    DismissCostume,
    DismissRandomBox,
    LevelUpCharacter,
    LevelUpInfrastructure,
    LevelUpPet,
    LevelUpConsumable,
    LevelUpMaterial,
    LevelUpEquipment,
    LevelUpCostume,
    LevelUpSkill,
    Deposit,
    Withdraw,
    FinishedTutorial,
}

オプション

where_to_category_slug

財貨を使用した経路に対するカテゴリー(大分類)名

オプション

where_to_slug

財貨を使用した経路に対する詳細

オプション