This commit is contained in:
mark 2009-01-30 23:12:13 +00:00
parent ea0e037770
commit 96a37544fd
17 changed files with 211 additions and 163 deletions

View file

@ -6,12 +6,15 @@ using Server.Network;
namespace Server.Items
{
[FlipableAttribute( 0xe80, 0x9a8 )]
[FlipableAttribute( 0xE80, 0x9A8 )]
public class StrongBox : BaseContainer, IChopable
{
private Mobile m_Owner;
private BaseHouse m_House;
public override double DefaultWeight{ get{ return 100; } }
public override int LabelNumber { get { return 1023712; } }
public StrongBox( Mobile owner, BaseHouse house ) : base( 0xE80 )
{
m_Owner = owner;

View file

@ -65,6 +65,11 @@ namespace Server.Items
break;
}
}
if ( !( m_Commodity is ICommodity ) ) //Apparently, there may be items out there with this. Funky.
{
Timer.DelayCall( TimeSpan.Zero, this.Delete );
}
}
public CommodityDeed( Item commodity ) : base( 0x14F0 )
@ -100,7 +105,7 @@ namespace Server.Items
{
base.GetProperties( list );
if ( m_Commodity != null )
if ( m_Commodity != null && m_Commodity is ICommodity )
list.Add( 1060658, "#{0}\t{1}", ((ICommodity)m_Commodity).DescriptionNumber, m_Commodity.Amount ); // ~1_val~: ~2_val~
}
@ -108,7 +113,7 @@ namespace Server.Items
{
base.OnSingleClick( from );
if ( m_Commodity != null )
if ( m_Commodity != null && m_Commodity is ICommodity )
from.Send( new UnicodeMessage( Serial, ItemID, MessageType.Label, 0x3B2, 3, "ENU", "", ((ICommodity)m_Commodity).Description ) );
}

View file

@ -296,15 +296,8 @@ namespace Server.Items
m_FacialHair = facialhair;
#if false
// This corpse does not turn to bones if:
// (the owner is not a player) and (the owner doesn't have a human body)
m_NoBones = !owner.Player && !owner.Body.IsHuman;
#else
// This corpse does not turn to bones if:
// (the owner is not a player)
// This corpse does not turn to bones if: the owner is not a player
m_NoBones = !owner.Player;
#endif
m_Looters = new List<Mobile>();
m_EquipItems = equipItems;

View file

@ -301,7 +301,7 @@ namespace Server.Items
if ( book == null )
return;
book.m_Entries = new List<RunebookEntry>(); //Currently, when duping, it just copies over the ref over the already made blank ArrayList
book.m_Entries = new List<RunebookEntry>();
for ( int i = 0; i < m_Entries.Count; i++ )
{

View file

@ -202,6 +202,7 @@ namespace Server.Items
else if ( targeted is Item )
{
Item item = (Item)targeted;
int reqCharges = (int)Math.Max( 1, Math.Ceiling( item.TotalWeight / 10.0 ) );
if ( !item.IsChildOf( from.Backpack ) )
{
@ -227,9 +228,13 @@ namespace Server.Items
{
MessageHelper.SendLocalizedMessageTo( m_Bag, from, 1054110, 0x59 ); // Your bank box is full.
}
else if ( Core.ML && reqCharges > m_Bag.Charges )
{
from.SendLocalizedMessage( 1079932 ); //You don't have enough charges to send that much weight
}
else
{
m_Bag.Charges--;
m_Bag.Charges -= (Core.ML ? reqCharges : 1);
MessageHelper.SendLocalizedMessageTo( m_Bag, from, 1054150, 0x59 ); // The item was placed in your bank box.
}

View file

@ -3351,6 +3351,10 @@ namespace Server.Items
if( Core.ML )
{
Attributes.WeaponDamage += (int)(from.Skills.ArmsLore.Value / 20);
if ( Attributes.WeaponDamage > 50 )
Attributes.WeaponDamage = 50;
from.CheckSkill( SkillName.ArmsLore, 0, 100 );
}
}