This commit is contained in:
mark 2009-08-09 02:20:57 +00:00
parent 698d969b9b
commit b95170c545
2 changed files with 23 additions and 30 deletions

View file

@ -1800,9 +1800,8 @@ namespace Server.Mobiles
if ( this.Alive && !wasAlive ) if ( this.Alive && !wasAlive )
{ {
Item deathRobe = new DeathRobe(); Item deathRobe = new DeathRobe();
if ( !this.Backpack.CheckHold( this, deathRobe, false, true ) )
deathRobe.Delete(); if ( !EquipItem( deathRobe ) )
else if ( !EquipItem( deathRobe ) )
deathRobe.Delete(); deathRobe.Delete();
} }
} }

View file

@ -53,6 +53,7 @@ namespace Server
private int m_Index, m_Count; private int m_Index, m_Count;
private TimerPriority m_Priority; private TimerPriority m_Priority;
private List<Timer> m_List; private List<Timer> m_List;
private bool m_PrioritySet;
private static string FormatDelegate( Delegate callback ) private static string FormatDelegate( Delegate callback )
{ {
@ -75,6 +76,9 @@ namespace Server
} }
set set
{ {
if ( !m_PrioritySet )
m_PrioritySet = true;
if ( m_Priority != value ) if ( m_Priority != value )
{ {
m_Priority = value; m_Priority = value;
@ -92,42 +96,23 @@ namespace Server
public TimeSpan Delay public TimeSpan Delay
{ {
get get { return m_Delay; }
{ set { m_Delay = value; }
return m_Delay;
}
set
{
m_Delay = value;
}
} }
public TimeSpan Interval public TimeSpan Interval
{ {
get get { return m_Interval; }
{ set { m_Interval = value; }
return m_Interval;
}
set
{
m_Interval = value;
}
} }
public bool Running public bool Running
{ {
get get { return m_Running; }
{ set {
return m_Running; if ( value ) {
}
set
{
if ( value )
{
Start(); Start();
} } else {
else
{
Stop(); Stop();
} }
} }
@ -437,6 +422,15 @@ namespace Server
m_Interval = interval; m_Interval = interval;
m_Count = count; m_Count = count;
if ( !m_PrioritySet ) {
if ( count == 1 ) {
m_Priority = ComputePriority( delay );
} else {
m_Priority = ComputePriority( interval );
}
m_PrioritySet = true;
}
if ( DefRegCreation ) if ( DefRegCreation )
RegCreation(); RegCreation();
} }