Exemple #1
0
        public void ClanShaikhCreateLengedCupDida(int cmdID, int nParam, string strParam, IntPtr ptr, int nLen)
        {
            // DIDA
            string      szAgreeDesc  = ULocalizationService.Instance.Get("UIView", "ClanCreateLegnedCup", "ConfirmBtn");
            string      szRefuseDesc = ULocalizationService.Instance.Get("UIView", "ClanCreateLegnedCup", "CancleBtn");
            string      szMsg        = String.Format(ULocalizationService.Instance.Get("UIView", "ClanCreateLegnedCup", "DiDaContent"));
            DIDAAddData msg          = new DIDAAddData();

            msg.eLayout          = EDIDALayout.EDT_Middle;
            msg.nItemID          = (int)EDIDAType.EDIDA_Clan;
            msg.bAllowRepeatItem = false;
            msg.nButtonIconID    = (int)EDIDAType.EDIDA_Clan;
            msg.strTooltip       = ULocalizationService.Instance.Get("UIView", "ClanCreateLegnedCup", "Title");

            SideButtonDataBuildingSN dataInfo = new SideButtonDataBuildingSN();

            dataInfo.nBuildingSN = (uint)EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID);
            msg.sCustomData      = dataInfo;

            msg.callBack = (CustomerData) =>
            {
                UIDialogData toolTipData = new UIDialogData(
                    title: ULocalizationService.Instance.Get("UIView", "ClanCreateLegnedCup", "Title"),
                    message: szMsg,
                    buttons: new UIWidgets.DialogActions()
                {
                    { szAgreeDesc, () => { ConfirmCreateCupCallBack(); return(true); } }, { szRefuseDesc, () => { return(true); } }
                }
                    );

                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, toolTipData);
            };

            LogicDataCenter.didaDataManager.AddItem(msg);
        }
Exemple #2
0
        // 搜索按钮响应(三次点击确认,真恶心)
        public void OnClickCatchBtn()
        {
            // 确认弹窗已弹出,引导先确认
            if (m_bCatchConfirmPopWndShow)
            {
                UIUtil.ShowSystemMessage(EMChatTipID.CHAT_TIP_LUA_TASK_CONFIRM_CATCH_ONE_TASK);
                return;
            }

            // 判是否选择上次随机结果
            if (LogicDataCenter.taskDataManager.ListPreRequestTask.Count > 0 && m_listSearchTask[0].gameObject.activeSelf)
            {
                UIDialogData data = new UIDialogData(title: ULocalizationService.Instance.Get("UIView", "Task", "SearchMsgBoxTitle"),
                                                     message: ULocalizationService.Instance.Get("UIView", "Task", "SearchMsgBoxDesc"),
                                                     buttons: new UIWidgets.DialogActions()
                {
                    { ULocalizationService.Instance.Get("UIView", "Common", "ConfirmBtn"), OnConfirmBtnClick },
                    { ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), OnCancelBtnClick }
                },
                                                     closeButtonAction: new UnityEngine.Events.UnityAction(OnCloseBtnClick));
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);

                m_bCatchConfirmPopWndShow = true;
                return;
            }

            ConfirmClickCatchBtn();
        }
Exemple #3
0
        public void OnClanInviteReturn(IntPtr ptr, int nLen)
        {
            cmd_clan_invite_ret inviteData = IntPtrHelper.toData <cmd_clan_invite_ret>(ptr);

            DIDAAddData msg = new DIDAAddData();

            msg.nDIDATime        = 60;
            msg.nItemID          = (int)EDIDAType.EDIDA_Clan;
            msg.bAllowRepeatItem = false;
            msg.nButtonIconID    = (int)EDIDAType.EDIDA_Clan;
            msg.strTooltip       = ULocalizationService.Instance.Get("UIView", "PopupMenu", "ClanInviteTooltip");

            ClanInviteInfo inviteInfo = new ClanInviteInfo();

            inviteInfo.nInviterID = inviteData.nInviterPDBID;
            msg.sCustomData       = inviteInfo;
            msg.callBack          = (CustomerInfo) =>
            {
                ClanInviteInfo customerInfo = CustomerInfo as ClanInviteInfo;
                UIDialogData   toolTipData  = new UIDialogData(
                    title: ULocalizationService.Instance.Get("UIView", "PopupMenu", "ClanInviteTitle"),
                    message: String.Format(ULocalizationService.Instance.Get("UIView", "PopupMenu", "ClanInviteContent"), inviteData.szInviterName, inviteData.szClanName),
                    buttons: new UIWidgets.DialogActions()
                {
                    { ULocalizationService.Instance.Get("UIView", "Common", "ConfirmBtn"), () => { ClanInviteBtnCallBack(customerInfo, true); return(true); } },
                    { ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), () => { ClanInviteBtnCallBack(customerInfo, false); return(true); } }
                });

                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, toolTipData);
            };

            LogicDataCenter.didaDataManager.AddItem(msg);
        }
Exemple #4
0
        public void onPkDidaShow(IntPtr ptr, int nLen)
        {
            cmd_creature_pk_show_pk_info data = IntPtrHelper.toData <cmd_creature_pk_show_pk_info>(ptr);
            DIDAAddData msg = new DIDAAddData();

            msg.nDIDATime        = (int)data.dwTime / 1000;
            msg.nItemID          = (int)EDIDAType.EDIDA_PK;
            msg.bAllowRepeatItem = true;
            msg.nButtonIconID    = (int)EDIDAType.EDIDA_PK;
            msg.strTooltip       = ULocalizationService.Instance.Get("UIView", "PK", "ShowPrompt");

            SideButtonDataPkInfo pkInfo = new SideButtonDataPkInfo();

            pkInfo.uidOperator = data.uidOperator;
            msg.sCustomData    = pkInfo;
            msg.callBack       = (CustomerInfo) =>
            {
                SideButtonDataPkInfo customerInfo = CustomerInfo as SideButtonDataPkInfo;
                UIDialogData         toolTipData  = new UIDialogData(
                    title: ULocalizationService.Instance.Get("UIView", "PK", "ShowPrompt"),
                    message: data.szInfo,
                    buttons: new UIWidgets.DialogActions()
                {
                    { ULocalizationService.Instance.Get("UIView", "PK", "Agree"), () => { PkDidaCallBack(customerInfo, 1); return(true); } },
                    { ULocalizationService.Instance.Get("UIView", "PK", "Cancel"), () => { PkDidaCallBack(customerInfo, 0); return(true); } }
                });
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, toolTipData);
            };
            LogicDataCenter.didaDataManager.AddItem(msg);
        }
Exemple #5
0
        // 收到邀请加入战队请求
        public void OnRecvKinInvite(IntPtr ptr, int nLen)
        {
            cmd_recv_kin_invite inviteData = IntPtrHelper.toData <cmd_recv_kin_invite>(ptr);

            DIDAAddData msg = new DIDAAddData();

            msg.nDIDATime        = 60;
            msg.nItemID          = (int)EDIDAType.EDIDA_Kin;
            msg.bAllowRepeatItem = false;
            msg.nButtonIconID    = (int)EDIDAType.EDIDA_Kin;
            msg.strTooltip       = ULocalizationService.Instance.Get("UIView", "KinMember", "KinRequest");

            KinInviteInfo inviteInfo = new KinInviteInfo();

            inviteInfo.nInviterID = inviteData.dwInviterPDBID;
            msg.sCustomData       = inviteInfo;
            msg.callBack          = (CustomerInfo) =>
            {
                KinInviteInfo customerInfo = CustomerInfo as KinInviteInfo;
                UIDialogData  toolTipData  = new UIDialogData(
                    title: ULocalizationService.Instance.Get("UIView", "KinMember", "KinRequest"),
                    message: String.Format(ULocalizationService.Instance.Get("UIView", "KinMember", "KinRequestDesc"), inviteData.szKinName, inviteData.szInviteName),
                    buttons: new UIWidgets.DialogActions()
                {
                    { ULocalizationService.Instance.Get("UIView", "Common", "ConfirmBtn"), () => { recvKinInviteCallBack(customerInfo, true); return(true); } },
                    { ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), () => { recvKinInviteCallBack(customerInfo, false); return(true); } }
                });

                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, toolTipData);
            };

            LogicDataCenter.didaDataManager.AddItem(msg);
        }
