using System.Runtime.InteropServices; using Fantasy; using Fantasy.Async; using Fantasy.Network; namespace Hotfix; public static class GateComponentHelper { public static FTask<(uint error, GameAccount gameAccount)> LoginAccountGame(Session session,long accountId) { var scene = session.Scene; var gate = scene.GetComponent(); var gameAccountManage = gate.GetComponent(); if (gameAccountManage == null) { gameAccountManage.AddComponent(); } return gameAccountManage.LoginAccountGame(session,accountId); } public static GameAccountManageComponent GetGameAccountManageComponent(Scene scene) { return scene.GetComponent().GetComponent(); } public static async FTask Disconnect(Scene scene,long accountId,long timeout) { await scene.GetComponent().GetComponent().DisConnect(accountId,timeout); } public static async FTask UpdateAccountGameName(Scene scene, Session session, long accountId, string gameName) { return await scene.GetComponent().GetComponent().UpdateAccountGameName(session,accountId,gameName); } public static async FTask GetGameAccount(Scene scene,Session session,long accountId) { return await scene.GetComponent().GetComponent().GetGameAccount(session,accountId); } }