Beispiel #1
0
        /**切换场景请求返回**/

        private void Fun_4_1(INetData data)
        {
            var mapSwitchMsg = new MapSwitchMsg_4_1();

            mapSwitchMsg.read(data.GetMemoryStream());
            if (mapSwitchMsg.code == 0)
            {
                Log.debug(this, "-Fun_4_1 切换场景请求通过");
                Singleton <MapMode> .Instance.ApplySceneInfo();

                if (MeVo.instance.mapId == MapTypeConst.GoldHit_MAP) //若为击石成金副本
                {
                    Singleton <GoldHitControl> .Instance.OpenMainView();
                }
            }
            else
            {
                Log.info(this, "进入场景失败,关闭进度条");
//                Singleton<StartLoadingView>.Instance.CloseView();
                ErrorCodeManager.ShowError(mapSwitchMsg.code);
                if (mapSwitchMsg.code == 404)
                {
                    //Log.info(this, "该场景不可进入,切换到主城");
                    //Singleton<MapMode>.Instance.changeScene(MapTypeConst.MajorCity, false, 5, 1.8f);
                }
            }
        }
Beispiel #2
0
        //私聊请求聊天返回
        private void Fun_10_2(INetData data)
        {
            ChatPrivateChatMsg_10_2 privateChatReqMsg_10_2 = new ChatPrivateChatMsg_10_2();

            privateChatReqMsg_10_2.read(data.GetMemoryStream());

            if (privateChatReqMsg_10_2.code != 0)
            {
                ErrorCodeManager.ShowError(privateChatReqMsg_10_2.code);
                return;
            }
//			Singleton<ChatMode>.Instance.ReciveNameSL = privateChatReqMsg_10_2.roleName;

            ChatVo newMSg = new ChatVo();

            newMSg.chatType   = 7;
            newMSg.senderId   = MeVo.instance.Id;
            newMSg.serverId   = (ushort)MeVo.instance.serverId;
            newMSg.senderName = MeVo.instance.Name;
            newMSg.senderSex  = MeVo.instance.sex;
            newMSg.senderJob  = MeVo.instance.job;
            newMSg.senderLvl  = (byte)MeVo.instance.Level;
            newMSg.senderVip  = MeVo.instance.vip;
            newMSg.content    = Singleton <ChatView> .Instance.sendMessage.content;
//			updateChatVO.goods = Singleton<ChatMode>.Instance.goods.Count > 0?Singleton<ChatMode>.Instance.goods[0]:null;
            newMSg.nationId = MeVo.instance.nation;

            Singleton <ChatMode> .Instance.AddChatMsg(newMSg);

            Singleton <ChatMode> .Instance.UpdateMainChatContent(newMSg.senderName, newMSg.chatType, newMSg.content);

            Singleton <ChatView> .Instance.msgInput.value = "";
        }
Beispiel #3
0
        private void Fun_14_1(INetData data)
        {
            SmeltStrenMsg_14_1 message = new SmeltStrenMsg_14_1();

            message.read(data.GetMemoryStream());

            if (message.code == 0)
            {
                if (message.result == 0)
                {
                    MessageManager.Show("强化成功");
                }
                else
                {
                    MessageManager.Show("强化失败");
                }
                Singleton <Equip1Mode> .Instance.UpdateEquipStren(message.result);
            }
            else
            {
                ErrorCodeManager.ShowError(message.code);
                //失败直接请求
            }

            Log.info(this, "Fun_14_1");
        }
 //更新领取奖励信息
 public void UpdateAward(GiftGetLoginGiftMsg_29_1 msg)
 {
     if (msg.code != 0)
     {
         ErrorCodeManager.ShowError(msg.code);
         return;
     }
     MessageManager.Show(LanguageManager.GetWord("LoginAward.AwardSuccess"));
     DataUpdate(UPDATE_GET_AWARD);
 }
 //更新领取激活码
 public void UpdateActivationCode(GiftGetMsg_29_2 msg)
 {
     if (msg.code != 0)
     {
         ErrorCodeManager.ShowError(msg.code);
         return;
     }
     MessageManager.Show(LanguageManager.GetWord("LoginAwardMode.codeSuccess"));
     DataUpdate(UPDATE_CODE_SUCCESS);
 }
Beispiel #6
0
        private void ReceivePetExpItem(INetData data)
        {
            PetExpUpMsg_21_10 msg = new PetExpUpMsg_21_10();

            msg.read(data.GetMemoryStream());
            if (msg.code != 0)
            {
                ErrorCodeManager.ShowError(msg.code);
            }
        }
Beispiel #7
0
        private void ReceivePetFigth(INetData data)
        {
            PetStateMsg_21_2 msg = new PetStateMsg_21_2();

            msg.read(data.GetMemoryStream());
            if (msg.code != 0)
            {
                ErrorCodeManager.ShowError(msg.code);
            }
        }
Beispiel #8
0
        private void ReceiveBuySkillPointInfo(INetData data)
        {
            PetBuySkillPointMsg_21_9 msg = new PetBuySkillPointMsg_21_9();

            msg.read(data.GetMemoryStream());
            if (msg.code != 0)
            {
                ErrorCodeManager.ShowError(msg.code);
            }
        }
Beispiel #9
0
        private void ReceivePetWearEquip(INetData data)
        {
            PetEquipOnMsg_24_1 msg = new PetEquipOnMsg_24_1();

            msg.read(data.GetMemoryStream());
            if (msg.code != 0)
            {
                ErrorCodeManager.ShowError(msg.code);
            }
        }
Beispiel #10
0
        private void ReceivePetSkillUpgrade(INetData data)
        {
            PetSkillUpgradeMsg_21_5 msg = new PetSkillUpgradeMsg_21_5();

            msg.read(data.GetMemoryStream());
            if (msg.code != 0)
            {
                ErrorCodeManager.ShowError(msg.code);
            }
        }
Beispiel #11
0
        //发送客户端信息返回
        private void Fun_1_6(INetData data)
        {
            var msg = new LoginClientInfoMsg_1_6();

            msg.read(data.GetMemoryStream());
            if (msg.code != 0)
            {
                ErrorCodeManager.ShowError(msg.code);
            }
        }
Beispiel #12
0
        /// <summary>
        ///     接受任务返回
        /// </summary>
        /// <param name="data"></param>
        private void Fun_6_2(INetData data)
        {
            _curTaskAccetpInfo = new TaskAcceptMsg_6_2();
            _curTaskAccetpInfo.read(data.GetMemoryStream());
            if (_curTaskAccetpInfo.code != 0)
            {
                ErrorCodeManager.ShowError(_curTaskAccetpInfo.code);
                return;
            }
            SysTask sysTaskVo = BaseDataMgr.instance.GetSysTaskVo(_curTaskAccetpInfo.taskId);

            if (_curTaskAccetpInfo.taskId == _taskMode.CurrentMainTaskVo.TaskId) //更新主线任务状态
            {
                TaskVo taskVo = _taskMode.CurrentMainTaskVo;
                taskVo.Statu                = TaskStatu.StatuAccepted;
                taskVo.CanCommit            = _curTaskAccetpInfo.state == 1;
                _taskMode.CurrentMainTaskVo = taskVo;
            }
            else if (sysTaskVo.type == TaskModel.TypeSub)
            {
                if (_taskMode.CurrentSubTaskVo == null)
                {
                    var taskVo = new TaskVo();
                    taskVo.TaskId              = _curTaskAccetpInfo.taskId;
                    taskVo.SysTaskVo           = sysTaskVo;
                    taskVo.Statu               = TaskStatu.StatuAccepted;
                    taskVo.CanCommit           = _curTaskAccetpInfo.state == 1;
                    _taskMode.CurrentSubTaskVo = taskVo;
                    Singleton <WantedTaskView> .Instance.CloseView();
                }
                else if (_curTaskAccetpInfo.taskId == _taskMode.CurrentSubTaskVo.TaskId)
                {
                    TaskVo taskVo = _taskMode.CurrentSubTaskVo;
                    taskVo.Statu               = TaskStatu.StatuAccepted;
                    taskVo.CanCommit           = _curTaskAccetpInfo.state == 1;
                    _taskMode.CurrentSubTaskVo = taskVo;
                }
            }
            Vector3 position = AppMap.Instance.me.GoBase.transform.position;

            position.y = position.y + 2.5f;
            EffectMgr.Instance.CreateMainEffect(EffectId.Main_TaskReceive, position);
            //播放接受任务音效
            SoundMgr.Instance.PlayUIAudio(SoundId.Sound_ReceieTask);

            if (StoryControl.Instance.PlayReceiveTaskStory(_curTaskAccetpInfo.taskId, ReceiveTaskStoryCallback))
            {
                _receiveTaskStoryPlaying = true;
                Singleton <MainView> .Instance.CloseView();
            }
            else
            {
                GuideManager.Instance.TriggerGuide(_curTaskAccetpInfo.taskId, 1); //检查是否会触发指引
            }
        }
Beispiel #13
0
        //重置技能返回
        private void GetSkillResetInfo_13_7(INetData data)
        {
            SkillResetMsg_13_7 skillInfo = new SkillResetMsg_13_7();

            skillInfo.read(data.GetMemoryStream());
            Log.info(this, "GetSkillResetInfo_13_7:" + skillInfo.code);
            if (skillInfo.code != 0)
            {
                ErrorCodeManager.ShowError(skillInfo.code);
            }
        }
        //推送邀请应答
        private void Fun_26_12(INetData data)
        {
            WoodsReplyInviteMsg_26_12 replyInviteMsg = new WoodsReplyInviteMsg_26_12();

            replyInviteMsg.read(data.GetMemoryStream());

            if (0 != replyInviteMsg.code)
            {
                ErrorCodeManager.ShowError(replyInviteMsg.code);
            }
        }
        //开始冒险
        private void Fun_26_14(INetData data)
        {
            WoodsStartAdvenMsg_26_14 startAdvenMsg = new WoodsStartAdvenMsg_26_14();

            startAdvenMsg.read(data.GetMemoryStream());

            if (0 != startAdvenMsg.code)
            {
                ErrorCodeManager.ShowError(startAdvenMsg.code);
            }
        }
        //邀请协助者
        private void Fun_26_11(INetData data)
        {
            WoodsInviteAssistMsg_26_11 inviteAssistMsg = new WoodsInviteAssistMsg_26_11();

            inviteAssistMsg.read(data.GetMemoryStream());

            if (0 != inviteAssistMsg.code)
            {
                ErrorCodeManager.ShowError(inviteAssistMsg.code);
            }
        }
Beispiel #17
0
        private void Fun_18_1(INetData data)
        {
            var deedInfo = new DeedInfoMsg_18_1();

            deedInfo.read(data.GetMemoryStream());
            if (deedInfo.code != 0)
            {
                ErrorCodeManager.ShowError(deedInfo.code);
                return;
            }
            _deedMode.UpdateDeedInfo(deedInfo.id, deedInfo.count);
        }
Beispiel #18
0
        //非私聊请求聊天返回
        private void Fun_10_1(INetData data)
        {
            ChatReqMsg_10_1 chatReqMsg_10_1 = new ChatReqMsg_10_1();

            chatReqMsg_10_1.read(data.GetMemoryStream());
            if (chatReqMsg_10_1.code != 0)
            {
                ErrorCodeManager.ShowError(chatReqMsg_10_1.code);
                return;
            }
            Singleton <ChatView> .Instance.msgInput.value = "";
        }
Beispiel #19
0
        //领取奖励的返回
        private void Fun_32_2(INetData data)
        {
            VipGetRewardMsg_32_2 vipGetRewardMsg_32_2 = new VipGetRewardMsg_32_2();

            vipGetRewardMsg_32_2.read(data.GetMemoryStream());
            if (vipGetRewardMsg_32_2.code != 0)
            {
                ErrorCodeManager.ShowError(vipGetRewardMsg_32_2.code);
                return;
            }
            Singleton <VIPMode> .Instance.UpdateVIPAward();          //表示领取成功
        }
Beispiel #20
0
        //获取某封邮件详细信息
        private void Fun_12_2(INetData data)
        {
            MailGetInfoMsg_12_2 infoMsg = new MailGetInfoMsg_12_2();

            infoMsg.read(data.GetMemoryStream());
            if (infoMsg.code != 0)
            {
                ErrorCodeManager.ShowError(infoMsg.code);
                return;
            }
            mailMode.CheckCurrentMailInfo(infoMsg);
        }
Beispiel #21
0
        //副本暂停协议返回
        public void Fun_8_6(INetData data)
        {
            Log.info(this, "8-6协议返回副本暂停信息");
            DungeonPauseMsg_8_6 dungeonPauseMsg = new DungeonPauseMsg_8_6();

            dungeonPauseMsg.read(data.GetMemoryStream());
            if (dungeonPauseMsg.code != 0)
            {
                ErrorCodeManager.ShowError(dungeonPauseMsg.code);
            }
            //Singleton<MapControl>.Instance.ChangeDungeonLeftTime(dungeonInfoMsg.expire);
        }
Beispiel #22
0
        //新邮件通知
        private void Fun_12_6(INetData data)
        {
            MailNewMailInformMsg_12_6 mailInfoMsg = new MailNewMailInformMsg_12_6();

            mailInfoMsg.read(data.GetMemoryStream());
            if (mailInfoMsg.code != 0)
            {
                ErrorCodeManager.ShowError(mailInfoMsg.code);
                return;
            }
            mailMode.SetNewUnreadMail(mailInfoMsg.mailCount);
        }
 private void Fun_25_4(INetData data)
 {
     WandDrawMsg_25_4 message = new WandDrawMsg_25_4();
     message.read(data.GetMemoryStream());
     if (message.code != 0)
     {
         ErrorCodeManager.ShowError(message.code);
         return;
     }
     Singleton<LuckWandMode>.Instance.UpdateWandDraw();
     Log.info(this, "Fun_25_4 ");
 }
Beispiel #24
0
        //购买体力错误码返回
        private void Fun_3_40(INetData data)
        {
            var roleVigourBuyMsg = new RoleVigourBuyMsg_3_40();

            roleVigourBuyMsg.read(data.GetMemoryStream());
            Log.info(this, "体力购买错误码: " + roleVigourBuyMsg.code + "购买方式:" + roleVigourBuyMsg.type);

            //显示错误信息
            if (roleVigourBuyMsg.code > 0)
            {
                ErrorCodeManager.ShowError(roleVigourBuyMsg.code);
            }
        }
Beispiel #25
0
        ///// <summary>
        ///// 退出副本的协议返回
        ///// </summary>
        ///// <param name="data"></param>
        ///// <returns></returns>
        //public void Fun_8_4(INetData data)
        //{
        //    Log.debug(this, "服务器返回退出副本的协议");
        //    DungeonLeaveMsg_8_4 dungeonLeaveMsg_8_4 = new DungeonLeaveMsg_8_4();
        //    dungeonLeaveMsg_8_4.read(data.GetMemoryStream());
        //    if(dungeonLeaveMsg_8_4.code != 0 )
        //    {
        //        ErrorCodeManager.ShowError(dungeonLeaveMsg_8_4.code);
        //    }
        //}


        //副本继续协议返回
        public void Fun_8_7(INetData data)
        {
            DungeonResumeMsg_8_7 dungeonResumeMsg = new DungeonResumeMsg_8_7();

            dungeonResumeMsg.read(data.GetMemoryStream());
            if (dungeonResumeMsg.code != 0)
            {
                ErrorCodeManager.ShowError(dungeonResumeMsg.code);
            }
            Singleton <MapControl> .Instance.ChangeDungeonLeftTime(dungeonResumeMsg.remainTime);

            Log.info(this, "8-7协议返回副本剩余时间信息:" + dungeonResumeMsg.remainTime);
        }
Beispiel #26
0
        //一键删除邮件
        private void Fun_12_7(INetData data)
        {
            MailDelAllMsg_12_7 delAllMsg = new MailDelAllMsg_12_7();

            delAllMsg.read(data.GetMemoryStream());
            if (delAllMsg.code != 0)
            {
                ErrorCodeManager.ShowError(delAllMsg.code);
                return;
            }
            mailMode.UpdateOneyKeyDelSuccess();
            MessageManager.Show(LanguageManager.GetWord("MailControl.oneKeyDelSuccess"));
        }
Beispiel #27
0
        //提取邮件附件
        private void Fun_12_4(INetData data)
        {
            MailTakeAttachMsg_12_4 takeAttachMsg = new MailTakeAttachMsg_12_4();

            takeAttachMsg.read(data.GetMemoryStream());
            if (takeAttachMsg.code != 0)
            {
                ErrorCodeManager.ShowError(takeAttachMsg.code);
                return;
            }
            MessageManager.Show(LanguageManager.GetWord("MailControl.AcceptSuccess"));
            mailMode.AcceptRewardSuccess(takeAttachMsg.mailId);
        }
Beispiel #28
0
        /// <summary>
        ///     获取任务信息
        /// </summary>
        /// <param name="data"></param>
        private void Fun_6_1(INetData data)
        {
            var taskInfoMsg = new TaskInfoMsg_6_1();

            taskInfoMsg.read(data.GetMemoryStream());
            if (taskInfoMsg.code != 0)
            {
                ErrorCodeManager.ShowError(taskInfoMsg.code);
                return;
            }
            _taskMode.NextMainTaskId = taskInfoMsg.nextId;
            _taskMode.TaskDoing      = taskInfoMsg.taskDoing;
        }
Beispiel #29
0
        //删除邮件
        private void Fun_12_3(INetData data)
        {
            MailDelMailMsg_12_3 delMailMes = new MailDelMailMsg_12_3();

            delMailMes.read(data.GetMemoryStream());
            if (delMailMes.code != 0)
            {
                ErrorCodeManager.ShowError(delMailMes.code);
                return;
            }
            MessageManager.Show(LanguageManager.GetWord("MailControl.deletedSuccessfullyEmail"));
            mailMode.UpdateDelMailList(delMailMes.mailIds);
        }
Beispiel #30
0
        //一键领取附件
        private void Fun_12_8(INetData data)
        {
            MailGetAllAttachMsg_12_8 allAttachMsg = new MailGetAllAttachMsg_12_8();

            allAttachMsg.read(data.GetMemoryStream());
            if (allAttachMsg.code != 0)
            {
                ErrorCodeManager.ShowError(allAttachMsg.code);
                return;
            }
            mailMode.UpdateOneKeyAcceptSuccess();
            MessageManager.Show(LanguageManager.GetWord("MailControl.oneKeyGetSuccess"));
        }