示例#1
0
        public float GetHeroContribution(Units target)
        {
            int unique_id = target.unique_id;

            if (this.MyData == null)
            {
                return(0f);
            }
            int         num         = this.MyData.heroKill.GetHeroRecord(unique_id);
            int         num2        = this.MyData.monsterKill.GetHeroRecord(unique_id);
            int         heroRecord  = this.MyData.towerKill.GetHeroRecord(unique_id);
            AchieveData achieveData = GameManager.Instance.AchieveManager.GetAchieveData(unique_id, target.teamType);

            if (achieveData != null)
            {
                num  = achieveData.TotalKill;
                num2 = achieveData.MonsterKillNum;
            }
            float num3 = (float)num2 * this.ConfigData.monsterData.normalRate + (float)num * this.ConfigData.heroData.normalRate + (float)heroRecord * this.ConfigData.towerData.normalRate;
            float num4 = (float)num2 * this.ConfigData.monsterData.KillRate + (float)heroRecord * this.ConfigData.towerData.KillRate + (float)num * this.GetKillHeroSingleReward();

            BattleAttrGrowth.KillData killData = GameManager.Instance.AchieveManager.GetKillData(this.Team);
            int   num5 = (killData.KillFirstHeroId != unique_id) ? 0 : 1;
            int   num6 = (killData.KillFirstMonsterId != unique_id) ? 0 : 1;
            float num7 = (float)num5 * this.ConfigData.heroData.firstKillRate + (float)num6 * this.ConfigData.monsterData.firstKillRate;
            float num8 = 0f;

            if (achieveData != null)
            {
                num8 = (float)(-(float)achieveData.SelfDeathTime) * this.ConfigData.heroData.deathPenaltyRate;
            }
            return(num3 + num4 + num7 + num8);
        }
示例#2
0
        private void CaclBonusExp()
        {
            BattleAttrGrowth.KillData killData = GameManager.Instance.AchieveManager.GetKillData(this.Team);
            int num  = (!killData.KillFirstHero) ? 0 : 1;
            int num2 = (!killData.KillFirstMonster) ? 0 : 1;

            this._bonusExp = (float)num * this.ConfigData.heroData.firstKillRate + (float)num2 * this.ConfigData.monsterData.firstKillRate + (float)killData.FinishKillingTimes * this.ConfigData.heroData.finishKillingRate;
        }
示例#3
0
 public void AddMonsterKill(int attackerId)
 {
     this.TotalMonsterKill++;
     if (KillData.GlobalMonsterKill == 0)
     {
         this.KillFirstMonster   = true;
         this.KillFirstMonsterId = attackerId;
     }
     KillData.AddGlobalMonsterKill();
 }
示例#4
0
 public void AddHeroKill(int attackerId)
 {
     this.TotalHeroKill++;
     this.TitleLevel++;
     if (KillData.GlobalHeroKill == 0)
     {
         this.KillFirstHero   = true;
         this.KillFirstHeroId = attackerId;
     }
     KillData.AddGlobalHeroKill();
 }