Ejemplo n.º 1
0
 /** 装备找回 */
 private void HandleRecoverEvent(GameObject gameObj)
 {
     if (UserManager.Instance.self.getVipLevel() < noticeContent.getUsedGetBackVipLevel())
     {
         MessageWindow.ShowAlert(LanguageConfigManager.Instance.getLanguage("notice_equipRemake_er01", noticeContent.getUsedGetBackVipLevel().ToString()));
         return;
     }
     if ((StorageManagerment.Instance.getAllEquip().Count + 1) > StorageManagerment.Instance.getEquipStorageMaxSpace())
     {
         MessageWindow.ShowAlert(LanguageConfigManager.Instance.getLanguage("storeFull_equip"));
         return;
     }
     (FPortManager.Instance.getFPort("NoticeEquipRemakeFPort") as NoticeEquipRemakeFPort).getBackEquip(equipReamkeNotice.sid, () => {
         UiManager.Instance.openDialogWindow <MessageWindow> ((win) => {
             win.initWindow(1, LanguageConfigManager.Instance.getLanguage("s0093"), null, LanguageConfigManager.Instance.getLanguage("notice_equipRemake_gbOK"), null);
             EventDelegate.Add(win.OnHide, () => {
                 UiManager.Instance.openWindow <MailWindow> ((wins) => {
                     wins.Initialize(0);
                     EventDelegate.Add(wins.OnHide, () => {
                         this.initUI();
                     });
                 });
             });
         });
         MaskWindow.UnlockUI();
     });
 }
Ejemplo n.º 2
0
 public void doViewRankEvent(GameObject obj)
 {
     if (luckySample.idsType == "2")
     {
         UiManager.Instance.openDialogWindow <LuckyRankWindow>((win) => {
             win.initWindow(RankManagerment.TYPE_LUCKY_EQUIP, RankManagerment.Instance.luckyEquipList, win);
         });
     }
     else if (luckySample.idsType == "3")
     {
         UiManager.Instance.openDialogWindow <LuckyRankWindow>((win) => {
             win.initWindow(RankManagerment.TYPE_LUCKY_LIEHUN, RankManagerment.Instance.luckyLiehunList, win);
         });
     }
     else if (luckySample.idsType == "4")
     {
         UiManager.Instance.openDialogWindow <LuckyRankWindow>((win) => {
             win.initWindow(RankManagerment.TYPE_LUCKY_LIANJIN, RankManagerment.Instance.luckyLianjinList, win);
         });
     }
 }
