public override void Init() { SC = GetCom <SessionContainer>(); var lgMgr = GetCom <LoginManager>(); lgMgr.OnUserDisconnecting += OnUserDisconnected; UP = GetCom <UserPort>(); RedirectRoomMessage("AddBattleUnitAt"); RedirectRoomMessage("ConstructBuilding"); RedirectRoomMessage("ConstructCrystalMachine"); RedirectRoomMessage("ConstructAccessory"); RedirectRoomMessage("ReconstructBuilding"); RedirectRoomMessage("CancelBuilding"); RedirectRoomMessage("DropSoldierFromCarrier"); RedirectRoomMessage("AddBattleUnit4TestAnyway"); RedirectRoomMessage("AddBuildingUnit4TestAnyway"); RedirectRoomMessage("AddSoldierCarrierUnit4TestAnyway"); RedirectRoomMessage("DestroyBuilding"); UP.OnMessage("Surrender", OnSurrender); UP.OnRequest("GetReplayList", OnGetReplayList); UP.OnRequest("GetMyReplayList", OnGetMyReplayList); UP.OnRequest("GetReplay", OnGetReplay); Room4Server.LoadAllPVPReplays(); BattleLogger = GetCom <ServerBusinessLogger <BattleInfo> >(); }
// 初始化 public override void Init() { SC = GetCom <SessionContainer>(); UP = GetCom <UserPort>(); UC = GetCom <UserContainer>(); var nc = GetCom <NetCore>(); nc.OnDisconnected += OnDisconnected; UP.OnRequest("Login", OnUserLoginMsg); // 登录日志 SrvLogger = GetCom <ServerBusinessLogger <LoginInfo> >(); // 问卷 QRC = GetCom <QuestionnaireResultContainer>(); }