Eintoo/GameServer/Server/Hotfix/Outter/Gate/Helper/GateComponentHelper.cs

18 lines
502 B
C#

using Fantasy;
using Fantasy.Async;
namespace Hotfix;
public static class GateComponentHelper
{
public static FTask<(uint error, GameAccount gameAccount)> GetAccountGame(GateComponent gate,long accountId)
{
var gameAccountManage = gate.GetComponent<GameAccountManageComponent>();
if (gameAccountManage == null)
{
gameAccountManage.AddComponent<GameAccountManageComponent>();
}
return gameAccountManage.GetAccountGame(accountId);
}
}