cleanup: Fixes bugs and cleans up code (#660)

This commit is contained in:
Kamron Batman 2021-07-19 20:49:59 -07:00 • committed by GitHub
parent 1de0b656a9
commit 679e8100f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
99 changed files with 160 additions and 346 deletions

View file

@ -6,7 +6,6 @@ using System.Threading;
using Server.Accounting;
using Server.Buffers;
using Server.Commands;
using Server.Items;
using Server.Misc;
using Server.Multis;
using Server.Network;

View file

@ -104,7 +104,7 @@ namespace Server.Gumps
}
else
{
Item toGive = null;
Item toGive;
if (m_House.IsAosRules)
{

View file

@ -1,4 +1,3 @@
using System;
using Server.Factions;
using Server.Guilds;
using Server.Mobiles;

View file

@ -56,20 +56,18 @@ namespace Server.Guilds
{
base.OnResponse(sender, info);
if (!(sender.Mobile is PlayerMobile pm) || !IsMember(pm, guild))
if (sender.Mobile is not PlayerMobile pm || !IsMember(pm, guild))
{
return;
}
var display = m_Display;
if (info.ButtonID == 5)
{
for (var i = 0; i < 3; i++)
{
if (info.IsSwitched(i))
{
display = (GuildDisplayType)i;
var display = (GuildDisplayType)i;
m_Callback(display);
break;
}

View file

@ -11,12 +11,10 @@ namespace Server.Gumps
{
private readonly List<Mobile> m_Killers;
private int m_Idx;
private Mobile m_Victum;
private ReportMurdererGump(Mobile victum, List<Mobile> killers, int idx = 0) : base(0, 0)
private ReportMurdererGump(List<Mobile> killers, int idx = 0) : base(0, 0)
{
m_Killers = killers;
m_Victum = victum;
m_Idx = idx;
BuildGump();
}
@ -178,7 +176,7 @@ namespace Server.Gumps
m_Idx++;
if (m_Idx < m_Killers.Count)
{
from.SendGump(new ReportMurdererGump(from, m_Killers, m_Idx));
from.SendGump(new ReportMurdererGump( m_Killers, m_Idx));
}
}
@ -195,7 +193,7 @@ namespace Server.Gumps
protected override void OnTick()
{
m_Victim.SendGump(new ReportMurdererGump(m_Victim, m_Killers));
m_Victim.SendGump(new ReportMurdererGump(m_Killers));
}
}
}

View file

@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Server.Mobiles;