- Incognito spell won't change gender anymore
(http://www.uodemise.com/discussion/showthread.php?t=117148) - Abyss Champion spawn has Greater Mongbats in tier 1 instead of Mongbats (http://www.uodemise.com/discussion/showthread.php?t=125248) - BOD books won't return to page 1 anymore when picking or dropping BODs (http://www.uodemise.com/discussion/showthread.php?t=115354) - Added Plague Beast Lords with relative puzzle; Plague Beasts release healty glands (http://www.uodemise.com/discussion/showthread.php?t=116548) - Arch Cure area effect will follow OSI rules in Felucca facet (http://www.uodemise.com/discussion/showthread.php?t=115600) - Solen Ants Holes can spawn randomly in forest (http://www.uodemise.com/discussion/showthread.php?t=123899) - Death Robes will decay after 60 seconds from dropping on the ground (http://www.uodemise.com/discussion/showthread.php?t=121188) - Weapon speeds are indicated in seconds of delay (http://www.uodemise.com/discussion/showthread.php?t=123707)
This commit is contained in:
parent
207be3f720
commit
123af436f9
99 changed files with 2341 additions and 75 deletions
|
|
@ -100,6 +100,11 @@ namespace Server.Items
|
|||
|
||||
public class DeathRobe : Robe
|
||||
{
|
||||
private Timer m_DecayTimer;
|
||||
private DateTime m_DecayTime;
|
||||
|
||||
private static TimeSpan m_DefaultDecayTime = TimeSpan.FromMinutes(1.0);
|
||||
|
||||
public override bool DisplayLootType
|
||||
{
|
||||
get{ return false; }
|
||||
|
|
@ -110,6 +115,7 @@ namespace Server.Items
|
|||
{
|
||||
LootType = LootType.Newbied;
|
||||
Hue = 2301;
|
||||
BeginDecay( m_DefaultDecayTime );
|
||||
}
|
||||
|
||||
public new bool Scissor( Mobile from, Scissors scissors )
|
||||
|
|
@ -117,6 +123,62 @@ namespace Server.Items
|
|||
from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
|
||||
return false;
|
||||
}
|
||||
|
||||
public void BeginDecay( TimeSpan delay )
|
||||
{
|
||||
if ( m_DecayTimer != null )
|
||||
m_DecayTimer.Stop();
|
||||
|
||||
m_DecayTime = DateTime.Now + delay;
|
||||
|
||||
m_DecayTimer = new InternalTimer( this, delay );
|
||||
m_DecayTimer.Start();
|
||||
}
|
||||
|
||||
public override bool OnDroppedToWorld( Mobile from, Point3D p )
|
||||
{
|
||||
BeginDecay( m_DefaultDecayTime );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool OnDroppedToMobile( Mobile from, Mobile target )
|
||||
{
|
||||
if (m_DecayTimer != null )
|
||||
{
|
||||
m_DecayTimer.Stop();
|
||||
m_DecayTimer = null;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
if ( m_DecayTimer != null )
|
||||
m_DecayTimer.Stop();
|
||||
|
||||
m_DecayTimer = null;
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private DeathRobe m_Robe;
|
||||
|
||||
public InternalTimer( DeathRobe c, TimeSpan delay ) : base( delay )
|
||||
{
|
||||
m_Robe = c;
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( m_Robe.Parent != null || m_Robe.IsLockedDown )
|
||||
Stop();
|
||||
else
|
||||
m_Robe.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public DeathRobe( Serial serial ) : base( serial )
|
||||
{
|
||||
|
|
@ -126,7 +188,12 @@ namespace Server.Items
|
|||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
writer.Write( (int) 2 ); // version
|
||||
|
||||
writer.Write( m_DecayTimer != null );
|
||||
|
||||
if( m_DecayTimer != null )
|
||||
writer.WriteDeltaTime( m_DecayTime );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
|
|
@ -134,6 +201,26 @@ namespace Server.Items
|
|||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
if( reader.ReadBool() )
|
||||
{
|
||||
m_DecayTime = reader.ReadDeltaTime();
|
||||
BeginDecay( m_DecayTime - DateTime.Now );
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
case 0:
|
||||
{
|
||||
if ( Parent == null )
|
||||
BeginDecay( m_DefaultDecayTime );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( version < 1 && Hue == 0 )
|
||||
Hue = 2301;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue