Example #1
0
    public static void UpdateChallengeReward(GC_CHALLENGE_REWARD data)
    {
        Obj_MainPlayer mainPlayer = Singleton <ObjManager> .GetInstance().MainPlayer;

        if (mainPlayer != null && data.IsLose > 0)
        {
//            int nPlayerMaxHP = mainPlayer.BaseAttr.MaxHP;

            /*if (PlayerFrameLogic.Instance() != null && //TT8816
             *  GameManager.gameManager.RunningScene == (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_WUDAOZHIDIAN)
             * {
             *  PlayerFrameLogic.Instance().ChangeHP(0, nPlayerMaxHP);
             * }*/
        }

        // TT7092
        // if (data.IsLose != 1)
        ChallengeAutoShow = false;

        /*if (GameManager.gameManager.RunningScene == (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_WUDAOZHIDIAN)
         * {
         *  if (false == GameManager.gameManager.MissionManager.IsHaveMission(38))
         *  {
         *      ChallengeAutoShow = true;
         *  }
         * }*/

        ChallengeIsLose     = data.IsLose;
        ChallengeSpirit     = data.SpiritVal;
        ChallengeReputation = 0;
        if (data.HasReputationVal)
        {
            ChallengeReputation = data.ReputationVal;
        }
        //TT 4438 从竞技场退出后应该主动打开竞技场界面
        if (GameManager.gameManager.ActiveScene.IsCopyScene() == false) //不是副本
        {
            ActiveShowChallengeUI();
        }
        else
        {
            ActivityController.RequireOpenPVPTab();
            if (ChallengeIsLose == 0)
            {            //胜利
                ChallengeRewardLogic.ShowRewardUI((int)ChallegeRewardUIType.Challenge);
            }
            else
            {            //失败
                UIManager.ShowUI(UIInfo.FailRoot);
            }
        }
        //TT 4436 新需求 从竞技场中主动退出 在回到主场景时不再弹出竞技场结算界面
        //ChallengeRewardLogic.ShowRewardUI((int)ChallegeRewardUIType.Challenge);
    }
Example #2
0
    public static void DealDuelState(GC_DUEL_STATE msg)
    {
        switch ((GC_DUEL_STATE.DUELSTATE)msg.State)
        {
        case GC_DUEL_STATE.DUELSTATE.WIN:
        case GC_DUEL_STATE.DUELSTATE.LOSE:
        {
            DuelResult = ((int)GC_DUEL_STATE.DUELSTATE.WIN == msg.State) ?
                         1 : 0;
            ChallengeRewardLogic.ShowRewardUI((int)ChallegeRewardUIType.Duel);
        }
        break;

        default:
            break;
        }
    }
    public static void DealWuLinState(GC_WULIN_STATE msg)
    {
        WuLinState = msg.State;
        int curPosition = -1;
        int curRounder  = 0;

        if (msg.HasPosition)
        {
            curPosition = msg.Position;
        }

        if (msg.HasRounder)
        {
            curRounder = msg.Rounder;
        }

        Rounder       = curRounder;
        WuLinPosition = curPosition;


        switch ((GC_WULIN_STATE.WULINSTATE)msg.State)
        {
        case GC_WULIN_STATE.WULINSTATE.KICKED:
            //..增加通知
            ChangeToDefaultWindow();
            break;

        case GC_WULIN_STATE.WULINSTATE.CLOSED:
            //..增加通知
            ChangeToDefaultWindow();
            break;

        case GC_WULIN_STATE.WULINSTATE.REGISTER:
            //..增加通知
            ChangeToDefaultWindow();
            break;

        case GC_WULIN_STATE.WULINSTATE.REGOK:
            //..增加通知
            ChangeToDefaultWindow();
            break;

        case GC_WULIN_STATE.WULINSTATE.REGISTERED:
            //..增加通知
            ChangeToDefaultWindow();
            break;

        case GC_WULIN_STATE.WULINSTATE.MAKEEFF:
            //..增加通知
            ChangeToDefaultWindow();
            break;

        case GC_WULIN_STATE.WULINSTATE.WAITNEXTROUND:
            //..增加通知
            ChangeToDefaultWindow();
            break;

        case GC_WULIN_STATE.WULINSTATE.SEARCH:
            //..暂时不处理,使用通用的发送
            break;

        case GC_WULIN_STATE.WULINSTATE.OPPVIEW:
            //..暂时不处理,使用通用的发送
            break;

        case GC_WULIN_STATE.WULINSTATE.WIN:
        case GC_WULIN_STATE.WULINSTATE.LOSE:
        {
            Resultwin = ((int)GC_WULIN_STATE.WULINSTATE.WIN == msg.State) ?
                        1 : 0;
            Rounder = msg.Rounder;
            //if (Resultwin == 0) SelfHSPos = -1;
            ChallengeRewardLogic.ShowRewardUI((int)ChallegeRewardUIType.WuLin);
        }
        break;

        case GC_WULIN_STATE.WULINSTATE.WAITFOR:
        {
            Rounder = msg.Rounder;
            GUIData.AddNotifyData2Client(false, "#{2344}");
            if (null != delegateShowWaitForOpponet)
            {
                delegateShowWaitForOpponet();
            }
        }
        break;

        case GC_WULIN_STATE.WULINSTATE.LUCKDOG:
        {
            Rounder = msg.Rounder;
            string roundTips = WuLinRoundTipPrefix();
            GUIData.AddNotifyData2Client(false, "#{4814}", roundTips);

            OppoViewInfo.Clean();
            if (null != delegateShowOpponentViewInfo)
            {
                delegateShowOpponentViewInfo();
            }
        }
        break;

        case GC_WULIN_STATE.WULINSTATE.FINISH:
            ChangeToDefaultWindow();
            break;

        case GC_WULIN_STATE.WULINSTATE.START:
            //..增加通知
            ChangeToDefaultWindow();
            break;
        }
    }
Example #4
0
 public static void ShowWorldBossChallengeResult(GC_WORLDBOSS_CHALLEGE_RES packet)
 {
     WorldBossChallengeResult = packet.Result;
     ChallengeRewardLogic.ShowRewardUI((int)ChallegeRewardUIType.WorldBoss);
 }