Exemple #1
0
        public ulong GetPvMExperience(CharacterFighter fighter)
        {
            var pMonstersList = new List <ExperienceFormulas.MonsterData>();
            var pMembersList  = new List <ExperienceFormulas.GroupMemberData>();


            foreach (var monster in fighter.OposedTeam().GetFighters <BrainFighter>(false).FindAll(x => !x.IsSummon))
            {
                pMonstersList.Add(new ExperienceFormulas.MonsterData(monster.Level, monster.Xp));
            }

            foreach (var ally in fighter.Team.GetFighters <CharacterFighter>(false))
            {
                pMembersList.Add(new ExperienceFormulas.GroupMemberData(ally.Level, false));
            }

            ExperienceFormulas formulas = new ExperienceFormulas();

            formulas.initXpFormula(new ExperienceFormulas.PlayerData(fighter.Level,
                                                                     fighter.Character.Record.Stats.Wisdom.Total(),
                                                                     (fighter.Character.ExpMultiplicator + fighter.Character.Map.SubArea.ExperienceRate) * WorldConfiguration.Instance.XpRate),
                                   pMonstersList,
                                   pMembersList,
                                   0,
                                   0);

            if (fighter.Team.GetFighters <PlayableFighter>(false).Count > 1)
            {
                return((ulong)formulas._xpGroup);
            }
            else
            {
                return((ulong)formulas._xpSolo);
            }
        }
Exemple #2
0
        public Leukide(Fighter source, SpellLevelRecord level, MapPoint castPoint, bool criticalHit) : base(source, level, castPoint, criticalHit)
        {
            this.Owner = (CharacterFighter)source;

            foreach (var enemy in Owner.OposedTeam().GetFighters())
            {
                enemy.OnDamageTaken += Enemy_OnDamageTaken;
            }
        }
        public short CalculateEarnedHonor(CharacterFighter characterFighter)
        {
            short result;

            if (characterFighter.OposedTeam().Side == AlignmentSideEnum.ALIGNMENT_NEUTRAL || characterFighter.GetFighterOutcome() == FightOutcomeEnum.RESULT_DRAW)
            {
                result = 0;
            }
            else
            {
                double num  = (double)base.Winners.GetAllFightersWithLeavers().Sum((Fighter entry) => (int)entry.Level);
                double num2 = (double)base.Losers.GetAllFightersWithLeavers().Sum((Fighter entry) => (int)entry.Level);
                double num3 = System.Math.Floor(System.Math.Sqrt((double)characterFighter.Level) * 10.0 * (num2 / num));
                if (base.Losers == characterFighter.Team)
                {
                    num3 = -num3;
                }
                result = (short)num3;
            }
            return(result);
        }