Exemple #6
0
        public void onTeamSubInvitedSideButton(IntPtr ptr, int nLen)
        {
            // 邀请加入队伍
            cmd_team_invited2view data = IntPtrHelper.toData <cmd_team_invited2view>(ptr);

            // 邀请加入队伍
            DIDAAddData msg = new DIDAAddData();

            msg.nItemID          = (int)EDIDAType.EDIDA_Team;
            msg.bAllowRepeatItem = true;
            msg.nButtonIconID    = (int)EDIDAType.EDIDA_Team;
            msg.strButtonText    = ULocalizationService.Instance.Get("UIView", "Team", "inviteButtonDes");
            msg.strTooltip       = ULocalizationService.Instance.Get("UIView", "Team", "inviteButtonDes");

            SideButtonDataBuildingSN dataInfo = new SideButtonDataBuildingSN();

            dataInfo.nBuildingSN = data.nBuildingSN;
            msg.sCustomData      = dataInfo;
            msg.callBack         = (CustomerInfo) =>
            {
                SideButtonDataBuildingSN customerInfo = CustomerInfo as SideButtonDataBuildingSN;
                UIDialogData             tooltipData  = new UIDialogData(
                    title: ULocalizationService.Instance.Get("UIView", "Team", "TeamTitleDes"),
                    message: "[" + data.szInviterName + "]" + ULocalizationService.Instance.Get("UIView", "Team", "inviteMsgBoxDes"),
                    buttons: new UIWidgets.DialogActions()
                {
                    { ULocalizationService.Instance.Get("UIView", "Team", "AgreeButtonDes"), () => { InvitedSideButtonCallBack(customerInfo, (int)EBuildFlowResult.EBuildFlowResult_Agree); return(true); } },
                    { ULocalizationService.Instance.Get("UIView", "Team", "DisAgreeButtonDes"), () => { InvitedSideButtonCallBack(customerInfo, (int)EBuildFlowResult.EBuildFlowResult_Disagree); return(true); } }
                });
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, tooltipData);
            };

            LogicDataCenter.didaDataManager.AddItem(msg);
        }
Exemple #7
0
        public void OnMsgBoxOpenWinInfo()
        {
            {
                int nOpenChestID = LogicDataCenter.prizeChestDataManager.OpenChestID;
                int nCostMoney   = 0;
                SSchemePrizeChestConfig chestConfig = ActorPrizeConfig.Instance.GetPrizeChestConfig(nOpenChestID);
                if (chestConfig != null)
                {
                    GemStoneProductData productData             = LogicDataCenter.crownPageDataManager.CrownGemstoneProductInfo;
                    SSchemeCrownGemstoneRandomConfig randConfig = CrownPageConfigPage.Instance.GetCrownPageGemsRandomConfig(chestConfig.nPrizeGroupID);
                    if (randConfig != null && productData != null)
                    {
                        int nGemstoneGroupID = chestConfig.nPrizeGroupID;
                        int nBaseTicket      = randConfig.nOpenWinCost;;
                        int nAdditionTicket  = randConfig.nAdditionWinCost;
                        nCostMoney = nBaseTicket + GetListEffectiveCount(productData.data.windowGemstoneIDList) * nAdditionTicket;
                    }
                }

                UIDialogData data = new UIDialogData(title: "透视宝石",
                                                     message: "消耗" + nCostMoney + "点券,获得一次透视矿石机会",
                                                     buttons: new UIWidgets.DialogActions()
                {
                    { "确认", OnMsgBoxOpenWinHandelSave },
                    { "取消", OnMsgBoxOpenWinHandelCancel }
                },
                                                     closeButtonAction: new UnityEngine.Events.UnityAction(OnMsgBoxOpenWinHandelCancelEx)

                                                     );
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
            }
        }
