TPStashEvent.GetCurrency
public int GetCurrency(
string player_uuid,
string character_uuid,
string currency_slug,
float currency_quantity,
[float? currency_total_quantity = null],
[entity from_entity = entity.None],
[string from_category_slug = null],
[string from_slug = null]
);
Description
GetCurrency collects the data of the character’s acquisition of in-game currency. It needs to be called when an event of currency acquisition occurs in the middle of the game. It can be used for the analysis of personas about currency acquisition.
It returns 1 for success and -1 for failure. If -1 is returned, you can see the following message in the Unity editor console in TentuPlay debug mode:
|
Parameters
Name | Description | Required | ||
---|---|---|---|---|
player_uuid |
Player’s unique ID (not a character’s ID) such as Steam user ID and Google Play user ID |
Required |
||
character_uuid |
Player’s character’s unique lD
|
Required |
||
currency_slug |
Unique identifier of currency such as "gold", "diamond", and "crystal" |
Required |
||
currency_quantity |
The number or amount of currency acquired |
Required |
||
currency_total_quantity |
The total number or amount of currency after currency acquisition
|
Optional |
||
from_entity |
The action that causes the player to gain the currency. Entities
|
Optional |
||
from_category_slug |
The category of place, source, or situation from which the player gets the currency |
Optional |
||
from_slug |
The name of place, source, or situation from which the player gets the currency |
Optional |