- GuillotineAddon has been marked constructable.

- Guillotines will no longer flip when used during the animation.
- Fixed the inverse lower ammo cost on quivers. (20% LAC counted as 80%.)
- Lower ammo cost no longer works when no ammo is present at all.
This commit is contained in:
eos 2012-07-01 02:14:31 +00:00
parent 39b8686a94
commit 53228d30db
2 changed files with 12 additions and 5 deletions

View file

@ -37,6 +37,7 @@ namespace Server.Items
{
public override BaseAddonDeed Deed { get { return new GuillotineDeed(); } }
[Constructable]
public GuillotineAddon() : base()
{
AddComponent( new GuillotineComponent(), 0, 0, 0 );
@ -87,7 +88,7 @@ namespace Server.Items
public virtual void Activate( AddonComponent c, Mobile from )
{
if ( c.ItemID == 0x125E )
if ( c.ItemID == 0x125E || c.ItemID == 0x1269 || c.ItemID == 0x1260 )
c.ItemID = 0x1269;
else
c.ItemID = 0x1247;

View file

@ -164,18 +164,24 @@ namespace Server.Items
public virtual bool OnFired( Mobile attacker, Mobile defender )
{
BaseQuiver quiver = attacker.FindItemOnLayer( Layer.Cloak ) as BaseQuiver;
Container pack = attacker.Backpack;
if ( attacker.Player )
{
if ( quiver == null || quiver.LowerAmmoCost == 0 || quiver.LowerAmmoCost > Utility.Random( 100 ) )
BaseQuiver quiver = attacker.FindItemOnLayer( Layer.Cloak ) as BaseQuiver;
Container pack = attacker.Backpack;
if ( quiver == null || Utility.Random( 100 ) >= quiver.LowerAmmoCost )
{
// consume ammo
if ( quiver != null && quiver.ConsumeTotal( AmmoType, 1 ) )
quiver.InvalidateWeight();
else if ( pack == null || !pack.ConsumeTotal( AmmoType, 1 ) )
return false;
}
else if ( quiver.FindItemByType( AmmoType ) == null && ( pack == null || pack.FindItemByType( AmmoType ) == null ) )
{
// lower ammo cost should not work when we have no ammo at all
return false;
}
}
attacker.MovingEffect( defender, EffectID, 18, 1, false, false );