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 )
{
Item deathRobe = new DeathRobe();
if ( !this.Backpack.CheckHold( this, deathRobe, false, true ) )
deathRobe.Delete();
else if ( !EquipItem( deathRobe ) )
if ( !EquipItem( deathRobe ) )
deathRobe.Delete();
}
}

View file

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