using System; using ETModel; namespace ETHotfix { [MessageHandler(AppType.Manager)] public class C2M_ReloadHandler: AMRpcHandler { protected override async ETTask Run(Session session, C2M_Reload request, M2C_Reload response, Action reply) { if (request.Account != "panda" && request.Password != "panda") { Log.Error($"error reload account and password: {MongoHelper.ToJson(request)}"); return; } StartConfigComponent startConfigComponent = Game.Scene.GetComponent(); NetInnerComponent netInnerComponent = Game.Scene.GetComponent(); foreach (StartConfig startConfig in startConfigComponent.GetAll()) { InnerConfig innerConfig = startConfig.GetComponent(); Session serverSession = netInnerComponent.Get(innerConfig.IPEndPoint); await serverSession.Call(new M2A_Reload()); } reply(); } } }