public static CharacterCharacteristicsInformations GetCharacterCharacteristics(StatsRecord stats, Character character) // voir les GetBase(0)
        {
            var align    = character.GetActorExtendedAlignement();
            var expFloor = ExperienceRecord.GetExperienceForLevel(character.Record.Level);

            var mpMax = character.StatsRecord.MovementPoints;
            var apMax = character.StatsRecord.ActionPoints;


            if (character.FighterInstance != null)
            {
                mpMax = character.FighterInstance.FighterStats.RealStats.MovementPoints;
                apMax = character.FighterInstance.FighterStats.RealStats.ActionPoints;
            }
            var expNextFloor  = ExperienceRecord.GetExperienceForLevel((uint)(character.Record.Level + 1));
            var detailedstats = new CharacterCharacteristicsInformations(character.Record.Exp, expFloor, expNextFloor, character.Record.Kamas, character.Record.StatsPoints, 0, character.Record.SpellPoints, align,
                                                                         (uint)(character.CurrentStats.LifePoints), (uint)stats.LifePoints, character.CurrentStats.Energy, (ushort)stats.MaxEnergyPoints, stats.ActionPoints, stats.MovementPoints, GetBase((short)character.Initiative), GetBase(stats.Prospecting),
                                                                         GetBase((short)apMax), GetBase((short)mpMax), GetBase(stats.BaseStrength, stats.ContextStrength, stats.PermanentStrenght), GetBase(stats.BaseVitality, stats.ContextVitality, stats.PermanentVitality), GetBase(stats.BaseWisdom, stats.ContextWisdom, stats.PermanentWisdom), GetBase(stats.BaseChance, stats.ContextChance, stats.PermanentChance), GetBase(stats.BaseAgility, stats.ContextAgility, stats.PermanentAgility), GetBase(stats.BaseIntelligence, stats.ContextIntelligence, stats.PermanentIntelligence),
                                                                         GetBase(stats._Range), GetBase(stats.SummonableCreaturesBoost), GetBase(stats.Reflect), GetBase(stats.CriticalHit), (ushort)stats.CriticalHitWeapon, GetBase(0), GetBase(stats.HealBonus), GetBase(stats.AllDamagesBonus),
                                                                         GetBase(stats.WeaponDamagesBonusPercent), GetBase(stats.AllDamagesBonusPercent), GetBase(stats.TrapBonus), GetBase(stats.TrapBonusPercent), GetBase(stats.GlyphBonusPercent), GetBase(0),
                                                                         GetBase(0), GetBase(0), GetBase(stats.APReduction, stats.ContextAPReduction), GetBase(0), GetBase(stats.PushDamageBonus), GetBase(stats.CriticalDamageBonus), GetBase(stats.NeutralDamageBonus), GetBase(stats.EarthDamageBonus),
                                                                         GetBase(stats.WaterDamageBonus), GetBase(stats.AirDamageBonus), GetBase(stats.FireDamageBonus), GetBase(stats.DodgePA), GetBase(stats.DodgePM), GetBase(stats.NeutralResistPercent),
                                                                         GetBase(stats.EarthResistPercent), GetBase(stats.WaterResistPercent), GetBase(stats.AirResistPercent), GetBase(stats.FireResistPercent), GetBase(stats.NeutralReduction),
                                                                         GetBase(stats.EarthReduction), GetBase(stats.WaterReduction), GetBase(stats.AirReduction), GetBase(stats.FireReduction), GetBase(stats.PushDamageReduction),
                                                                         GetBase(stats.CriticalDamageReduction), GetBase(stats.PvPNeutralResistPercent), GetBase(stats.PvPEarthResistPercent), GetBase(stats.PvPWaterResistPercent), GetBase(stats.PvPAirResistPercent),
                                                                         GetBase(stats.PvPFireResistPercent), GetBase(stats.PvPNeutralReduction), GetBase(stats.PvPEarthReduction), GetBase(stats.PvPWaterReduction), GetBase(stats.PvPAirReduction), GetBase(stats.PvPFireReduction),
                                                                         new CharacterSpellModification[0], 0);

            return(detailedstats);
        }
Пример #2
0
        public static sbyte GetGrade(ushort honor)
        {
            sbyte            result;
            ExperienceRecord highest = HighestHonorExperience();

            if (honor >= highest.Honor)
            {
                result = MaxGrade;
            }
            else
            {
                result = (sbyte)(Experiences.FirstOrDefault(x => x.Honor > honor).Level - 1);
            }
            return(result);
        }
Пример #3
0
        public static ushort GetJobLevel(ulong experience)
        {
            ushort           result;
            ExperienceRecord highest = HighestExperience();

            if (experience >= highest.Job)
            {
                result = highest.Level;
            }
            else
            {
                result = (ushort)(Experiences.FirstOrDefault(x => x.Job > experience).Level - 1);
            }
            return(result);
        }
Пример #4
0
        public static ushort GetLevelFromGuildExperience(ulong exp)
        {
            ushort result;

            ExperienceRecord highest = HighestExperience();

            if (exp >= highest.Guild)
            {
                result = highest.Level;
            }
            else
            {
                result = (ushort)(Experiences.FirstOrDefault(x => x.Guild > exp).Level - 1);
            }
            return(result);
        }
 public JobExperience GetJobExperience()
 {
     return(new JobExperience(JobId, JobLevel, JobExp, ExperienceRecord.GetExperienceForLevel(JobLevel), ExperienceRecord.GetExperienceForLevel((uint)(JobLevel + 1))));
 }