Exemple #8
0
        // 收到推荐排位请求
        public void OnRecvRecommendRank()
        {
            // 社会服取不到英雄星级数据,客户端判断一次排位要求(int)EMMatchType.MatchType_None
            SMatchRankLimitHeroSchemeInfo info = MatchRankLimitConfig.Instance.getRankLimitHeroShemeInfo((int)EMMatchType.MatchType_Rank);

            if (info == null)
            {
                return;
            }
            ActorHeroInfo heroInfo = LogicDataCenter.playerSystemDataManager.GetActorAllHero();
            int           nCount   = 0;

            foreach (var item in heroInfo.dicEntityHeroInfo)
            {
                if (item.Value.bIsBuy > 0 && item.Value.byStarLv >= info.nLimitHeroStarLevel)
                {
                    nCount++;
                }

                if (nCount >= info.nLimitHeroCount)
                {
                    break;
                }
            }
            if (nCount < info.nLimitHeroCount)
            {
                return;
            }

            // DIDA提醒
            DIDAAddData msg = new DIDAAddData();

            msg.eLayout = EDIDALayout.EDT_Left;
            //msg.nDIDATime = 60;
            msg.nItemID          = (int)EDIDAType.EDIDA_RANK;
            msg.bAllowRepeatItem = false;
            msg.nButtonIconID    = (int)EDIDAType.EDIDA_RANK;
            msg.strTooltip       = ULocalizationService.Instance.Get("UIView", "MatchTimeInfo", "RecommendTooltip");
            msg.sCustomData      = new SideButtonCustomData();
            msg.callBack         = (CustomerInfo) =>
            {
                UIDialogData toolTipData = new UIDialogData(
                    title: ULocalizationService.Instance.Get("UIView", "MatchTimeInfo", "RecommendTitle"),
                    message: ULocalizationService.Instance.Get("UIView", "MatchTimeInfo", "RecommendContent"),
                    buttons: new UIWidgets.DialogActions()
                {
                    { ULocalizationService.Instance.Get("UIView", "Common", "Agree"), onClickAgreeBtn },
                    { ULocalizationService.Instance.Get("UIView", "Common", "Refuse"), onClickRefuseBtn }
                },
                    closeButtonAction: new UnityEngine.Events.UnityAction(onClickCloseBtn)
                    );

                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, toolTipData);
            };

            LogicDataCenter.didaDataManager.AddItem(msg);
        }
        private void OnCallBack()
        {
            UIDialogData toolTipData = new UIDialogData(
                title: ULocalizationService.Instance.Get("UIView", "SNS", "AddBlackListWndTitle"),
                message: String.Format(ULocalizationService.Instance.Get("UIView", "SNS", "AddBlackListWndContent"), m_ActorName),
                buttons: new UIWidgets.DialogActions()
            {
                { ULocalizationService.Instance.Get("UIView", "Common", "ConfirmBtn"), () => { LogicDataCenter.snsDataManager.reqAddBlackList(m_dwUserID, m_ActorName); return(true); } },
                { ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), () => { return(true); } }
            });

            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, toolTipData);
        }
Exemple #10
0
        public void OnPreOffLineEndRegisterClick()
        {
            long         nCurLegendCupID = nLegendCupID;
            UIDialogData data            = new UIDialogData(title: ULocalizationService.Instance.Get("UIView", "LegendCupRegist", "PreEndRegisterTitle"),
                                                            message: ULocalizationService.Instance.Get("UIView", "LegendCupRegist", "PreEndRegisterContex"),
                                                            buttons: new UIWidgets.DialogActions()
            {
                { ULocalizationService.Instance.Get("UIView", "LegendCupRegist", "PreEndRegisterConfirm"), () => { OnConfirmBtnClick(nCurLegendCupID); return(true); } },
                { ULocalizationService.Instance.Get("UIView", "LegendCupRegist", "PreEndRegisterCancel"), null }
            });

            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
        }
Exemple #11
0
        public void OnClanQuitBtnClick()
        {
            UIDialogData data = new UIDialogData(
                title: ULocalizationService.Instance.Get("UIView", "Common", "TipText"),
                message: ULocalizationService.Instance.Get("UIView", "ClanDetail", "QuitBtnContent"),
                buttons: new DialogActions()
            {
                { ULocalizationService.Instance.Get("UIView", "Common", "ConfirmBtn"), OnQuitBtnConfirm },
                { ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), null }
            }
                );

            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
        }
