Cleanup & Fixes for .NET 5 (#309)
- [X] Fixes several bugs - [X] Updates more ordinal issues - [X] Cleans up the code a bit - [X] Turns classes static that should have been - [X] Changes TcpServer.Instances to a HashSet Bumps release version
This commit is contained in:
parent
4ad8811df2
commit
525cda5413
266 changed files with 1348 additions and 1800 deletions
|
|
@ -28,7 +28,7 @@ namespace Server
|
|||
|
||||
while ((line = ip.ReadLine()) != null)
|
||||
{
|
||||
if (line.Length == 0 || line.StartsWith("#"))
|
||||
if (line.Length == 0 || line.StartsWith("#", StringComparison.Ordinal))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -293,8 +293,7 @@ namespace Server
|
|||
Locked
|
||||
}
|
||||
|
||||
[CustomEnum(new[] { "North", "Right", "East", "Down", "South", "Left", "West", "Up" })]
|
||||
[Flags]
|
||||
[CustomEnum(new[] { "North", "Right", "East", "Down", "South", "Left", "West", "Up" }), Flags]
|
||||
public enum Direction : byte
|
||||
{
|
||||
North = 0x0,
|
||||
|
|
@ -1340,8 +1339,7 @@ namespace Server
|
|||
|
||||
public virtual int Luck => 0;
|
||||
|
||||
[Hue]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
[Hue, CommandProperty(AccessLevel.GameMaster)]
|
||||
public int HueMod
|
||||
{
|
||||
get => m_HueMod;
|
||||
|
|
@ -1356,8 +1354,7 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
[Hue]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
[Hue, CommandProperty(AccessLevel.GameMaster)]
|
||||
public virtual int Hue
|
||||
{
|
||||
get
|
||||
|
|
@ -1778,8 +1775,7 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
[Body]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
[Body, CommandProperty(AccessLevel.GameMaster)]
|
||||
public Body Body
|
||||
{
|
||||
get
|
||||
|
|
@ -1805,8 +1801,7 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
[Body]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
[Body, CommandProperty(AccessLevel.GameMaster)]
|
||||
public int BodyValue
|
||||
{
|
||||
get => Body.BodyID;
|
||||
|
|
@ -2481,8 +2476,6 @@ namespace Server
|
|||
get => m_Poison;
|
||||
set
|
||||
{
|
||||
/*if (m_Poison != value && (m_Poison == null || value == null || m_Poison.Level < value.Level))
|
||||
{*/
|
||||
m_Poison = value;
|
||||
Delta(MobileDelta.HealthbarPoison);
|
||||
|
||||
|
|
@ -2500,7 +2493,6 @@ namespace Server
|
|||
}
|
||||
|
||||
CheckStatTimers();
|
||||
/*}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -9171,7 +9163,7 @@ namespace Server
|
|||
CheckStatTimers();
|
||||
}
|
||||
|
||||
private MobileDelta GetStatDelta(StatType type)
|
||||
private static MobileDelta GetStatDelta(StatType type)
|
||||
{
|
||||
MobileDelta delta = 0;
|
||||
|
||||
|
|
@ -9540,7 +9532,7 @@ namespace Server
|
|||
Effects.SendTargetEffect(this, itemID, speed, duration, hue, renderMode);
|
||||
|
||||
public void FixedEffect(int itemID, int speed, int duration) =>
|
||||
Effects.SendTargetEffect(this, itemID, speed, duration, 0, 0);
|
||||
Effects.SendTargetEffect(this, itemID, speed, duration);
|
||||
|
||||
public void FixedParticles(
|
||||
int itemID, int speed, int duration, int effect, int hue, int renderMode, EffectLayer layer, int unknown
|
||||
|
|
@ -9550,13 +9542,13 @@ namespace Server
|
|||
public void FixedParticles(
|
||||
int itemID, int speed, int duration, int effect, int hue, int renderMode, EffectLayer layer
|
||||
) =>
|
||||
Effects.SendTargetParticles(this, itemID, speed, duration, hue, renderMode, effect, layer, 0);
|
||||
Effects.SendTargetParticles(this, itemID, speed, duration, hue, renderMode, effect, layer);
|
||||
|
||||
public void FixedParticles(int itemID, int speed, int duration, int effect, EffectLayer layer, int unknown) =>
|
||||
Effects.SendTargetParticles(this, itemID, speed, duration, 0, 0, effect, layer, unknown);
|
||||
|
||||
public void FixedParticles(int itemID, int speed, int duration, int effect, EffectLayer layer) =>
|
||||
Effects.SendTargetParticles(this, itemID, speed, duration, 0, 0, effect, layer, 0);
|
||||
Effects.SendTargetParticles(this, itemID, speed, duration, 0, 0, effect, layer);
|
||||
|
||||
public void BoltEffect(int hue) => Effects.SendBoltEffect(this, true, hue);
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace Server.Mobiles
|
|||
public class MovementRecord
|
||||
{
|
||||
private static readonly Queue<MovementRecord> m_InstancePool = new Queue<MovementRecord>();
|
||||
public long m_End;
|
||||
private long m_End;
|
||||
|
||||
private MovementRecord(long end) => m_End = end;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue