示例#1
0
        //响应积分赛结算(S->C)
        private bool LOBBY2CLIENT_POINT_PVP_SETTLE_RESP_handler(Observers.Interfaces.INotification note)
        {
            PointPvpSettleResp resp = note.Body as PointPvpSettleResp;

            PvpProxy.instance.UpdatePvpRaceFightOverByProtocol(resp.point, resp.keepWinTimes);
            return(true);
        }
示例#2
0
        ///响应添加好友(S->C)

        private bool LOBBY2CLIENT_FriendAddResp_handler(Observers.Interfaces.INotification note)
        {
            //	CLIENT2LOBBY_FriendRecommendListReq_REQ();
            FriendAddResp resp = note.Body as FriendAddResp;

            if (resp.newFriend == null)
            {
                Logic.UI.Tips.View.CommonAutoDestroyTipsView.Open(Common.Localization.Localization.Get("ui.friendView.friendAddSend"));
                FriendProxy.instance.RemoveFriend(2, _friendAddResposeId);
                FriendProxy.instance.RefreshOneByProtocol(_friendAddResposeId);
            }
            else
            {
                Logic.UI.Tips.View.CommonAutoDestroyTipsView.Open(Common.Localization.Localization.Get("ui.friendView.friendAddSuccess"));
                FriendProxy.instance.AddFriend(1, resp.newFriend);
                FriendProxy.instance.RemoveFriend(2, resp.newFriend.id);
                FriendProxy.instance.RemoveFriend(3, resp.newFriend.id);
                FriendProxy.instance.RefreshOneByProtocol(resp.newFriend.id);
            }
            LuaTable friendTable = (LuaTable)LuaScriptMgr.Instance.CallLuaFunction("gamemanager.GetCtrl", "friend_controller")[0];

            friendTable.GetLuaFunction("FriendAddRespByCSharp").Call(resp.newFriend == null ? 0 : 1);
            //			FriendProxy.instance.AddFriend(1,resp.newFriend);
            //			FriendProxy.instance.RemoveFriend(2,resp.newFriend.id);
            //			FriendProxy.instance.RemoveFriend(3,resp.newFriend.id);
            //			FriendProxy.instance.RefreshOneByProtocol(resp.newFriend.id);
            //			if(_isAssignAddFriend)
            //			{
            //				_isAssignAddFriend = false;
            //				Logic.UI.Tips.View.CommonAutoDestroyTipsView.Open(Common.Localization.Localization.Get( "ui.friendView.friendAddSuccess"));
            //			}
            return(true);
        }
示例#3
0
        private bool LOBBY2CLIENT_GET_RANK_ARENA_RESP_handler(Observers.Interfaces.INotification note)
        {
            GetRankArenaResp resp = note.Body as GetRankArenaResp;

            PvpProxy.instance.UpdatePvpArenaInfo(resp);
            return(true);
        }
示例#4
0
        private bool LOBBY2CLIENT_RANK_ARENA_CHALLENGE_OVER_RESP_handler(Observers.Interfaces.INotification note)
        {
            RankArenaChallengeOverResp resp = note.Body as RankArenaChallengeOverResp;

            PvpProxy.instance.UpdatePvpFightOverByProtocol();
            return(true);
        }
示例#5
0
        private bool LOBBY2CLIENT_OpenGiftBag_RESP_handler(Observers.Interfaces.INotification note)
        {
            OpenGiftBagResp resp = note.Body as OpenGiftBagResp;

            RandomGiftProxy.instance.RandomGiftRefreshByProtocol(resp.dropItems);
            return(true);
        }
示例#6
0
        //黑市商品信息更新
        private bool LOBBY2CLIENT_BlackMarket_Update_RESP_handler(Observers.Interfaces.INotification note)
        {
//			BlackMarketUpdateResp resp = note.Body as BlackMarketUpdateResp;
//			BlackMarketProxy.instance.UpdateBlackMarketInfo(resp.goods);
//			BlackMarketProxy.instance.UpdateBlackMarketDelegateByProtocol();
            return(true);
        }
示例#7
0
        private bool LOBBY2CLIENT_PLAYER_ROLE_RESP_Handler(Observers.Interfaces.INotification note)
        {
            //            Logic.Protocol.Model.PlayerRoleResp resp = note.Body as Logic.Protocol.Model.PlayerRoleResp;
            //			Debugger.Log(resp.ToString());
            //			UIMgr.instance.CloseAll();
            //			UIMgr.instance.Open(UI.CreateRole.View.SelectRoleView.PREFAB_PATH);
            //			return true;

            // new test
            Logic.Protocol.Model.PlayerRoleResp resp = note.Body as Logic.Protocol.Model.PlayerRoleResp;
            Debugger.Log(resp.ToString());
            UI.UIMgr.instance.Close(EUISortingLayer.MainUI);
            List <PlayerData> basicPlayerDataList = PlayerData.GetBasicPlayerDataList();

            Logic.UI.CreateRole.Controller.CreateRoleController.instance.SelectRole(basicPlayerDataList[0].Id);
            UIMgr.instance.Open(Logic.UI.CreateRole.View.CreateRoleView.PREFAB_PATH);
            if (resp.isNeedCDKey)
            {
                LuaTable loginCtrlLua = (LuaTable)LuaScriptMgr.Instance.CallLuaFunction("gamemanager.GetCtrl", "login_controller")[0];
                loginCtrlLua.GetLuaFunction("OpenLoginVerifyCDKeyView").Call();
            }

            return(true);
            // new test
        }
示例#8
0
        ///响应查看好友阵型(S->C)
        private bool LOBBY2CLIENT_FriendLookUpTeamResp_handler(Observers.Interfaces.INotification note)
        {
//            FriendLookUpTeamResp resp = note.Body as FriendLookUpTeamResp;
//            FriendProxy.instance.UpdateFriendTeam(resp.id, resp.team);
//            FriendProxy.instance.LookupFriendTeamByProtocol(resp.id);
            return(true);
        }
示例#9
0
        private bool LOBBY2CLIENT_PVE_TEN_MOP_UP_RESP(Observers.Interfaces.INotification note)
        {
            PveTenMopUpResp resp = note.Body as PveTenMopUpResp;

            Logic.UI.DungeonDetail.Model.DungeonDetailProxy.instance.UpdateMopUpSuccessByProtocol(resp.dungeonId, resp.dropItems);
            return(true);
        }
示例#10
0
        private bool LOBBY2CLIENT_WORLD_TREE_RESP(Observers.Interfaces.INotification note)
        {
            WorldTreeResp worldTreeResp = note.Body as WorldTreeResp;

            WorldTreeProxy.instance.OnWorldTreeDungeonInfosUpdate(worldTreeResp.lastPassDungeon, worldTreeResp.fruitPurchasedTimes, worldTreeResp.failTimes);
            return(true);
        }
示例#11
0
        public bool LOBBY2CLIENT_PURCHASE_GOODS_RESP(Observers.Interfaces.INotification note)
        {
            PurchaseGoodsResp purchaseGoodsResp = note.Body as PurchaseGoodsResp;
            int    shopID       = purchaseGoodsResp.goodsType;
            int    shopItemID   = purchaseGoodsResp.goodsNo;
            int    costType     = purchaseGoodsResp.costType;
            string shopItemName = string.Empty;

            if (shopID == 13)
            {
                ShopDiamondItemInfo shopDiamondInfo = null;
                ShopProxy.instance.ShopDiamondItemInfoDic.TryGetValue(shopItemID, out shopDiamondInfo);
                shopItemName = Localization.Get(shopDiamondInfo.ShopDiamondData.name);
            }
            else if (shopID == 14)
            {
                ShopActionItemInfo shopActionItemInfo = null;
                ShopProxy.instance.ShopActionItemInfoDic.TryGetValue(shopItemID, out shopActionItemInfo);
                shopItemName = Localization.Get(shopActionItemInfo.ShopLimitItemData.name);
            }
            else if (shopID == 15)
            {
                ShopGoldItemInfo shopGoldItemInfo = null;
                ShopProxy.instance.ShopGoldItemInfoDic.TryGetValue(shopItemID, out shopGoldItemInfo);
                shopItemName = Localization.Get(shopGoldItemInfo.ShopLimitItemData.name);
            }
            else if (shopID == 16)
            {
                ShopGoodsItemInfo shopGoodsItemInfo = null;
                ShopProxy.instance.ShopGoodsItemInfoDic.TryGetValue(shopItemID, out shopGoodsItemInfo);
                shopItemName = Localization.Get(shopGoodsItemInfo.ShopGoodsData.name);
            }
            CommonAutoDestroyTipsView.Open(string.Format(Localization.Get("ui.shop_view.buy_success_tips"), shopItemName));
            return(true);
        }
示例#12
0
        public bool LOBBY2CLIENT_OTHER_GOODS_RESP(Observers.Interfaces.INotification note)
        {
            OtherGoodsResp otherGoodsResp = note.Body as OtherGoodsResp;

            List <ShopGoodsItemInfo> shopGoodsItemInfoList = ShopProxy.instance.ShopGoodsItemInfoDic.GetValues();
            int shopGoodsItemInfoCount = shopGoodsItemInfoList.Count;

            for (int i = 0; i < shopGoodsItemInfoCount; i++)
            {
                shopGoodsItemInfoList[i].UpdateInfo(0);
            }

            List <OtherGoodsProto> otherGoodsProtoList = otherGoodsResp.goods;
            int otherGoodsProtoCount            = otherGoodsProtoList.Count;
            ShopGoodsItemInfo shopGoodsItemInfo = null;

            for (int i = 0; i < otherGoodsProtoCount; i++)
            {
                shopGoodsItemInfo = null;
                ShopProxy.instance.ShopGoodsItemInfoDic.TryGetValue(otherGoodsProtoList[i].goodsNo, out shopGoodsItemInfo);

                if (shopGoodsItemInfo != null)
                {
                    shopGoodsItemInfo.UpdateInfo(otherGoodsProtoList[i].remianPurchaseTimes);
                }
            }
            ShopProxy.instance.OnShopGoodsItemInfoListUpdate();
            return(true);
        }
示例#13
0
        private bool LOBBY2CLIENT_WORLD_TREE_FRUIT_SYN_RESP(Observers.Interfaces.INotification note)
        {
            WorldTreeFruitSynResp worldTreeFruitSynResp = note.Body as WorldTreeFruitSynResp;

            WorldTreeProxy.instance.OnWorldTreeFruitUpdate(worldTreeFruitSynResp.fruit, worldTreeFruitSynResp.fruitUpperLimit, worldTreeFruitSynResp.nextRecoverTime);
            return(true);
        }
示例#14
0
        public bool LOBBY2CLIENT_DRAW_CARD_GOODS_RESP(Observers.Interfaces.INotification note)
        {
            DrawCardGoodsResp         drawCardGoodsResp      = note.Body as DrawCardGoodsResp;
            List <DrawCardGoodsProto> drawCardGoodsProtoList = drawCardGoodsResp.goods;
            int drawCardGoodsProtoCount = drawCardGoodsProtoList.Count;

            for (int i = 0; i < drawCardGoodsProtoCount; i++)
            {
                DrawCardGoodsProto          drawCardGoodsProto          = drawCardGoodsProtoList[i];
                ShopHeroRandomCardInfo      shopHeroRandomCardInfo      = null;
                ShopEquipmentRandomCardInfo shopEquipmentRandomCardInfo = null;
                ShopProxy.instance.ShopHeroRandomCardInfoDic.TryGetValue(drawCardGoodsProto.goodsNo, out shopHeroRandomCardInfo);
                ShopProxy.instance.ShopEquipmentRandomCardInfoDic.TryGetValue(drawCardGoodsProto.goodsNo, out shopEquipmentRandomCardInfo);
                if (shopHeroRandomCardInfo != null)
                {
                    shopHeroRandomCardInfo.setFreeInfo(drawCardGoodsProto.remainFreeTimes, drawCardGoodsProto.freeDrawCoolingOverTime);
                }
                else if (shopEquipmentRandomCardInfo != null)
                {
                    shopEquipmentRandomCardInfo.setFreeInfo(drawCardGoodsProto.remainFreeTimes, drawCardGoodsProto.freeDrawCoolingOverTime);
                }
            }
            ShopProxy.instance.OnShopHeroRandomCardInfoListUpdate();
            ShopProxy.instance.OnShopEquipmentRandomCardInfoListUpdate();
            return(true);
        }
示例#15
0
        public bool LOBBY2CLIEN_Chat_RESP_handler(Observers.Interfaces.INotification note)
        {
            ChatResp resp = note.Body as ChatResp;

            if (resp.chatType == (int)ChatType.World)
            {
                ChatInfo info = new ChatInfo();
                info.chatType   = ChatType.World;
                info.content    = resp.content;
                info.talkerName = resp.sendRoleName;
//				info.isMe = GameProxy.instance.PlayerInfo.name.Equals(resp.sendRoleName);
                info.isMe = GameProxy.instance.AccountName.Equals(resp.sendRoleName);
                ChatProxy.instance.AddChatInfo(info);
                ChatProxy.instance.UpdateChatByProtocol(info.isMe);
            }
            else if (resp.chatType == (int)ChatType.System)
            {
                string s = resp.content;
                if (resp.noticeNo != 0)
                {
                    SystemNoticeProxy.instance.AddSystemNotice(resp.noticeNo, resp.noticParams);
                }
                else
                {
                    SystemNoticeProxy.instance.AddSystemNotice(s);
                }
            }
            return(true);
        }
示例#16
0
        public bool LOBBY2CLIEN_ChatList_RESP_handler(Observers.Interfaces.INotification note)
        {
            ChatInfoResp resp = note.Body as ChatInfoResp;

            ChatProxy.instance.AddChatInfoList(resp.chatList);
            return(true);
        }
示例#17
0
        public bool LOBBY2CLIENT_WorldBossReviveResp(Observers.Interfaces.INotification note)
        {
            WorldBossReviveResp worldBossReviveResp = note.Body as WorldBossReviveResp;

            WorldBossProxy.instance.OnReviveSuccess();
            return(true);
        }
示例#18
0
        public bool LOBBY2CLIENT_WorldBossHurtSynResp(Observers.Interfaces.INotification note)
        {
            WorldBossHurtSynResp worldBossHurtSynResp = note.Body as WorldBossHurtSynResp;

            WorldBossProxy.instance.OnWorldBossHurtSyn(worldBossHurtSynResp.bossRemainHp);
            return(true);
        }
示例#19
0
        private bool LOBBY2CLIENT_ACTIVITY_PVE_RESP(Observers.Interfaces.INotification note)
        {
            ActivityPveResp activityPveResp = note.Body as ActivityPveResp;

            ActivityProxy.instance.RefreshActivityInfos(activityPveResp.openPves);
            return(true);
        }
示例#20
0
        public bool LOBBY2CLIENT_WorldBossInspireResp(Observers.Interfaces.INotification note)
        {
            WorldBossInspireResp worldBossInspireResp = note.Body as WorldBossInspireResp;

            WorldBossProxy.instance.OnWorldBossInspireTimesUpdate(worldBossInspireResp.inspireTimes);
            return(true);
        }
示例#21
0
        //0x1106响应删除邮件(S->C)
        public bool LOBBY2CLIENT_MailDelResp_handler(Observers.Interfaces.INotification note)
        {
            MailDelResp resp = note.Body as MailDelResp;

            MailProxy.instance.RefreshAllByProtocol();
            return(true);
        }
示例#22
0
        public bool LOBBY2CLIENT_WorldBossKilledResp(Observers.Interfaces.INotification note)
        {
            WorldBossKilledResp worldBossKilledResp = note.Body as WorldBossKilledResp;

            isWorldBossKilledByOther = true;
            WorldBossProxy.instance.OnWorldBossKilledByOther();
            return(true);
        }
示例#23
0
 public bool UpdateTrainingByProtocol(Observers.Interfaces.INotification note)
 {
     if (UpdateTrainingDelegate != null)
     {
         UpdateTrainingDelegate();
     }
     return(true);
 }
示例#24
0
 public bool OnNewEquipmentMarksChanged(Observers.Interfaces.INotification note)
 {
     if (onNewEquipmentMarksChangedDelegate != null)
     {
         onNewEquipmentMarksChangedDelegate();
     }
     return(true);
 }
示例#25
0
 public bool OnEquipmentInfoListUpdate(Observers.Interfaces.INotification note)
 {
     if (onEquipmentInfoListUpdateDelegate != null)
     {
         onEquipmentInfoListUpdateDelegate();
     }
     return(true);
 }
示例#26
0
        public bool LOBBY2CLIENT_WorldBossActivityEndResp(Observers.Interfaces.INotification note)
        {
            WorldBossActivityEndResp worldBossActivityEndResp = note.Body as WorldBossActivityEndResp;

            isWorldBossActivityEnd = true;
            WorldBossProxy.instance.OnWorldBossActivityEnd();
            return(true);
        }
示例#27
0
//		public void OnHeroBreakthroughSuccess ()
//		{
//			if (onHeroBreakthroughSuccessDelegate != null)
//				onHeroBreakthroughSuccessDelegate();
//		}
//
//		public void OnHeroStrengthenSuccess (uint heroInstanceID)
//		{
//			if (onHeroStrengthenSuccessDelegate != null)
//				onHeroStrengthenSuccessDelegate(heroInstanceID);
//		}

        public bool OnBreakthroughSuccess(Observers.Interfaces.INotification note)
        {
            if (onHeroBreakthroughSuccessDelegate != null)
            {
                onHeroBreakthroughSuccessDelegate();
            }
            return(true);
        }
示例#28
0
        /*
         * public void SetHeroAsChecked (uint heroInstanceID)
         * {
         *      if (_newHeroMarkDictionary.ContainsKey(heroInstanceID))
         *      {
         *              _newHeroMarkDictionary.Remove(heroInstanceID);
         *              if (onNewHeroMarksChangedDelegate != null)
         *                      onNewHeroMarksChangedDelegate();
         *      }
         * }
         */

        /*
         * public void ClearNewHeroMarks ()
         * {
         *      _newHeroMarkDictionary.Clear();
         *      if (onNewHeroMarksChangedDelegate != null)
         *              onNewHeroMarksChangedDelegate();
         * }
         */

        public bool OnUpdateHeroInfoList(Observers.Interfaces.INotification note)
        {
            if (onHeroInfoListUpdateDelegate != null)
            {
                onHeroInfoListUpdateDelegate();
            }
            return(true);
        }
示例#29
0
        public bool LOBBY2CLIENT_WorldBossTimeResp(Observers.Interfaces.INotification note)
        {
            WorldBossTimeResp worldBossTimeResp = note.Body as WorldBossTimeResp;

            WorldBossProxy.instance.OnWorldBossStatusChanged(worldBossTimeResp.isOpen, worldBossTimeResp.openTime, worldBossTimeResp.overTime);

            return(true);
        }
示例#30
0
        //红点提示(S->C)
        private bool LOBBY2CLIENT_RedPointPromptResp_handler(Observers.Interfaces.INotification note)
        {
            RedPointPromptResp resp = note.Body as RedPointPromptResp;

            Debugger.Log(string.Format("红点提示啦:funcid:{0},sub:{1}", resp.funcId, resp.subFuncId));
            RedPointProxy.instance.RefreshByProtocol(resp.funcId, resp.subFuncId);
            return(true);
        }