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
|
|
@ -92,15 +92,7 @@ namespace Server.Mobiles
|
|||
|
||||
public override DeathMoveResult GetInventoryMoveResultFor(Item item) => DeathMoveResult.MoveToCorpse;
|
||||
|
||||
public override bool IsSnoop(Mobile from)
|
||||
{
|
||||
if (PackAnimal.CheckAccess(this, from))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.IsSnoop(from);
|
||||
}
|
||||
public override bool IsSnoop(Mobile from) => !PackAnimal.CheckAccess(this, from) && base.IsSnoop(from);
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item item)
|
||||
{
|
||||
|
|
@ -157,7 +149,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
|
||||
public class PackAnimal
|
||||
public static class PackAnimal
|
||||
{
|
||||
public static void GetContextMenuEntries(BaseCreature animal, Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
|
|
@ -167,21 +159,10 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
|
||||
public static bool CheckAccess(BaseCreature animal, Mobile from)
|
||||
{
|
||||
if (from == animal || from.AccessLevel >= AccessLevel.GameMaster)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (from.Alive && animal.Controlled && !animal.IsDeadPet &&
|
||||
(from == animal.ControlMaster || from == animal.SummonMaster || animal.IsPetFriend(from)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
public static bool CheckAccess(BaseCreature animal, Mobile from) =>
|
||||
from == animal || from.AccessLevel >= AccessLevel.GameMaster || from.Alive && animal.Controlled &&
|
||||
!animal.IsDeadPet &&
|
||||
(from == animal.ControlMaster || from == animal.SummonMaster || animal.IsPetFriend(from));
|
||||
|
||||
public static void CombineBackpacks(BaseCreature animal)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,8 +43,7 @@ namespace Server.Mobiles
|
|||
public virtual bool AllowMaleRider => true;
|
||||
public virtual bool AllowFemaleRider => true;
|
||||
|
||||
[Hue]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
[Hue, CommandProperty(AccessLevel.GameMaster)]
|
||||
public override int Hue
|
||||
{
|
||||
get => base.Hue;
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ namespace Server.Mobiles
|
|||
|
||||
if (Core.ML && IsRewardItem)
|
||||
{
|
||||
list.Add(RewardSystem.GetRewardYearLabel(this, new object[] { })); // X Year Veteran Reward
|
||||
list.Add(RewardSystem.GetRewardYearLabel(this, Array.Empty<object>())); // X Year Veteran Reward
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue