Code Cleanup & Fixes Warnings (#74)

This commit is contained in:
Kamron Batman 2020-01-18 14:56:45 -08:00 committed by GitHub
parent e11d1f3ad9
commit 57b14ad690
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
143 changed files with 2960 additions and 3427 deletions

View file

@ -30,13 +30,10 @@ namespace Server.SkillHandlers
BaseHouse house = BaseHouse.FindHouseAt(m);
if (house?.IsFriend(m) == true)
{
bonus = 100.0;
}
else if (!Core.AOS)
{
if (house == null)
house = BaseHouse.FindHouseAt(new Point3D(m.X - 1, m.Y, 127), m.Map, 16) ??
house ??= BaseHouse.FindHouseAt(new Point3D(m.X - 1, m.Y, 127), m.Map, 16) ??
BaseHouse.FindHouseAt(new Point3D(m.X + 1, m.Y, 127), m.Map, 16) ??
BaseHouse.FindHouseAt(new Point3D(m.X, m.Y - 1, 127), m.Map, 16) ??
BaseHouse.FindHouseAt(new Point3D(m.X, m.Y + 1, 127), m.Map, 16);

View file

@ -19,7 +19,7 @@ namespace Server.SkillHandlers
m.SendLocalizedMessage(502137); // Select the poison you wish to use
return TimeSpan.FromSeconds(10.0); // 10 second delay before beign able to re-use a skill
return TimeSpan.FromSeconds(10.0); // 10 second delay before being able to re-use a skill
}
private class InternalTargetPoison : Target
@ -167,4 +167,4 @@ namespace Server.SkillHandlers
}
}
}
}
}

View file

@ -27,10 +27,10 @@ namespace Server.SkillHandlers
{
m.Target = new InternalTarget();
m.SendLocalizedMessage(502368); // Wich trap will you attempt to disarm?
m.SendLocalizedMessage(502368); // Which trap will you attempt to disarm?
}
return TimeSpan.FromSeconds(10.0); // 10 second delay before beign able to re-use a skill
return TimeSpan.FromSeconds(10.0); // 10 second delay before being able to re-use a skill
}
private class InternalTarget : Target

View file

@ -127,7 +127,7 @@ namespace Server.SkillHandlers
public override void OnCast()
{
IPooledEnumerable<Corpse> eable = Caster.GetItemsInRange<Corpse>(3);
Corpse toChannel = eable.FirstOrDefault(item => item is Corpse corpse && !corpse.Channeled);
Corpse toChannel = eable.FirstOrDefault(corpse => !corpse.Channeled);
eable.Free();
int min = 1 + (int)(Caster.Skills.SpiritSpeak.Value * 0.25);

View file

@ -25,7 +25,7 @@ namespace Server.SkillHandlers
m.CloseGump<TrackWhoGump>();
m.SendGump(new TrackWhatGump(m));
return TimeSpan.FromSeconds(10.0); // 10 second delay before beign able to re-use a skill
return TimeSpan.FromSeconds(10.0); // 10 second delay before being able to re-use a skill
}
public static void AddInfo(Mobile tracker, Mobile target)