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:
Kamron Batman 2020-11-15 10:03:50 -08:00 • committed by GitHub
parent 4ad8811df2
commit 525cda5413
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
266 changed files with 1348 additions and 1800 deletions

View file

@ -2,8 +2,7 @@ using Server.Engines.Craft;
namespace Server.Items
{
[Flippable(0xFAF, 0xFB0)]
[Anvil]
[Flippable(0xFAF, 0xFB0), Anvil]
public class Anvil : Item
{
[Constructible]

View file

@ -226,8 +226,7 @@ namespace Server.Items
switch (Utility.Random(8))
{
default:
case 0:
default: // 0
x = -1;
y = -1;
break;

View file

@ -208,7 +208,7 @@ namespace Server.Items
Effects.PlaySound(loc, map, 0x307);
Effects.SendLocationEffect(loc, map, 0x36B0, 9, 10, 0, 0);
Effects.SendLocationEffect(loc, map, 0x36B0, 9);
var alchemyBonus = 0;
if (direct)

View file

@ -5,7 +5,6 @@ using Server.Engines.Craft;
using Server.Gumps;
using Server.Mobiles;
using Server.Multis;
using Server.Network;
namespace Server.Items
{

View file

@ -259,8 +259,7 @@ namespace Server.Items
CommandSystem.Register("AllSpells", AccessLevel.GameMaster, AllSpells_OnCommand);
}
[Usage("AllSpells")]
[Description("Completely fills a targeted spellbook with scrolls.")]
[Usage("AllSpells"), Description("Completely fills a targeted spellbook with scrolls.")]
private static void AllSpells_OnCommand(CommandEventArgs e)
{
e.Mobile.BeginTarget(-1, false, TargetFlags.None, AllSpells_OnTarget);

View file

@ -6,7 +6,7 @@ using Server.Mobiles;
namespace Server.Items
{
[Flippable(0x2790, 0x27DB)]
public class LeatherNinjaBelt : BaseWaist, IDyable, INinjaWeapon
public class LeatherNinjaBelt : BaseWaist, INinjaWeapon
{
private Poison m_Poison;
private int m_PoisonCharges;

View file

@ -39,7 +39,7 @@ namespace Server.Items
void AttackAnimation(Mobile from, Mobile to);
}
public class NinjaWeapon
public static class NinjaWeapon
{
private const int MaxUses = 10;

View file

@ -283,7 +283,7 @@ namespace Server.Items
}
}
public class DisguiseTimers
public static class DisguiseTimers
{
public static Dictionary<Mobile, Timer> Timers { get; } = new Dictionary<Mobile, Timer>();

View file

@ -132,14 +132,7 @@ namespace Server.Items
percent = v;
}
var scaledBy = Math.Abs(high - low) + 1;
if (scaledBy != 0)
{
scaledBy = 10000 / scaledBy;
}
percent *= 10000 + scaledBy;
percent *= 10000 + 10000 / Math.Abs(high - low) + 1;
return low + (high - low) * percent / 1000001;
}
@ -497,7 +490,7 @@ namespace Server.Items
totalDamage = AssignElementalDamage( weapon, AosElementAttribute.Energy, totalDamage );
totalDamage = AssignElementalDamage( weapon, AosElementAttribute.Fire, totalDamage );
totalDamage = AssignElementalDamage( weapon, AosElementAttribute.Poison, totalDamage );
weapon.AosElementDamages[AosElementAttribute.Physical] = 100 - totalDamage;
* */