feat(battle-engine): copy-loop closure to 3282 files (member-surface frontier)
This commit is contained in:
51
SVSim.BattleEngine/Engine/Cute/SteamMicroTxnInitTask.cs
Normal file
51
SVSim.BattleEngine/Engine/Cute/SteamMicroTxnInitTask.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using Steamworks;
|
||||
|
||||
namespace Cute;
|
||||
|
||||
public class SteamMicroTxnInitTask : NetworkTask
|
||||
{
|
||||
private class MicroTxtInitPost : PostParams
|
||||
{
|
||||
public new string steam_id = "";
|
||||
|
||||
public string app_id = "";
|
||||
|
||||
public string currency = "";
|
||||
|
||||
public string ip_address = "";
|
||||
|
||||
public string item_id = "";
|
||||
}
|
||||
|
||||
private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.SteamMicroTxnInit;
|
||||
|
||||
public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}";
|
||||
|
||||
public void SetParameter(string item_id)
|
||||
{
|
||||
MicroTxtInitPost microTxtInitPost = new MicroTxtInitPost();
|
||||
try
|
||||
{
|
||||
microTxtInitPost.steam_id = SteamUser.GetSteamID().ToString();
|
||||
microTxtInitPost.app_id = SteamUtils.GetAppID().ToString();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogError(ex.Message);
|
||||
Debug.LogError(ex.StackTrace);
|
||||
Debug.LogError("steam client を起動してください。");
|
||||
}
|
||||
microTxtInitPost.currency = PCPlatformSTEAM.Currency;
|
||||
microTxtInitPost.ip_address = Toolbox.DeviceManager.GetIpAddress();
|
||||
microTxtInitPost.item_id = item_id;
|
||||
base.Params = microTxtInitPost;
|
||||
}
|
||||
|
||||
protected override int Parse()
|
||||
{
|
||||
int result = base.Parse();
|
||||
_ = 1;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user