// Token: 0x06009F28 RID: 40744 RVA: 0x002D03F8 File Offset: 0x002CE5F8
        public void SetRealTimePVPBattleReport(RealTimePVPBattleReport battleReport)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetRealTimePVPBattleReportRealTimePVPBattleReport_hotfix != null)
            {
                this.m_SetRealTimePVPBattleReportRealTimePVPBattleReport_hotfix.call(new object[]
                {
                    this,
                    battleReport
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            IConfigDataLoader     configDataLoader      = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            int num = configDataLoader.UtilityGetVersion(VersionInfoId.VersionInfoId_BattleReport);

            this.m_replayButton.gameObject.SetActive(battleReport.ReportType != RealTimePVPBattleReportType.Invaild && battleReport.Version == num);
            RealTimePVPBattleReportPlayerData realTimePVPBattleReportPlayerData;
            RealTimePVPBattleReportPlayerData realTimePVPBattleReportPlayerData2;

            if (projectLPlayerContext.IsMe(battleReport.PlayerDatas[0].UserId))
            {
                realTimePVPBattleReportPlayerData  = battleReport.PlayerDatas[0];
                realTimePVPBattleReportPlayerData2 = battleReport.PlayerDatas[1];
            }
            else
            {
                realTimePVPBattleReportPlayerData  = battleReport.PlayerDatas[1];
                realTimePVPBattleReportPlayerData2 = battleReport.PlayerDatas[0];
            }
            this.m_playerNameText.text  = realTimePVPBattleReportPlayerData2.Name;
            this.m_playerLevelText.text = realTimePVPBattleReportPlayerData2.Level.ToString();
            if (battleReport.Win)
            {
                this.m_scoreText.text = UIUtility.AddColorTag(realTimePVPBattleReportPlayerData.ScoreDiff.ToString(), new Color(0.13333334f, 0.6745098f, 0.219607845f));
                this.m_modeUIStateCtrl.SetToUIState("Succeed", false, true);
            }
            else
            {
                this.m_scoreText.text = UIUtility.AddColorTag(realTimePVPBattleReportPlayerData.ScoreDiff.ToString(), Color.red);
                this.m_modeUIStateCtrl.SetToUIState("Failed", false, true);
            }
            this.m_typeUIStateCtrl.SetToUIState((battleReport.ReportType != RealTimePVPBattleReportType.Friendly) ? "Ladder" : "Casual", false, true);
            TimeSpan timeSpan = projectLPlayerContext.GetServerTime() - battleReport.CreateTime;

            if (timeSpan.TotalHours < 1.0)
            {
                this.m_timeText.text = configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Time_InOneHour);
            }
            else if (timeSpan.TotalDays < 1.0 && timeSpan.TotalHours >= 1.0)
            {
                this.m_timeText.text = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Time_HoursAgo), Math.Floor(timeSpan.TotalHours).ToString());
            }
            else if (timeSpan.TotalDays >= 1.0)
            {
                this.m_timeText.text = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Time_DaysAgo), Math.Floor(timeSpan.TotalDays).ToString());
            }
            this.m_playerIconImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(realTimePVPBattleReportPlayerData2.HeadIcon)));
            this.m_battleReport           = battleReport;
        }
