diff --git a/Scripts/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs b/Scripts/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs
index 642fb912c..8df43609a 100644
--- a/Scripts/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs
+++ b/Scripts/Items/Skill Items/Magical/Potions/Explosion Potions/BaseExplosionPotion.cs
@@ -71,6 +71,7 @@ namespace Server.Items
}
ThrowTarget targ = from.Target as ThrowTarget;
+ this.Stackable = false; // Scavenged explosion potions won't stack with those ones in backpack, and still will explode.
if ( targ != null && targ.Potion == this )
return;
diff --git a/Scripts/Items/Special/SoulStone.cs b/Scripts/Items/Special/SoulStone.cs
index 5b0d941d1..8a9cdcc98 100644
--- a/Scripts/Items/Special/SoulStone.cs
+++ b/Scripts/Items/Special/SoulStone.cs
@@ -51,10 +51,8 @@ namespace Server.Items
}
}
- public static readonly TimeSpan UseDelay = TimeSpan.FromDays( 1.0 );
-
- private string m_Account;
- private DateTime m_NextUse;
+ private string m_Account, m_LastUserName;
+ private DateTime m_NextUse; // TODO: unused, it's here not to break serialize/deserialize
private SkillName m_Skill;
private double m_SkillValue;
@@ -67,10 +65,10 @@ namespace Server.Items
}
[CommandProperty( AccessLevel.GameMaster )]
- public DateTime NextUse
+ public string LastUserName
{
- get{ return m_NextUse; }
- set{ m_NextUse = value; }
+ get{ return m_LastUserName; }
+ set{ m_LastUserName = value; InvalidateProperties(); }
}
[CommandProperty( AccessLevel.GameMaster )]
@@ -128,7 +126,6 @@ namespace Server.Items
m_ActiveItemID = activeItemID;
m_Account = account;
- m_NextUse = DateTime.MinValue;
}
public override void GetProperties( ObjectPropertyList list )
@@ -139,6 +136,14 @@ namespace Server.Items
{
list.Add( 1070721, "#{0}\t{1:0.0}", 1044060 + (int)this.Skill, this.SkillValue ); // Skill stored: ~1_skillname~ ~2_skillamount~
}
+
+ string name = this.LastUserName;
+
+ if ( name == null )
+ name = String.Format( "#{0}", 1074235 ); // Unknown
+
+ list.Add( 1041602, "{0}", name ); // Owner: ~1_val~
+
}
private static bool CheckCombat( Mobile m, TimeSpan time )
@@ -214,19 +219,6 @@ namespace Server.Items
from.SendLocalizedMessage( 1070735 ); // You may not use a Soulstone while your character is paralyzed.
return false;
}
- else if ( now < this.NextUse )
- {
- TimeSpan time = this.NextUse - now;
-
- if ( time.TotalHours > 0.0 )
- from.SendLocalizedMessage( 1070736, ((int)time.TotalHours).ToString() ); // You must wait ~1_hours~ hours before you can use your Soulstone.
- else if ( time.TotalMinutes > 0.0 )
- from.SendLocalizedMessage( 1070737, ((int)time.TotalMinutes).ToString() ); // You must wait ~1_minutes~ minutes before you can use your Soulstone.
- else
- from.SendLocalizedMessage( 1070738, ((int)time.TotalSeconds).ToString() ); // You must wait ~1_seconds~ seconds before you can use your Soulstone.
-
- return false;
- }
#region Scroll of Alacrity
if ( pm.AcceleratedStart > DateTime.Now )
@@ -442,6 +434,8 @@ namespace Server.Items
from.SendLocalizedMessage( 1070712 ); // You have successfully transferred your skill points into the Soulstone.
+ m_Stone.LastUserName = from.Name;
+
Effects.SendLocationParticles( EffectItem.Create( from.Location, from.Map, EffectItem.DefaultDuration ), 0, 0, 0, 0, 0, 5060, 0 );
Effects.PlaySound( from.Location, from.Map, 0x243 );
@@ -558,7 +552,6 @@ namespace Server.Items
cannotAbsorb = true;
}
- //if ( fromSkill.Lock != SkillLock.Up || ( from.SkillsTotal - fromSkill.BaseFixedPoint + (int)(skillValue * 10) > from.SkillsCap ) )
if ( cannotAbsorb )
{
//
Unable to Absorb Selected Skill from Soulstone
@@ -641,10 +634,10 @@ namespace Server.Items
fromSkill.Base = skillValue;
m_Stone.SkillValue = 0.0;
- m_Stone.NextUse = DateTime.Now + UseDelay;
-
from.SendLocalizedMessage( 1070713 ); // You have successfully absorbed the Soulstone's skill points.
+ m_Stone.LastUserName = from.Name;
+
Effects.SendLocationParticles( EffectItem.Create( from.Location, from.Map, EffectItem.DefaultDuration ), 0, 0, 0, 0, 0, 5060, 0 );
Effects.PlaySound( from.Location, from.Map, 0x243 );
@@ -763,15 +756,19 @@ namespace Server.Items
{
base.Serialize( writer );
- writer.WriteEncodedInt( 2 ); // version
+ writer.WriteEncodedInt( 3 ); // version
+ //version 3
+ writer.Write( (string) m_LastUserName );
+
+ //version 2
writer.Write( (int)m_Level );
writer.Write( m_ActiveItemID );
writer.Write( m_InactiveItemID );
writer.Write( (string) m_Account );
- writer.Write( (DateTime) m_NextUse );
+ writer.Write( (DateTime) m_NextUse ); //TODO: delete it in a harmless way
writer.WriteEncodedInt( (int) m_Skill );
writer.Write( (double) m_SkillValue );
@@ -785,6 +782,11 @@ namespace Server.Items
switch( version )
{
+ case 3:
+ {
+ m_LastUserName = reader.ReadString();
+ goto case 2;
+ }
case 2:
{
m_Level = (SecureLevel)reader.ReadInt();
@@ -800,7 +802,7 @@ namespace Server.Items
case 0:
{
m_Account = reader.ReadString();
- m_NextUse = reader.ReadDateTime();
+ m_NextUse = reader.ReadDateTime(); //TODO: delete it in a harmless way
m_Skill = (SkillName)reader.ReadEncodedInt();
m_SkillValue = reader.ReadDouble();
@@ -888,7 +890,7 @@ namespace Server.Items
}
else
{
- ActiveItemID = ItemID;
+ ActiveItemID = ItemID;
}
InactiveItemID = ActiveItemID;
diff --git a/Scripts/Misc/Gifts/Winter2004/PileOfGlacialSnow.cs b/Scripts/Misc/Gifts/Winter2004/PileOfGlacialSnow.cs
index c6a4db5fe..510ea7d9b 100644
--- a/Scripts/Misc/Gifts/Winter2004/PileOfGlacialSnow.cs
+++ b/Scripts/Misc/Gifts/Winter2004/PileOfGlacialSnow.cs
@@ -61,6 +61,9 @@ namespace Server.Items
{
from.SendLocalizedMessage( 1042010 ); // You must have the object in your backpack to use it.
}
+ else if ( from.Mounted )
+ from.SendLocalizedMessage ( 1010097 ); // You cannot use this while mounted.
+
else if ( from.CanBeginAction( typeof( SnowPile ) ) )
{
from.SendLocalizedMessage( 1005575 ); // You carefully pack the snow into a ball...
diff --git a/Scripts/Misc/Gifts/Winter2004/SnowPile.cs b/Scripts/Misc/Gifts/Winter2004/SnowPile.cs
index cbaff4881..c51e5632e 100644
--- a/Scripts/Misc/Gifts/Winter2004/SnowPile.cs
+++ b/Scripts/Misc/Gifts/Winter2004/SnowPile.cs
@@ -47,6 +47,9 @@ namespace Server.Items
{
from.SendLocalizedMessage( 1042010 ); // You must have the object in your backpack to use it.
}
+ else if ( from.Mounted )
+ from.SendLocalizedMessage ( 1010097 ); // You cannot use this while mounted.
+
else if ( from.CanBeginAction( typeof( SnowPile ) ) )
{
from.SendLocalizedMessage( 1005575 ); // You carefully pack the snow into a ball...
diff --git a/Scripts/Mobiles/Monsters/Ore Elementals/DullCopperElemental.cs b/Scripts/Mobiles/Monsters/Ore Elementals/DullCopperElemental.cs
index b2d5d19b5..a6298f910 100644
--- a/Scripts/Mobiles/Monsters/Ore Elementals/DullCopperElemental.cs
+++ b/Scripts/Mobiles/Monsters/Ore Elementals/DullCopperElemental.cs
@@ -55,6 +55,7 @@ namespace Server.Mobiles
public override bool AutoDispel{ get{ return true; } }
public override bool BleedImmune{ get{ return true; } }
+ public override int TreasureMapLevel{ get{ return 1; } }
public DullCopperElemental( Serial serial ) : base( serial )
{
diff --git a/Scripts/Multis/HouseFoundation.cs b/Scripts/Multis/HouseFoundation.cs
index ef8fed63b..83e8e4f91 100644
--- a/Scripts/Multis/HouseFoundation.cs
+++ b/Scripts/Multis/HouseFoundation.cs
@@ -715,7 +715,7 @@ namespace Server.Multis
public bool IsHiddenToCustomizer( Item item )
{
- return (item == m_Signpost || (m_Fixtures != null && m_Fixtures.Contains( item )));
+ return (item == m_Signpost || item == m_SignHanger || item == Sign || (m_Fixtures != null && m_Fixtures.Contains( item )));
}
public static void Initialize()
@@ -999,13 +999,6 @@ namespace Server.Multis
}
}
- public static bool IsSignHanger( int itemID )
- {
- itemID &= 0x3FFF;
-
- return (itemID >= 0xB97 && itemID < 0xBA3);
- }
-
public int MaxLevels
{
get
@@ -1094,6 +1087,8 @@ namespace Server.Multis
private static int[] m_StairIDs = new int[]
{
0x71F, 0x736, 0x737, 0x749,
+ 0x35D4, 0x35D3, 0x35D6, 0x35D5,
+ 0x360B, 0x360A, 0x360D, 0x360C,
0x7BB, 0x7BC
};
@@ -1127,7 +1122,7 @@ namespace Server.Multis
delta = -1;
- for( int i = 0; delta < 0 && i < m_StairIDs.Length; ++i )
+ for( int i = 0; ( delta < 0 || delta > 0 ) && i < m_StairIDs.Length; ++i )
{
delta = (m_StairIDs[i] - id);
dir = i % 4;
@@ -1268,7 +1263,7 @@ namespace Server.Multis
int ax = x + mcl.Center.X;
int ay = y + mcl.Center.Y;
- if( IsSignHanger( itemID ) || (z == 0 && ax >= 0 && ax < mcl.Width && ay >= 0 && ay < (mcl.Height - 1)) )
+ if( z == 0 && ax >= 0 && ax < mcl.Width && ay >= 0 && ay < (mcl.Height - 1) )
{
/* Component is not deletable
* - Resend design state
@@ -1279,9 +1274,12 @@ namespace Server.Multis
return;
}
- // Remove the component
- if( !DeleteStairs( mcl, itemID, x, y, z ) )
- mcl.Remove( itemID, x, y, z );
+ mcl.Remove( itemID, x, y, z );
+
+ int dir = 0;
+
+ if( IsStair( itemID, ref dir ) || IsStairBlock( itemID ) )
+ design.SendGeneralInfoTo( state );
// If needed, replace removed component with a dirt tile
if( ax >= 1 && ax < mcl.Width && ay >= 1 && ay < mcl.Height - 1 )
@@ -2036,6 +2034,12 @@ namespace Server.Multis
if( foundation.Signpost != null )
state.Send( foundation.Signpost.RemovePacket );
+
+ if( foundation.SignHanger != null )
+ state.Send( foundation.SignHanger.RemovePacket );
+
+ if( foundation.Sign != null )
+ state.Send( foundation.Sign.RemovePacket );
}
public static void Remove( Mobile from )
@@ -2071,6 +2075,12 @@ namespace Server.Multis
if( context.Foundation.Signpost != null )
context.Foundation.Signpost.SendInfoTo( state );
+
+ if( context.Foundation.SignHanger != null )
+ context.Foundation.SignHanger.SendInfoTo( state );
+
+ if( context.Foundation.Sign != null )
+ context.Foundation.Sign.SendInfoTo( state );
}
}