Exemple #12
0
        void OnKick()
        {
            String       strMsg = String.Format(ULocalizationService.Instance.Get("UIView", "ClanDetail", "KickMemberDesc"), actorName.text);
            UIDialogData data   = new UIDialogData(
                title: ULocalizationService.Instance.Get("UIView", "Common", "TipText"),
                message: strMsg,
                buttons: new DialogActions()
            {
                { ULocalizationService.Instance.Get("UIView", "Common", "ConfirmBtn"), OnKickConfirm },
                { ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), null }
            }
                );

            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
        }
Exemple #13
0
        // DIDA移除有三处:1、时间到2、点DIDA3、点参加    设置DIDA:该位置、线上赛
        public void SetLegendCupDIDA(bool bActive, long nLegendCupID, int nRoundID, int nSearchID)
        {
            cmd_legendcup_recv_cuplist_node cupBaseData = LogicDataCenter.legendCupDataManager.GetSingleLegendCupNode(nLegendCupID);

            if (cupBaseData.nLegendCupID == 0 || cupBaseData.nIsOnline <= 0)
            {
                return;
            }

            SideButtonLegendBuildingSN dataInfo = new SideButtonLegendBuildingSN();

            dataInfo.nLegendCupID = (uint)nLegendCupID;
            dataInfo.nSearchID    = nSearchID;
            if (bActive)
            {
                DIDAAddData addMsg = new DIDAAddData();
                addMsg.nItemID          = (int)EDIDAType.EDIDA_LegendCup;
                addMsg.bAllowRepeatItem = true;
                addMsg.nButtonIconID    = (int)EDIDAType.EDIDA_LegendCup;
                addMsg.strButtonText    = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "JoinCupRoom");
                addMsg.strTooltip       = ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "JoinCupRoom");
                addMsg.sCustomData      = dataInfo;
                addMsg.callBack         = (CustomerData) =>
                {
                    SideButtonDataBuildingSN customerData = CustomerData as SideButtonDataBuildingSN;
                    UIDialogData             tooltipData  = new UIDialogData(
                        title: cupBaseData.szCupName,
                        message: "[" + cupBaseData.szCupName + "]" + ULocalizationService.Instance.Get("UIView", "LegendCupGroup", "JoinCupRoomContent"),
                        buttons: new UIWidgets.DialogActions()
                    {
                        { ULocalizationService.Instance.Get("UIView", "Team", "AgreeButtonDes"), () => { RequestDIDACallBack(true, nLegendCupID, nRoundID, nSearchID); return(true); } },
                        { ULocalizationService.Instance.Get("UIView", "Team", "DisAgreeButtonDes"), () => { RequestDIDACallBack(false, nLegendCupID, nRoundID, nSearchID); return(true); } }
                    });
                    UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, tooltipData);
                };

                LogicDataCenter.didaDataManager.AddItem(addMsg);
            }
            else
            {
                DIDARemoveData rmMsg = new DIDARemoveData();
                rmMsg.nItemID     = (int)EDIDAType.EDIDA_LegendCup;
                rmMsg.sCustomData = dataInfo;
                LogicDataCenter.didaDataManager.RemoveItem(rmMsg);
            }
        }
Exemple #14
0
        public void OnMsgBoxSaveInfo()
        {
            if (m_isVisible && LogicDataCenter.runePageDataManager.GetRunePageChange())
            {
                UIDialogData data = new UIDialogData(title: "符文保存询问",
                                                     message: "是否保存当前符文页",
                                                     buttons: new UIWidgets.DialogActions()
                {
                    { "确认", SetSaveSingleRunePage },
                    { "取消", SetSaveDisable }
                },
                                                     closeButtonAction: new UnityEngine.Events.UnityAction(SetSaveDisableEx)

                                                     );
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
            }
        }
Exemple #15
0
        public void onTeamSubRequestSideButton(IntPtr ptr, int nLen)
        {
            // 请求加入队伍
            cmd_team_subrequest2view data = IntPtrHelper.toData <cmd_team_subrequest2view>(ptr);

            // 请求加入队伍
            string msgDes = "";

            if (data.bTargeInTeamFlag == 1)
            {
                msgDes = ULocalizationService.Instance.Get("UIView", "Team", "TargetInTeam1Des");
            }
            else
            {
                msgDes = ULocalizationService.Instance.Get("UIView", "Team", "TargetInTeam0Des");
            }

            DIDAAddData msg = new DIDAAddData();

            msg.nItemID          = (int)EDIDAType.EDIDA_Team;
            msg.bAllowRepeatItem = true;
            msg.nButtonIconID    = (int)EDIDAType.EDIDA_Team;
            msg.strButtonText    = ULocalizationService.Instance.Get("UIView", "Team", "requestButtonDes");
            msg.strTooltip       = ULocalizationService.Instance.Get("UIView", "Team", "requestButtonDes");

            SideButtonDataBuildingSN dataInfo = new SideButtonDataBuildingSN();

            dataInfo.nBuildingSN = data.nBuildingSN;
            msg.sCustomData      = dataInfo;
            msg.callBack         = (CustomerData) =>
            {
                SideButtonDataBuildingSN customerData = CustomerData as SideButtonDataBuildingSN;
                UIDialogData             tooltipData  = new UIDialogData(
                    title: ULocalizationService.Instance.Get("UIView", "Team", "TeamTitleDes"),
                    message: "[" + data.szRequestName + "]" + msgDes,
                    buttons: new UIWidgets.DialogActions()
                {
                    { ULocalizationService.Instance.Get("UIView", "Team", "AgreeButtonDes"), () => { RequestSideButtonCallBack(customerData, (int)EBuildFlowResult.EBuildFlowResult_Agree); return(true); } },
                    { ULocalizationService.Instance.Get("UIView", "Team", "DisAgreeButtonDes"), () => { RequestSideButtonCallBack(customerData, (int)EBuildFlowResult.EBuildFlowResult_Disagree); return(true); } }
                });
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, tooltipData);
            };

            LogicDataCenter.didaDataManager.AddItem(msg);
        }
Exemple #16
0
 public void onMsgBoxSaveInfo()
 {
     if (m_isVisible && LogicDataCenter.talentPageDataManager.GetTalentPageChange())
     {
         UIDialogData data = new UIDialogData(title: "天赋保存询问",
                                              message: "是否保存当前天赋页",
                                              buttons: new UIWidgets.DialogActions()
         {
             { "确认", SetSaveHandler },
             { "取消", SetDisableSaveHandler }
         },
                                              closeButtonAction: new UnityEngine.Events.UnityAction(SetDisableSaveHandlerEx)
                                              );
         UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
     }
     else
     {
         MsgHandlerToRoom();
     }
 }
Exemple #17
0
        public void OnProcessKinApplyMember(IntPtr ptr, int nLen, int nType)
        {
            // 更新成员数据
            IntPtrVaArgParseHelper helper = new IntPtrVaArgParseHelper(ptr, nLen);

            switch ((ProcessKinApply)nType)
            {
            // 添加
            case ProcessKinApply.PKM_APPLY_ADD:
            {
                GameLogic.cmd_kin_applylist_node cmdKinMember = helper.get <GameLogic.cmd_kin_applylist_node>();
                m_ApplyListNode.Add(cmdKinMember);
                m_kinBaseData.nApplyCount++;

                // DIDA
                DIDAAddData msg = new DIDAAddData();
                msg.nDIDATime        = 60;
                msg.nItemID          = (int)EDIDAType.EDIDA_Kin;
                msg.bAllowRepeatItem = true;
                msg.nButtonIconID    = (int)EDIDAType.EDIDA_Kin;
                msg.strTooltip       = ULocalizationService.Instance.Get("UIView", "KinMember", "KinApply");

                KinApplyInfo applyInfo = new KinApplyInfo();
                applyInfo.nApplyID = cmdKinMember.nPlayerPDBID;
                msg.sCustomData    = applyInfo;
                msg.callBack       = (CustomerInfo) =>
                {
                    KinApplyInfo customerInfo = CustomerInfo as KinApplyInfo;
                    UIDialogData toolTipData  = new UIDialogData(
                        title: ULocalizationService.Instance.Get("UIView", "KinMember", "KinApply"),
                        message: String.Format(ULocalizationService.Instance.Get("UIView", "KinMember", "KinApplyDesc"), cmdKinMember.szName),
                        buttons: new UIWidgets.DialogActions()
                        {
                            { ULocalizationService.Instance.Get("UIView", "Common", "ConfirmBtn"), () => { recvKinApplyCallBack(customerInfo, true); return(true); } },
                            { ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), () => { recvKinApplyCallBack(customerInfo, false); return(true); } }
                        });

                    UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, toolTipData);
                };

                LogicDataCenter.didaDataManager.AddItem(msg);
            }
            break;

            // 删除
            case ProcessKinApply.PKM_APPLY_REMOVE:
            {
                GameLogic.cmd_kin_remove_apply cmdRemoveMember = helper.get <GameLogic.cmd_kin_remove_apply>();
                for (int i = 0; i < m_ApplyListNode.Count; ++i)
                {
                    if (m_ApplyListNode[i].nPlayerPDBID == cmdRemoveMember.nPlayerPDBID)
                    {
                        m_ApplyListNode.RemoveAt(i);
                        m_kinBaseData.nApplyCount--;
                        break;
                    }
                }
            }
            break;
            }

            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_KIN_UPDATEAPPLY_TIPS, null);
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_KIN_UPDATE_APPLY_LIST, null);
        }
Exemple #18
0
        public void ClanAddApply(int cmdID, int nParam, string strParam, IntPtr ptr, int nLen)
        {
            IntPtrVaArgParseHelper helper  = new IntPtrVaArgParseHelper(ptr, nLen);
            cmd_clan_add_apply     cmdHead = helper.get <cmd_clan_add_apply>();

            cmd_clan_applymember applymember;

            applymember.nKinID       = cmdHead.nKinID;
            applymember.szName       = cmdHead.szName;
            applymember.szShaikhName = cmdHead.szShaikhName;
            applymember.nMemberCount = cmdHead.nMemberCount;
            m_clanApplyMemberData.Add(applymember);

            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_CLAN_APPLY_MEMBER_TIP, null);

            UIMsgCmdData UIData = new UIMsgCmdData(cmdID, nParam, strParam, ptr, nLen);

            UIData.msgID = (int)WndMsgID.WND_MSG_CLAN_ADDAPPLY;
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_CLAN_ADDAPPLY, UIData);

            if (EntityFactory.MainHeroView == null || EntityFactory.MainHeroView.Property == null)
            {
                return;
            }

            if (EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID) != m_clanBaseData.nShaikhID)
            {
                return;
            }

            // DIDA
            string      szAgreeDesc  = ULocalizationService.Instance.Get("UIView", "ClanAcceptMember", "AcceptBtn");
            string      szRefuseDesc = ULocalizationService.Instance.Get("UIView", "ClanAcceptMember", "RefuseBtn");
            string      szMsg        = String.Format(ULocalizationService.Instance.Get("UIView", "ClanAcceptMember", "ApplyDiDaContent"), cmdHead.szName);
            DIDAAddData msg          = new DIDAAddData();

            msg.eLayout          = EDIDALayout.EDT_Middle;
            msg.nDIDATime        = 60;
            msg.nItemID          = (int)EDIDAType.EDIDA_Clan;
            msg.bAllowRepeatItem = true;
            msg.nButtonIconID    = (int)EDIDAType.EDIDA_Clan;
            msg.strTooltip       = ULocalizationService.Instance.Get("UIView", "ClanAcceptMember", "ApplyDiDaTitle");

            SideButtonDataClanApplyInfo applyInfo = new SideButtonDataClanApplyInfo();

            applyInfo.nKinID = cmdHead.nKinID;
            msg.sCustomData  = applyInfo;
            msg.callBack     = (CustomerInfo) =>
            {
                SideButtonDataClanApplyInfo customerInfo = CustomerInfo as SideButtonDataClanApplyInfo;
                UIDialogData toolTipData = new UIDialogData(
                    title: ULocalizationService.Instance.Get("UIView", "ClanAcceptMember", "ApplyDiDaTitle"),
                    message: szMsg,
                    buttons: new UIWidgets.DialogActions()
                {
                    { szAgreeDesc, () => { ApplyClanAdmitCallBack(customerInfo.nKinID, true); return(true); } }, { szRefuseDesc, () => { ApplyClanAdmitCallBack(customerInfo.nKinID, false); return(true); } }
                }
                    );

                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, toolTipData);
            };

            LogicDataCenter.didaDataManager.AddItem(msg);
        }
