Example #1
0
        public float GetScoreValue()
        {
            CPlayerKDAStat playerKDAStat = Singleton <BattleStatistic> .instance.m_playerKDAStat;
            float          teamKDA       = playerKDAStat.GetTeamKDA(this.PlayerCamp);
            int            teamKillNum   = playerKDAStat.GetTeamKillNum(this.PlayerCamp);
            int            teamDeadNum   = playerKDAStat.GetTeamDeadNum(this.PlayerCamp);
            float          num4          = 0f;
            float          num5          = 0f;
            float          num6          = 0f;
            float          num7          = 0f;

            if (teamKDA > 0f)
            {
                num4 = (this.KDAValue * 1f) / teamKDA;
            }
            if (teamKillNum > 0)
            {
                num5 = ((this.numKill + this.numAssist) * 1f) / ((float)teamKillNum);
            }
            if (teamKillNum > 0)
            {
                num6 = (this.numKill * 1f) / ((float)teamKillNum);
            }
            if (teamDeadNum > 0)
            {
                num7 = (this.numDead * 1f) / ((float)teamDeadNum);
            }
            return(((num4 + num5) + num6) - num7);
        }
Example #2
0
        public void UpdateLogic()
        {
            uint num = (uint)Singleton <FrameSynchr> .instance.LogicFrameTick;

            if (num > this.m_LastRecordTick + 30000u && num > 60000u)
            {
                this.m_LastRecordTick = num;
                this._campR1Cache.Reset();
                this._campR2Cache.Reset();
                DictionaryView <uint, PlayerKDA> .Enumerator enumerator = this.m_PlayerKDA.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    KeyValuePair <uint, PlayerKDA> current     = enumerator.Current;
                    ListView <HeroKDA> .Enumerator enumerator2 = current.get_Value().GetEnumerator();
                    while (enumerator2.MoveNext())
                    {
                        HeroKDA current2 = enumerator2.Current;
                        current2.RecordJudgeStatc();
                        if (current2.actorHero)
                        {
                            if (current2.actorHero.handle.TheActorMeta.ActorCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_1)
                            {
                                CPlayerKDAStat.CampRecordAux(ref this._campR1Cache, current2);
                            }
                            else if (current2.actorHero.handle.TheActorMeta.ActorCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_2)
                            {
                                CPlayerKDAStat.CampRecordAux(ref this._campR2Cache, current2);
                            }
                        }
                        else
                        {
                            DebugHelper.Assert(false, "heroKda.actorHero is released! _handleSeq = {0} , _handleObj = {1} , _handleObj.usingSeq = {2} , isFighting = {3}", new object[]
                            {
                                current2.actorHero._handleSeq,
                                current2.actorHero._handleObj,
                                (current2.actorHero._handleObj != null) ? current2.actorHero._handleObj.usingSeq : 0u,
                                Singleton <BattleLogic> .instance.isFighting.ToString()
                            });
                        }
                    }
                }
                this.m_CampJudgeRecords.Add(this._campR1Cache);
                this.m_CampJudgeRecords.Add(this._campR2Cache);
            }
        }