Example #1
0
        public Weapon( UInt16 offset, IList<byte> itemBytes, IList<byte> weaponBytes, Weapon defaults )
            : base(offset, itemBytes, defaults)
        {
            Range = weaponBytes[0];
            PatcherLib.Utilities.Utilities.CopyByteToBooleans( weaponBytes[1], ref Striking, ref Lunging, ref Direct, ref Arc, ref TwoSwords, ref TwoHands, ref Throwable, ref Force2Hands );
            Formula = AbilityFormula.PSPAbilityFormulaHash[weaponBytes[2]];
            Unknown = weaponBytes[3];
            WeaponPower = weaponBytes[4];
            EvadePercentage = weaponBytes[5];
            InflictStatus = weaponBytes[7];
            Elements = new Elements( weaponBytes[6] );

            if( defaults != null )
            {
                WeaponDefault = defaults;
                Elements.Default = WeaponDefault.Elements;
            }
        }
Example #2
0
 public void CopyWeaponTo( Weapon destination )
 {
     CopyWeapon( this, destination );
 }
Example #3
0
        public static void CopyWeapon( Weapon source, Weapon destination )
        {
            destination.Range = source.Range;
            destination.Striking = source.Striking;
            destination.Lunging = source.Lunging;
            destination.Direct = source.Direct;
            destination.Arc = source.Arc;
            destination.TwoSwords = source.TwoSwords;
            destination.TwoHands = source.TwoHands;
            destination.Throwable = source.Throwable;
            destination.Force2Hands = source.Force2Hands;
            destination.Formula = source.Formula;
            destination.Unknown = source.Unknown;
            destination.WeaponPower = source.WeaponPower;
            destination.EvadePercentage = source.EvadePercentage;
            destination.InflictStatus = source.InflictStatus;

            source.Elements.CopyTo( destination.Elements );
        }
Example #4
0
 public void CopyAllTo( Weapon destination )
 {
     CopyAll( this, destination );
 }
Example #5
0
 public static void CopyAll( Weapon source, Weapon destination )
 {
     CopyWeapon( source, destination );
     CopyCommon( source, destination );
 }