Exemple #19
0
        private void ShowAskApplyMentorship(GameLogic.cmd_mentorship_request_applyanswer cmdData)
        {
            if (m_ApplyAnwserList.ContainsKey(cmdData.nSrcPDBID))
            {
                return;
            }

            m_ApplyAnwserList.Add(cmdData.nSrcPDBID, cmdData);

            string szTmpPost = "";

            if (cmdData.nRelationType == (int)EMMentorshipType.emMentorshipType_Formal)
            {
                if (cmdData.nApplyPost == (int)EMMentorshipPost.emMentorshipPost_Master)
                {
                    szTmpPost = ULocalizationService.Instance.Get("UIView", "MentorshipWnd", "FormalMasterDesc");
                }
                else
                {
                    szTmpPost = ULocalizationService.Instance.Get("UIView", "MentorshipWnd", "FormalPrenticeDesc");
                }
            }
            else
            {
                if (cmdData.nApplyPost == (int)EMMentorshipPost.emMentorshipPost_Prentice)
                {
                    szTmpPost = ULocalizationService.Instance.Get("UIView", "MentorshipWnd", "InternPrenticeDesc");
                }
                else
                {
                    szTmpPost = ULocalizationService.Instance.Get("UIView", "MentorshipWnd", "InternMasterDesc");
                }
            }

            string szMsg = ULocalizationService.Instance.Get("UIView", "MentorshipWnd", "ApplyNameDesc");

            szMsg = szMsg.Replace("{1}", cmdData.szSrcName);
            szMsg = szMsg.Replace("{2}", szTmpPost);
            string szAgreeDesc  = ULocalizationService.Instance.Get("UIView", "MentorshipWnd", "AgreeApplyDesc");
            string szRefuseDesc = ULocalizationService.Instance.Get("UIView", "MentorshipWnd", "RefuseApplyDesc");

            DIDAAddData msg = new DIDAAddData();

            msg.eLayout          = EDIDALayout.EDT_Middle;
            msg.nDIDATime        = 60;
            msg.nItemID          = (int)EDIDAType.EDIDA_Mentorship;
            msg.bAllowRepeatItem = true;
            msg.nButtonIconID    = (int)EDIDAType.EDIDA_Mentorship;
            msg.strTooltip       = ULocalizationService.Instance.Get("UIView", "MentorshipWnd", "ApplyTitle");

            SideButtonDataMentorshipInfo applyInfo = new SideButtonDataMentorshipInfo();

            applyInfo.nSrcPDBID = cmdData.nSrcPDBID;
            msg.sCustomData     = applyInfo;
            msg.callBack        = (CustomerInfo) =>
            {
                SideButtonDataMentorshipInfo customerInfo = CustomerInfo as SideButtonDataMentorshipInfo;
                UIDialogData toolTipData = new UIDialogData(
                    title: ULocalizationService.Instance.Get("UIView", "MentorshipWnd", "ApplyTitle"),
                    message: szMsg,
                    buttons: new UIWidgets.DialogActions()
                {
                    { szAgreeDesc, () => { ApplyMentorshipCallBack(customerInfo.nSrcPDBID, true); return(true); } }, { szRefuseDesc, () => { ApplyMentorshipCallBack(customerInfo.nSrcPDBID, false); return(true); } }
                }
                    );

                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, toolTipData);
            };

            LogicDataCenter.didaDataManager.AddItem(msg);
        }