Beispiel #1
0
        public RADT()
        {
            SkillBonuses = new SkillBonus[7];

            for (int i = 0; i < 7; i++)
            {
                SkillBonuses[i] = new SkillBonus();
            }

            Male   = new Attributes();
            Female = new Attributes();
            Flags  = new HashSet <RaceFlags>();
        }
Beispiel #2
0
        public RADT(byte[] rawData) : base(rawData)
        {
            var reader = new ByteReader();

            SkillBonuses = new SkillBonus[7];
            for (int i = 0; i < 7; i++)
            {
                SkillBonuses[i]       = new SkillBonus();
                SkillBonuses[i].Skill = reader.ReadBytes <Skill>(Data);
                SkillBonuses[i].Bonus = reader.ReadBytes <int>(Data);
            }

            Male   = new Attributes();
            Female = new Attributes();

            Male.Strength   = reader.ReadBytes <int>(Data);
            Female.Strength = reader.ReadBytes <int>(Data);

            Male.Intelligence   = reader.ReadBytes <int>(Data);
            Female.Intelligence = reader.ReadBytes <int>(Data);

            Male.Willpower   = reader.ReadBytes <int>(Data);
            Female.Willpower = reader.ReadBytes <int>(Data);

            Male.Agility   = reader.ReadBytes <int>(Data);
            Female.Agility = reader.ReadBytes <int>(Data);

            Male.Speed   = reader.ReadBytes <int>(Data);
            Female.Speed = reader.ReadBytes <int>(Data);

            Male.Endurance   = reader.ReadBytes <int>(Data);
            Female.Endurance = reader.ReadBytes <int>(Data);

            Male.Personality   = reader.ReadBytes <int>(Data);
            Female.Personality = reader.ReadBytes <int>(Data);

            Male.Luck   = reader.ReadBytes <int>(Data);
            Female.Luck = reader.ReadBytes <int>(Data);

            Male.Height   = reader.ReadBytes <float>(Data);
            Female.Height = reader.ReadBytes <float>(Data);

            Male.Weight   = reader.ReadBytes <float>(Data);
            Female.Weight = reader.ReadBytes <float>(Data);

            Flags = reader.ReadFlagBytes <RaceFlags>(Data);
        }
Beispiel #3
0
        public DATA(byte[] rawData) : base(rawData)
        {
            var reader = new ByteReader();

            SkillBoosts = new SkillBonus[7];

            for (int i = 0; i < 7; i++)
            {
                SkillBoosts[i].Skill = (ActorValue)reader.ReadBytes <byte>(base.Data);
                SkillBoosts[i].Bonus = reader.ReadBytes <byte>(base.Data);
            }

            Unknown      = reader.ReadBytes <short>(base.Data);
            MaleHeight   = reader.ReadBytes <float>(base.Data);
            FemaleHeight = reader.ReadBytes <float>(base.Data);
            MaleWeight   = reader.ReadBytes <float>(base.Data);
            FemaleWeight = reader.ReadBytes <float>(base.Data);
            IsPlayable   = reader.ReadBytes <bool>(base.Data);
        }
Beispiel #4
0
        public override int GetHashCode()
        {
            int hashCode = 0;

            unchecked {
                hashCode += 1000000007 * Type.GetHashCode();
                hashCode += 1000000009 * Class.GetHashCode();
                hashCode += 1000000021 * Slot.GetHashCode();
                hashCode += 1000000033 * BreakRate.GetHashCode();
                hashCode += 1000000087 * Gender.GetHashCode();
                hashCode += 1000000093 * FreeHands.GetHashCode();
                hashCode += 1000000097 * LifePointsBonus.GetHashCode();
                hashCode += 1000000103 * SpellPointsBonus.GetHashCode();
                hashCode += 1000000123 * AttributeType.GetHashCode();
                hashCode += 1000000181 * AttributeBonus.GetHashCode();
                hashCode += 1000000207 * SkillTypeBonus.GetHashCode();
                hashCode += 1000000223 * SkillBonus.GetHashCode();
                hashCode += 1000000241 * PhysicalDamageProtection.GetHashCode();
                hashCode += 1000000271 * PhysicalDamageCaused.GetHashCode();
                hashCode += 1000000289 * AmmunitionType.GetHashCode();
                hashCode += 1000000297 * SkillType1Tax.GetHashCode();
                hashCode += 1000000321 * SkillType2Tax.GetHashCode();
                hashCode += 1000000349 * Skill1Tax.GetHashCode();
                hashCode += 1000000363 * Skill2Tax.GetHashCode();
                hashCode += 1000000403 * TorchIntensity.GetHashCode();
                hashCode += 1000000409 * AmmoAnimation.GetHashCode();
                hashCode += 1000000411 * Spell.GetHashCode();
                hashCode += 1000000427 * SpellID.GetHashCode();
                hashCode += 1000000433 * Charges.GetHashCode();
                hashCode += 1000000439 * NumRecharged.GetHashCode();
                hashCode += 1000000447 * MaxNumRecharged.GetHashCode();
                hashCode += 1000000453 * MaxCharges.GetHashCode();
                hashCode += 1000000459 * Count1.GetHashCode();
                hashCode += 1000000483 * Count2.GetHashCode();
                hashCode += 1000000513 * IconAnim.GetHashCode();
                hashCode += 1000000531 * Weight.GetHashCode();
                hashCode += 1000000579 * Value.GetHashCode();
                hashCode += 1000000007 * Icon.GetHashCode();
                hashCode += 1000000009 * UsingClass.GetHashCode();
                hashCode += 1000000021 * UsingRace.GetHashCode();
            }
            return(hashCode);
        }
 public WelcomeSkillBall() : base(6249)
 {
     Name    = m_BaseName + SkillBonus.ToString();
     Movable = false;
 }
Beispiel #6
0
        internal static object Read(SubRecordReadContext context)
        {
            var pos = 0;

            var skillBonuses = new SkillBonus[7];

            for (var i = 0; i < Constants.RACE_MAX_SKILL_BONUSES; ++i)
            {
                var skillID = BitConverter.ToInt32(context.buf, pos); pos += 4;
                var bonus   = BitConverter.ToInt32(context.buf, pos); pos += 4;

                skillBonuses[i] = new SkillBonus(skillID, bonus);
            }

            var strength = new int[2];

            strength[0] = BitConverter.ToInt32(context.buf, pos); pos += 4;
            strength[1] = BitConverter.ToInt32(context.buf, pos); pos += 4;

            var intelligence = new int[2];

            intelligence[0] = BitConverter.ToInt32(context.buf, pos); pos += 4;
            intelligence[1] = BitConverter.ToInt32(context.buf, pos); pos += 4;

            var willpower = new int[2];

            willpower[0] = BitConverter.ToInt32(context.buf, pos); pos += 4;
            willpower[1] = BitConverter.ToInt32(context.buf, pos); pos += 4;

            var agility = new int[2];

            agility[0] = BitConverter.ToInt32(context.buf, pos); pos += 4;
            agility[1] = BitConverter.ToInt32(context.buf, pos); pos += 4;

            var speed = new int[2];

            speed[0] = BitConverter.ToInt32(context.buf, pos); pos += 4;
            speed[1] = BitConverter.ToInt32(context.buf, pos); pos += 4;

            var endurance = new int[2];

            endurance[0] = BitConverter.ToInt32(context.buf, pos); pos += 4;
            endurance[1] = BitConverter.ToInt32(context.buf, pos); pos += 4;

            var personality = new int[2];

            personality[0] = BitConverter.ToInt32(context.buf, pos); pos += 4;
            personality[1] = BitConverter.ToInt32(context.buf, pos); pos += 4;

            var luck = new int[2];

            luck[0] = BitConverter.ToInt32(context.buf, pos); pos += 4;
            luck[1] = BitConverter.ToInt32(context.buf, pos); pos += 4;

            var height = new float[2];

            height[0] = BitConverter.ToSingle(context.buf, pos); pos += 4;
            height[1] = BitConverter.ToSingle(context.buf, pos); pos += 4;

            var weight = new float[2];

            weight[0] = BitConverter.ToSingle(context.buf, pos); pos += 4;
            weight[1] = BitConverter.ToSingle(context.buf, pos); pos += 4;

            var flags = BitConverter.ToInt32(context.buf, pos); pos += 4;

            return(new RaceData(context.SubRecordName, skillBonuses, strength, intelligence, willpower, agility, speed,
                                endurance, personality, luck, height, weight, flags));
        }