public virtual void LoadWeapon(Mobile from, BaseShipProjectile projectile) { if (projectile == null) { return; } if (this.m_Projectile != null && !this.m_Projectile.Deleted) { from.SendMessage("{0} unloaded", this.m_Projectile.Name); from.AddToBackpack(this.m_Projectile); } if (projectile.Amount > 1) { //projectile.Amount--; //Projectile = projectile.Dupe(1); this.Projectile = Mobile.LiftItemDupe(projectile, projectile.Amount - 1) as BaseShipProjectile; } else { this.Projectile = projectile; } Projectile = projectile; if (this.m_Projectile != null) { m_Projectile.Internalize(); from.SendMessage("{0} loaded.", this.m_Projectile.Name); } }
/* * public override Item Dupe(int amount) * { * BaseSiegeProjectile s = new BaseSiegeProjectile(amount); * * return this.Dupe(s, amount); * } */ public override void OnAfterDuped(Item newItem) { base.OnAfterDuped(newItem); BaseShipProjectile s = newItem as BaseShipProjectile; // dupe the siege projectile props if (s != null) { s.FiringSpeed = FiringSpeed; s.AccuracyBonus = AccuracyBonus; s.Area = Area; s.Range = Range; s.FireDamage = FireDamage; s.PhysicalDamage = PhysicalDamage; } }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 1: this.m_FixedFacing = reader.ReadBool(); this.m_Draggable = reader.ReadBool(); this.m_Packable = reader.ReadBool(); goto case 0; case 0: this.m_Facing = reader.ReadInt(); this.m_Projectile = reader.ReadItem <BaseShipProjectile>(); this.m_NextFiringTime = reader.ReadDateTime(); break; } }
public ShipWeaponTarget(BaseShipProjectile projectile) : base(2, true, TargetFlags.None) { m_projectile = projectile; }
public ShipWeaponTarget(BaseShipProjectile projectile) : base(2, true, TargetFlags.None) { this.m_projectile = projectile; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 1: this.m_FixedFacing = reader.ReadBool(); this.m_Draggable = reader.ReadBool(); this.m_Packable = reader.ReadBool(); goto case 0; case 0: this.m_Facing = reader.ReadInt(); this.m_Projectile = reader.ReadItem<BaseShipProjectile>(); this.m_NextFiringTime = reader.ReadDateTime(); break; } }
public virtual void LoadWeapon(Mobile from, BaseShipProjectile projectile) { if (projectile == null) return; if (this.m_Projectile != null && !this.m_Projectile.Deleted) { from.SendMessage("{0} unloaded", this.m_Projectile.Name); from.AddToBackpack(this.m_Projectile); } if (projectile.Amount > 1) { //projectile.Amount--; //Projectile = projectile.Dupe(1); this.Projectile = Mobile.LiftItemDupe(projectile, projectile.Amount - 1) as BaseShipProjectile; } else { this.Projectile = projectile; } Projectile = projectile; if (this.m_Projectile != null) { m_Projectile.Internalize(); from.SendMessage("{0} loaded.", this.m_Projectile.Name); } }