Ejemplo n.º 3
0
    private void onClickGo(GameObject obj)
    {
        switch (mSample.windowLinkSid)
        {
        case 90090:          //炼金术界面
        {
            if (UserManager.Instance.self.getUserLevel() >= mSample.showLv)
            {
                if (UserManager.Instance.self.getVipLevel() < mSample.condition.conditions[Mathf.Min((task.index - 1) * 2 + 1, mSample.condition.conditions.Length - 1)])
                {
                    UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_07", mSample.condition.conditions[(task.index - 1) * 2 + 1].ToString()));
                    return;
                }
                if (TaskManagerment.Instance.isComplete(task) || (task.condition >= mSample.condition.conditions[mSample.condition.conditions.Length - 2]))
                {
                    UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_05"));
                    return;
                }
                win.entranceId = NoticeSampleManager.Instance.getNoticeSampleBySid(NoticeType.ALCHEMY_SID).entranceId;
                win.updateSelectButton(NoticeType.ALCHEMY_SID);
                win.initTopButton();
                MaskWindow.UnlockUI();
            }
            else
            {
                showTip(mSample.showLv);
            }
            break;
        }

        case 90091:           //钻石召唤界面
        {
            if (UserManager.Instance.self.getUserLevel() >= mSample.showLv)
            {
                if (UserManager.Instance.self.getVipLevel() < mSample.condition.conditions[Mathf.Min((task.index - 1) * 2 + 1, mSample.condition.conditions.Length - 1)])
                {
                    UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_07", mSample.condition.conditions[(task.index - 1) * 2 + 1].ToString()));
                    return;
                }
                if (TaskManagerment.Instance.isComplete(task) || (task.condition >= mSample.condition.conditions[mSample.condition.conditions.Length - 2]))
                {
                    UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_05"));
                    return;
                }
                UiManager.Instance.openWindow <LuckyDrawDetailWindow> ((win) => {
                        win.setLuckyDraw(LuckyDrawManagerment.Instance.getLuckyDrawBySid(81001));
                    });
            }
            else
            {
                showTip(mSample.showLv);
            }
            break;
        }

        case 90092:          //女神摇一摇界面
        {
            if (UserManager.Instance.self.getUserLevel() >= mSample.showLv)
            {
                if (UserManager.Instance.self.getVipLevel() < mSample.condition.conditions[Mathf.Min((task.index - 1) * 2 + 1, mSample.condition.conditions.Length - 1)])
                {
                    UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_07", mSample.condition.conditions[(task.index - 1) * 2 + 1].ToString()));
                    return;
                }
                if (TaskManagerment.Instance.isComplete(task) || (task.condition >= mSample.condition.conditions[mSample.condition.conditions.Length - 2]))
                {
                    UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_05"));
                    return;
                }
                win.entranceId = NoticeSampleManager.Instance.getNoticeSampleBySid(NoticeType.GODDNESS_SHAKE_SID).entranceId;
                win.updateSelectButton(NoticeType.GODDNESS_SHAKE_SID);
                win.initTopButton();
                MaskWindow.UnlockUI();
            }
            else
            {
                showTip(mSample.showLv);
            }
            break;
        }

        case 90093:          //讨伐界面
        {
            if (UserManager.Instance.self.getUserLevel() >= mSample.showLv && UserManager.Instance.self.getVipLevel() >= 3)
            {
                //Mathf.Min((task.index-1)*2+1,mSample.condition.conditions.Length -1)
                if (UserManager.Instance.self.getVipLevel() < mSample.condition.conditions[Mathf.Min((task.index - 1) * 2 + 1, mSample.condition.conditions.Length - 1)])
                {
                    UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_07", mSample.condition.conditions[(task.index - 1) * 2 + 1].ToString()));
                    return;
                }
                if (TaskManagerment.Instance.isComplete(task) || (task.condition >= mSample.condition.conditions[mSample.condition.conditions.Length - 2]))
                {
                    UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_05"));
                    return;
                }
                FuBenGetCurrentFPort port = FPortManager.Instance.getFPort("FuBenGetCurrentFPort") as FuBenGetCurrentFPort;
                port.getInfo((bool b) => {
                        if (b)
                        {
                            UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_03"));
                            return;
                        }
                        else
                        {
                            UiManager.Instance.openWindow <WarChooseWindow> ();
                            return;
                        }
                    });
            }
            else
            {
                showTip(mSample.showLv, 3);
            }
            break;
        }

        case 90094:          //高级裂魂界面
        {
            if (UserManager.Instance.self.getVipLevel() < mSample.condition.conditions[Mathf.Min((task.index - 1) * 2 + 1, mSample.condition.conditions.Length - 1)])
            {
                UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_07", mSample.condition.conditions[(task.index - 1) * 2 + 1].ToString()));
                return;
            }
            if (TaskManagerment.Instance.isComplete(task) || (task.condition >= mSample.condition.conditions[mSample.condition.conditions.Length - 2]))
            {
                UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_05"));
                return;
            }
            if (UserManager.Instance.self.getUserLevel() >= mSample.showLv && UserManager.Instance.self.getVipLevel() >= CommonConfigSampleManager.Instance.getSampleBySid <DailyRebateSample>(6).getTimesInt(1))
            {
                UiManager.Instance.openWindow <StarSoulWindow> ((win) => {
                        win.init(1);
                    });
            }
            else
            {
                showTip(mSample.showLv, 4);
            }
            break;
        }

        case 90095:          //神秘商店
        {
            if (UserManager.Instance.self.getVipLevel() < mSample.condition.conditions[Mathf.Min((task.index - 1) * 2 + 1, mSample.condition.conditions.Length - 1)])
            {
                UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_07", mSample.condition.conditions[(task.index - 1) * 2 + 1].ToString()));
                return;
            }
            if (TaskManagerment.Instance.isComplete(task) || (task.condition >= mSample.condition.conditions[mSample.condition.conditions.Length - 2]))
            {
                UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_05"));
                return;
            }
            if (UserManager.Instance.self.getUserLevel() >= mSample.showLv)
            {
                UiManager.Instance.openWindow <ShopWindow> ((win) => {
                        win.setTitle(LanguageConfigManager.Instance.getLanguage("shop_mystical"));
                        win.init(ShopWindow.TAP_MYSTICAL_CONTENT);
                    });
            }
            else
            {
                showTip(mSample.showLv);
            }
            break;
        }

        case 90096:          //神魔宝库
        {
            if (UserManager.Instance.self.getVipLevel() < mSample.condition.conditions[Mathf.Min((task.index - 1) * 2 + 1, mSample.condition.conditions.Length - 1)])
            {
                UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_07", mSample.condition.conditions[(task.index - 1) * 2 + 1].ToString()));
                return;
            }
            if (TaskManagerment.Instance.isComplete(task) || (task.condition >= mSample.condition.conditions[mSample.condition.conditions.Length - 2]))
            {
                UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice_dailyRebate_05"));
                return;
            }

            FuBenGetCurrentFPort port = FPortManager.Instance.getFPort("FuBenGetCurrentFPort") as FuBenGetCurrentFPort;
            port.getInfo((bool b) => {
                    if (b)
                    {
                        UiManager.Instance.openDialogWindow <MessageWindow> ((win) => {
                            win.initWindow(2, LanguageConfigManager.Instance.getLanguage("s0094"), LanguageConfigManager.Instance.getLanguage("teamEdit_err03"),
                                           LanguageConfigManager.Instance.getLanguage("winLinkErr01"), (msgHandle) => {
                                if (msgHandle.buttonID == MessageHandle.BUTTON_RIGHT)
                                {
                                    UiManager.Instance.clearWindows(UiManager.Instance.getWindow <MainWindow> ());
                                    FuBenManagerment.Instance.inToFuben();
                                }
                            });
                        });
                    }
                    else
                    {
                        if (UserManager.Instance.self.getUserLevel() >= mSample.showLv)
                        {
                            FuBenInfoFPort _port = FPortManager.Instance.getFPort("FuBenInfoFPort") as FuBenInfoFPort;
                            _port.info(intoTowerFuben, ChapterType.TOWER_FUBEN);
                        }
                        else
                        {
                            showTip(mSample.showLv);
                        }
                        return;
                    }
                });
            break;
        }
        }
    }