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; } }
public void CopyWeaponTo( Weapon destination ) { CopyWeapon( this, destination ); }
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 ); }
public void CopyAllTo( Weapon destination ) { CopyAll( this, destination ); }
public static void CopyAll( Weapon source, Weapon destination ) { CopyWeapon( source, destination ); CopyCommon( source, destination ); }