Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -3,42 +3,42 @@ using Server.Network;
|
|||
|
||||
namespace Server.Misc
|
||||
{
|
||||
public class FoodDecayTimer : Timer
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
new FoodDecayTimer().Start();
|
||||
}
|
||||
public class FoodDecayTimer : Timer
|
||||
{
|
||||
public FoodDecayTimer() : base(TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5))
|
||||
{
|
||||
Priority = TimerPriority.OneMinute;
|
||||
}
|
||||
|
||||
public FoodDecayTimer() : base( TimeSpan.FromMinutes( 5 ), TimeSpan.FromMinutes( 5 ) )
|
||||
{
|
||||
Priority = TimerPriority.OneMinute;
|
||||
}
|
||||
public static void Initialize()
|
||||
{
|
||||
new FoodDecayTimer().Start();
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
FoodDecay();
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
FoodDecay();
|
||||
}
|
||||
|
||||
public static void FoodDecay()
|
||||
{
|
||||
foreach ( NetState state in NetState.Instances )
|
||||
{
|
||||
HungerDecay( state.Mobile );
|
||||
ThirstDecay( state.Mobile );
|
||||
}
|
||||
}
|
||||
public static void FoodDecay()
|
||||
{
|
||||
foreach (NetState state in NetState.Instances)
|
||||
{
|
||||
HungerDecay(state.Mobile);
|
||||
ThirstDecay(state.Mobile);
|
||||
}
|
||||
}
|
||||
|
||||
public static void HungerDecay( Mobile m )
|
||||
{
|
||||
if ( m != null && m.Hunger >= 1 )
|
||||
m.Hunger -= 1;
|
||||
}
|
||||
public static void HungerDecay(Mobile m)
|
||||
{
|
||||
if (m != null && m.Hunger >= 1)
|
||||
m.Hunger -= 1;
|
||||
}
|
||||
|
||||
public static void ThirstDecay( Mobile m )
|
||||
{
|
||||
if ( m != null && m.Thirst >= 1 )
|
||||
m.Thirst -= 1;
|
||||
}
|
||||
}
|
||||
public static void ThirstDecay(Mobile m)
|
||||
{
|
||||
if (m != null && m.Thirst >= 1)
|
||||
m.Thirst -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue