Exemplo n.º 1
0
    private void OnRoleCreate(CUIEvent cuiEvent)
    {
        string roleName = CRoleRegisterView.RoleName;

        switch (Utility.CheckRoleName(roleName))
        {
        case Utility.NameResult.Vaild:
        {
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(1008u);
            cSPkg.stPkgData.get_stAcntRegisterReq().dwHeadId    = 2u;
            cSPkg.stPkgData.get_stAcntRegisterReq().szUserName  = Encoding.get_UTF8().GetBytes(roleName);
            cSPkg.stPkgData.get_stAcntRegisterReq().iRegChannel = Singleton <ApolloHelper> .GetInstance().GetChannelID();

            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, true);

            break;
        }

        case Utility.NameResult.Null:
            CRoleRegisterView.RoleName = string.Empty;
            Singleton <CUIManager> .get_instance().OpenTips("RoleRegister_InputName", true, 1.5f, null, new object[0]);

            break;

        case Utility.NameResult.OutOfLength:
            Singleton <CUIManager> .get_instance().OpenTips("RoleRegister_NameOutOfLength", true, 1.5f, null, new object[0]);

            break;

        case Utility.NameResult.InVaildChar:
            Singleton <CUIManager> .get_instance().OpenTips("RoleRegister_NameInvaildChar", true, 1.5f, null, new object[0]);

            break;
        }
    }
Exemplo n.º 2
0
        private void SendBuildingUpgradeReq(int buildingType)
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x8c3);

            msg.stPkgData.stGuildBuildingUpgradeReq.bBuildingType = (byte)buildingType;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, true);
        }
Exemplo n.º 3
0
        private void SendRejectRecommend(ulong uuid)
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x8bf);

            msg.stPkgData.stRejectGuildRecommend.ullPlayerUid = uuid;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, false);
        }
Exemplo n.º 4
0
        private void RequestGuildFireMember(ulong uid)
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x8cc);

            msg.stPkgData.stFireGuildMemberReq.ullUid = uid;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, false);
        }
Exemplo n.º 5
0
        private void RequestQuitGuild()
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x8b2);

            msg.stPkgData.stQuitGuildReq.bBlank = 0;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, false);
        }
Exemplo n.º 6
0
        private void InviteFriend(string name, ulong uuid)
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x8b5);

            msg.stPkgData.stGuildInviteReq.ullBeInviteUid = uuid;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, false);
        }
Exemplo n.º 7
0
        private void RequestChgGuildNotice(string bulletinText)
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x8e2);

            StringHelper.StringToUTF8Bytes(bulletinText, ref msg.stPkgData.stChgGuildNoticeReq.szNotice);
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, false);
        }
        public static void ReqRankListInfo(COM_APOLLO_TRANK_SCORE_TYPE rankType)
        {
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(2602u);

            cSPkg.stPkgData.get_stGetRankingListReq().bNumberType = rankType;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, true);
        }
Exemplo n.º 9
0
        public static void Send_Get_Level_Reward_Request(int level)
        {
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(1614u);

            cSPkg.stPkgData.get_stLevelRewardReq().iLevel = level;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, false);
        }
Exemplo n.º 10
0
        public static void Send_Serch_Player(string name)
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x4b4);

            msg.stPkgData.stFriendSearchPlayerReq.szUserName = Encoding.UTF8.GetBytes(name);
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, true);
        }
Exemplo n.º 11
0
        public static void ReqGetLicense(uint licenseId)
        {
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(1350u);

            cSPkg.stPkgData.get_stLicenseGetReq().dwLicenseID = licenseId;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, false);
        }
Exemplo n.º 12
0
        public static void Send_Invite_Friend_Game(int bReserve)
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x4be);

            msg.stPkgData.stFriendInviteGameReq.bReserve = (byte)bReserve;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, true);
        }
        public void SendMsgSurrender(byte bSurrender)
        {
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(4900u);

            cSPkg.stPkgData.stSurrenderReq.bSurrender = bSurrender;
            Singleton <NetworkModule> .GetInstance().SendGameMsg(ref cSPkg, 0u);
        }
Exemplo n.º 14
0
 public void Quit()
 {
     if (this._workMode == WorkMode.Observe)
     {
         if (this._isStreamEnd)
         {
             this.Stop();
         }
         else
         {
             CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x146e);
             msg.stPkgData.stQuitObserveReq.bReserve = 0;
             Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, false);
         }
     }
     else if (this._workMode == WorkMode.Judge)
     {
         CSPkg pkg2 = NetworkModule.CreateDefaultCSPKG(0x146e);
         pkg2.stPkgData.stQuitObserveReq.bReserve = 0;
         Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref pkg2, false);
     }
     else
     {
         this.Stop();
     }
 }
Exemplo n.º 15
0
        public static void SendReqQueryAcntDianQuan(CS_COUPONS_PAYTYPE payType = CS_COUPONS_PAYTYPE.CS_COUPONS_PAYTYPE_QUERY, bool isAlert = true)
        {
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(1150u);

            cSPkg.stPkgData.stAcntCouponsReq.bPayType = (byte)payType;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, isAlert);
        }
Exemplo n.º 16
0
        public void SendReqGetRankingAcountInfo()
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0xa2c);

            msg.stPkgData.stGetRankingAcntInfoReq.bNumberType = 8;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, false);
        }
Exemplo n.º 17
0
        public static void SendReqGetDianQuanReward(CS_COUPONS_PAYTYPE payType)
        {
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(1160u);

            cSPkg.stPkgData.stCouponsRewardReq.bPayType = (byte)payType;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, true);
        }
Exemplo n.º 18
0
        private void RequestBuyItem(byte buyIdx)
        {
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(1407u);

            cSPkg.stPkgData.stAkaliShopBuyReq.bBuyIdx = buyIdx;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, true);
        }
Exemplo n.º 19
0
        private void RequestChgGuildHeadIdReq(uint guildHeadId)
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x8e0);

            msg.stPkgData.stChgGuildHeadIDReq.dwHeadID = guildHeadId;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, false);
        }
        public static void Send_RESET_BURNING_PROGRESS_REQ(byte value)
        {
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(2704u);

            cSPkg.stPkgData.stResetBurningProgressReq.bDifficultType = value;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, true);
        }
Exemplo n.º 21
0
        private void RequestGetPlayerGuildRankInfo()
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0xa37);

            msg.stPkgData.stGetSpecialGuildRankInfoReq.bNumberType = 0x10;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, false);
        }
Exemplo n.º 22
0
        public static void RequestGetGuildRecruitReq(uint startTime)
        {
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(2289u);

            cSPkg.stPkgData.stGetGuildRecruitReq.dwStartTime = startTime;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, false);
        }
Exemplo n.º 23
0
        private void RequestGuildSettingModify(uint mask)
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x8a9);

            msg.stPkgData.stModifyGuildSettingReq.dwSettingMask = mask;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, false);
        }
Exemplo n.º 24
0
        public static void Send_Private_Chat(ulong ullUid, uint logicWorldId, string text)
        {
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(1300u);

            cSPkg.stPkgData.stChatReq.stChatMsg.bType = 2;
            cSPkg.stPkgData.stChatReq.stChatMsg.stContent.select(2L);
            cSPkg.stPkgData.stChatReq.stChatMsg.stContent.stPrivate.stTo.ullUid        = ullUid;
            cSPkg.stPkgData.stChatReq.stChatMsg.stContent.stPrivate.stTo.iLogicWorldID = (int)logicWorldId;
            COMDT_FRIEND_INFO gameOrSnsFriend = Singleton <CFriendContoller> .instance.model.GetGameOrSnsFriend(ullUid, logicWorldId);

            if (gameOrSnsFriend != null)
            {
                cSPkg.stPkgData.stChatReq.stChatMsg.stContent.stPrivate.stTo.szName  = gameOrSnsFriend.szUserName;
                cSPkg.stPkgData.stChatReq.stChatMsg.stContent.stPrivate.stTo.dwLevel = gameOrSnsFriend.dwLevel;
            }
            cSPkg.stPkgData.stChatReq.stChatMsg.stContent.stPrivate.szContent = UT.String2Bytes(text);
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, false);

            Debug.Log(string.Concat(new object[]
            {
                "--- send private chat, id:",
                ullUid,
                ",logicworldid:",
                logicWorldId,
                ",content:",
                text
            }));
        }
Exemplo n.º 25
0
        public void RequestRecommendList(int page)
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x8bd);

            msg.stPkgData.stGetGuildRecommendListReq.bPageId = (byte)page;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, false);
        }
        public void ReqUnlockTipsMask()
        {
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(1402u);

            cSPkg.stPkgData.stFuncUnlockReq.ullUnlockFlag = this.m_tipUnlockMask;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, false);
        }
Exemplo n.º 27
0
        private void SendRecommendReq(ulong uuid)
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x8ba);

            msg.stPkgData.stGuildRecommendReq.ullAcntUid = uuid;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, true);
        }
Exemplo n.º 28
0
        public static void SendReqWearRcmdSymbol(int pageIndex)
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x49c);

            msg.stPkgData.stSymbolRcmdWearReq.bSymbolPageIdx = (byte)pageIndex;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, true);
        }
Exemplo n.º 29
0
 public void Quit()
 {
     if (this._workMode == WatchController.WorkMode.Observe)
     {
         if (this._isStreamEnd)
         {
             this.Stop();
         }
         else
         {
             CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(5230u);
             cSPkg.stPkgData.get_stQuitObserveReq().bReserve = 0;
             Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, false);
         }
     }
     else if (this._workMode == WatchController.WorkMode.Judge)
     {
         CSPkg cSPkg2 = NetworkModule.CreateDefaultCSPKG(5230u);
         cSPkg2.stPkgData.get_stQuitObserveReq().bReserve = 0;
         Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg2, false);
     }
     else
     {
         this.Stop();
     }
 }
Exemplo n.º 30
0
        public static void Send_Get_Level_Reward_Request(int level)
        {
            CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x64e);

            msg.stPkgData.stLevelRewardReq.iLevel = level;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, false);
        }