Exemple #2
0
        // Token: 0x0600AF19 RID: 44825 RVA: 0x0030AB50 File Offset: 0x00308D50
        public static BattleReportEndUITask StartUITask(RealTimePVPBattleReport battleReport)
        {
            UIIntentCustom uiintentCustom = new UIIntentCustom(typeof(BattleReportEndUITask).Name, null);

            uiintentCustom.SetParam("RealTimePVPBattleReport", battleReport);
            return(UIManager.Instance.StartUITask(uiintentCustom, false, false, null) as BattleReportEndUITask);
        }
    public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            int num = LuaDLL.lua_gettop(l);
            if (num == 1)
            {
                RealTimePVPBattleReport o = new RealTimePVPBattleReport();
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, o);
                result = 2;
            }
            else if (num == 2)
            {
                BattleReport battleReport;
                LuaObject.checkType <BattleReport>(l, 2, out battleReport);
                RealTimePVPBattleReport o = new RealTimePVPBattleReport(battleReport);
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, o);
                result = 2;
            }
            else
            {
                result = LuaObject.error(l, "New object failed.");
            }
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int get_PlayerDatas(IntPtr l)
    {
        int result;

        try
        {
            RealTimePVPBattleReport realTimePVPBattleReport = (RealTimePVPBattleReport)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, realTimePVPBattleReport.PlayerDatas);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int get_BPRule(IntPtr l)
    {
        int result;

        try
        {
            RealTimePVPBattleReport realTimePVPBattleReport = (RealTimePVPBattleReport)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushEnum(l, (int)realTimePVPBattleReport.BPRule);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int ToPro(IntPtr l)
    {
        int result;

        try
        {
            RealTimePVPBattleReport    report = (RealTimePVPBattleReport)LuaObject.checkSelf(l);
            ProRealTimePVPBattleReport o      = report.ToPro();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_CreateTime(IntPtr l)
    {
        int result;

        try
        {
            RealTimePVPBattleReport realTimePVPBattleReport = (RealTimePVPBattleReport)LuaObject.checkSelf(l);
            DateTime createTime;
            LuaObject.checkValueType <DateTime>(l, 2, out createTime);
            realTimePVPBattleReport.CreateTime = createTime;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_BPRule(IntPtr l)
    {
        int result;

        try
        {
            RealTimePVPBattleReport realTimePVPBattleReport = (RealTimePVPBattleReport)LuaObject.checkSelf(l);
            BattleRoomBPRule        bprule;
            LuaObject.checkEnum <BattleRoomBPRule>(l, 2, out bprule);
            realTimePVPBattleReport.BPRule = bprule;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_ReportType(IntPtr l)
    {
        int result;

        try
        {
            RealTimePVPBattleReport     realTimePVPBattleReport = (RealTimePVPBattleReport)LuaObject.checkSelf(l);
            RealTimePVPBattleReportType reportType;
            LuaObject.checkEnum <RealTimePVPBattleReportType>(l, 2, out reportType);
            realTimePVPBattleReport.ReportType = reportType;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_IsCancel(IntPtr l)
    {
        int result;

        try
        {
            RealTimePVPBattleReport realTimePVPBattleReport = (RealTimePVPBattleReport)LuaObject.checkSelf(l);
            bool isCancel;
            LuaObject.checkType(l, 2, out isCancel);
            realTimePVPBattleReport.IsCancel = isCancel;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_PlayerDatas(IntPtr l)
    {
        int result;

        try
        {
            RealTimePVPBattleReport             realTimePVPBattleReport = (RealTimePVPBattleReport)LuaObject.checkSelf(l);
            RealTimePVPBattleReportPlayerData[] playerDatas;
            LuaObject.checkArray <RealTimePVPBattleReportPlayerData>(l, 2, out playerDatas);
            realTimePVPBattleReport.PlayerDatas = playerDatas;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
        // Token: 0x0600AECB RID: 44747 RVA: 0x00309E10 File Offset: 0x00308010
        public void Open(RealTimePVPBattleReport battleReport)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OpenRealTimePVPBattleReport_hotfix != null)
            {
                this.m_OpenRealTimePVPBattleReport_hotfix.call(new object[]
                {
                    this,
                    battleReport
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            UIUtility.SetUIStateOpen(this.m_uiStateController, "Open", null, false, true);
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            int num = 0;

            if (battleReport.Win)
            {
                if (projectLPlayerContext.IsMe(battleReport.PlayerDatas[1].UserId))
                {
                    num = 1;
                }
            }
            else if (projectLPlayerContext.IsMe(battleReport.PlayerDatas[0].UserId))
            {
                num = 1;
            }
            RealTimePVPBattleReportPlayerData realTimePVPBattleReportPlayerData  = battleReport.PlayerDatas[num];
            RealTimePVPBattleReportPlayerData realTimePVPBattleReportPlayerData2 = battleReport.PlayerDatas[1 - num];

            this.m_winPlayerName.text    = realTimePVPBattleReportPlayerData.Name;
            this.m_winPlayerLV.text      = realTimePVPBattleReportPlayerData.Level.ToString();
            this.m_winPlayerIcon.sprite  = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(realTimePVPBattleReportPlayerData.HeadIcon)));
            this.m_losePlayerName.text   = realTimePVPBattleReportPlayerData2.Name;
            this.m_losePlayerLV.text     = realTimePVPBattleReportPlayerData2.Level.ToString();
            this.m_losePlayerIcon.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(realTimePVPBattleReportPlayerData2.HeadIcon)));
        }
 // Token: 0x0600761A RID: 30234 RVA: 0x00205130 File Offset: 0x00203330
 public void __callBase_SaveReport(RealTimePVPBattleReport Report)
 {
     this.m_owner.__callBase_SaveReport(Report);
 }
 // Token: 0x060075FC RID: 30204 RVA: 0x00204D3C File Offset: 0x00202F3C
 private void __callBase_SaveReport(RealTimePVPBattleReport Report)
 {
     base.SaveReport(Report);
 }