Renames trapable to trappable. (#4)
This commit is contained in:
parent
bb8f09752f
commit
9a4aeaba0d
12 changed files with 22 additions and 22 deletions
|
|
@ -353,9 +353,9 @@ namespace Server.Engines.ConPVP
|
||||||
title = "Items";
|
title = "Items";
|
||||||
option = "Bandages";
|
option = "Bandages";
|
||||||
}
|
}
|
||||||
else if ( item is TrapableContainer )
|
else if ( item is TrappableContainer )
|
||||||
{
|
{
|
||||||
if ( ((TrapableContainer)item).TrapType != TrapType.None )
|
if ( ((TrappableContainer)item).TrapType != TrapType.None )
|
||||||
{
|
{
|
||||||
title = "Items";
|
title = "Items";
|
||||||
option = "Trapped Containers";
|
option = "Trapped Containers";
|
||||||
|
|
|
||||||
|
|
@ -93,8 +93,8 @@ namespace Server.Engines.Harvest
|
||||||
|
|
||||||
if ( item is Container )
|
if ( item is Container )
|
||||||
{
|
{
|
||||||
if ( item is TrapableContainer )
|
if ( item is TrappableContainer )
|
||||||
(item as TrapableContainer).ExecuteTrap( from );
|
(item as TrappableContainer).ExecuteTrap( from );
|
||||||
|
|
||||||
((Container)item).Destroy();
|
((Container)item).Destroy();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -323,7 +323,7 @@ namespace Server.Items
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Pouch : TrapableContainer
|
public class Pouch : TrappableContainer
|
||||||
{
|
{
|
||||||
[Constructable]
|
[Constructable]
|
||||||
public Pouch() : base( 0xE79 )
|
public Pouch() : base( 0xE79 )
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ namespace Server.Items
|
||||||
public virtual int MaxRespawnMinutes { get { return 90; } }
|
public virtual int MaxRespawnMinutes { get { return 90; } }
|
||||||
|
|
||||||
public virtual bool IsLockable { get { return true; } }
|
public virtual bool IsLockable { get { return true; } }
|
||||||
public virtual bool IsTrapable { get { return IsLockable; } }
|
public virtual bool IsTrappable { get { return IsLockable; } }
|
||||||
|
|
||||||
public virtual int SpawnThreshold { get { return 2; } }
|
public virtual int SpawnThreshold { get { return 2; } }
|
||||||
|
|
||||||
|
|
@ -153,7 +153,7 @@ namespace Server.Items
|
||||||
RequiredSkill = difficulty;
|
RequiredSkill = difficulty;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( IsTrapable && ( m_Content.Level > 1 || 4 > Utility.Random( 5 ) ) )
|
if( IsTrappable && ( m_Content.Level > 1 || 4 > Utility.Random( 5 ) ) )
|
||||||
{
|
{
|
||||||
if( m_Content.Level > Utility.Random( 5 ) )
|
if( m_Content.Level > Utility.Random( 5 ) )
|
||||||
TrapType = TrapType.PoisonTrap;
|
TrapType = TrapType.PoisonTrap;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ using Server.Engines.Craft;
|
||||||
|
|
||||||
namespace Server.Items
|
namespace Server.Items
|
||||||
{
|
{
|
||||||
public abstract class LockableContainer : TrapableContainer, ILockable, ILockpickable, ICraftable, IShipwreckedItem
|
public abstract class LockableContainer : TrappableContainer, ILockable, ILockpickable, ICraftable, IShipwreckedItem
|
||||||
{
|
{
|
||||||
private bool m_Locked;
|
private bool m_Locked;
|
||||||
private int m_LockLevel, m_MaxLockLevel, m_RequiredSkill;
|
private int m_LockLevel, m_MaxLockLevel, m_RequiredSkill;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ namespace Server.Items
|
||||||
PoisonTrap
|
PoisonTrap
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class TrapableContainer : BaseContainer, ITelekinesisable
|
public abstract class TrappableContainer : BaseContainer, ITelekinesisable
|
||||||
{
|
{
|
||||||
private TrapType m_TrapType;
|
private TrapType m_TrapType;
|
||||||
private int m_TrapPower;
|
private int m_TrapPower;
|
||||||
|
|
@ -58,11 +58,11 @@ namespace Server.Items
|
||||||
|
|
||||||
public virtual bool TrapOnOpen{ get{ return true; } }
|
public virtual bool TrapOnOpen{ get{ return true; } }
|
||||||
|
|
||||||
public TrapableContainer( int itemID ) : base( itemID )
|
public TrappableContainer( int itemID ) : base( itemID )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public TrapableContainer( Serial serial ) : base( serial )
|
public TrappableContainer( Serial serial ) : base( serial )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
namespace Server.Items
|
namespace Server.Items
|
||||||
{
|
{
|
||||||
class ClosedBarrel : TrapableContainer
|
class ClosedBarrel : TrappableContainer
|
||||||
{
|
{
|
||||||
public override int DefaultGumpID{ get { return 0x3e; } }
|
public override int DefaultGumpID{ get { return 0x3e; } }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2436,7 +2436,7 @@ namespace Server.Mobiles
|
||||||
|
|
||||||
private static int CheckContentForTrade( Item item )
|
private static int CheckContentForTrade( Item item )
|
||||||
{
|
{
|
||||||
if ( item is TrapableContainer && ((TrapableContainer)item).TrapType != TrapType.None )
|
if ( item is TrappableContainer && ((TrappableContainer)item).TrapType != TrapType.None )
|
||||||
return 1004044; // You may not trade trapped items.
|
return 1004044; // You may not trade trapped items.
|
||||||
|
|
||||||
if ( SkillHandlers.StolenItem.IsStolen( item ) )
|
if ( SkillHandlers.StolenItem.IsStolen( item ) )
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,9 @@ namespace Server.SkillHandlers
|
||||||
{
|
{
|
||||||
from.SendLocalizedMessage( 502816 ); // You feel that such an action would be inappropriate
|
from.SendLocalizedMessage( 502816 ); // You feel that such an action would be inappropriate
|
||||||
}
|
}
|
||||||
else if ( targeted is TrapableContainer )
|
else if ( targeted is TrappableContainer )
|
||||||
{
|
{
|
||||||
TrapableContainer targ = (TrapableContainer)targeted;
|
TrappableContainer targ = (TrappableContainer)targeted;
|
||||||
|
|
||||||
from.Direction = from.GetDirectionTo( targ );
|
from.Direction = from.GetDirectionTo( targ );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ namespace Server.SkillHandlers
|
||||||
|
|
||||||
if ( from.AccessLevel > AccessLevel.Player || from.CheckTargetSkill( SkillName.Snooping, cont, 0.0, 100.0 ) )
|
if ( from.AccessLevel > AccessLevel.Player || from.CheckTargetSkill( SkillName.Snooping, cont, 0.0, 100.0 ) )
|
||||||
{
|
{
|
||||||
if ( cont is TrapableContainer && ((TrapableContainer)cont).ExecuteTrap( from ) )
|
if ( cont is TrappableContainer && ((TrappableContainer)cont).ExecuteTrap( from ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cont.DisplayTo( from );
|
cont.DisplayTo( from );
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ namespace Server.Spells.Second
|
||||||
Caster.Target = new InternalTarget( this );
|
Caster.Target = new InternalTarget( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Target( TrapableContainer item )
|
public void Target( TrappableContainer item )
|
||||||
{
|
{
|
||||||
if ( !Caster.CanSee( item ) )
|
if ( !Caster.CanSee( item ) )
|
||||||
{
|
{
|
||||||
|
|
@ -70,9 +70,9 @@ namespace Server.Spells.Second
|
||||||
|
|
||||||
protected override void OnTarget( Mobile from, object o )
|
protected override void OnTarget( Mobile from, object o )
|
||||||
{
|
{
|
||||||
if ( o is TrapableContainer )
|
if ( o is TrappableContainer )
|
||||||
{
|
{
|
||||||
m_Owner.Target( (TrapableContainer)o );
|
m_Owner.Target( (TrappableContainer)o );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ namespace Server.Spells.Second
|
||||||
Caster.SendMessage( "What do you wish to untrap?" );
|
Caster.SendMessage( "What do you wish to untrap?" );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Target( TrapableContainer item )
|
public void Target( TrappableContainer item )
|
||||||
{
|
{
|
||||||
if ( !Caster.CanSee( item ) )
|
if ( !Caster.CanSee( item ) )
|
||||||
{
|
{
|
||||||
|
|
@ -65,9 +65,9 @@ namespace Server.Spells.Second
|
||||||
|
|
||||||
protected override void OnTarget( Mobile from, object o )
|
protected override void OnTarget( Mobile from, object o )
|
||||||
{
|
{
|
||||||
if ( o is TrapableContainer )
|
if ( o is TrappableContainer )
|
||||||
{
|
{
|
||||||
m_Owner.Target( (TrapableContainer)o );
|
m_Owner.Target( (TrappableContainer)o );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue