Modernization Fixes & Updates to Default Values (#3)

This commit is contained in:
Kamron Batman 2018-10-28 00:33:16 -07:00 • committed by GitHub
parent 445eddff68
commit dcf64091b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
768 changed files with 10507 additions and 14196 deletions

View file

@ -105,7 +105,7 @@ namespace Server.Items
{
if (from.InRange(GetWorldLocation(), 3))
{
from.CloseGump(typeof(MistletoeAddonGump));
from.CloseGump<MistletoeAddonGump>();
from.SendGump(new MistletoeAddonGump(from, this));
}
else
@ -216,7 +216,7 @@ namespace Server.Items
if (house != null && house.IsCoOwner(from))
{
from.SendLocalizedMessage(1062838); // Where would you like to place this decoration?
from.BeginTarget(-1, true, TargetFlags.None, Placement_OnTarget, null);
from.BeginTarget(-1, true, TargetFlags.None, Placement_OnTarget);
}
else
{
@ -229,7 +229,7 @@ namespace Server.Items
}
}
public void Placement_OnTarget(Mobile from, object targeted, object state)
public void Placement_OnTarget(Mobile from, object targeted)
{
if (!(targeted is IPoint3D p))
return;

View file

@ -65,7 +65,7 @@ namespace Server.Items
from.SendLocalizedMessage(1010097); // You cannot use this while mounted.
}
else if (from.CanBeginAction(typeof(SnowPile)))
else if (from.CanBeginAction<SnowPile>())
{
from.SendLocalizedMessage(1005575); // You carefully pack the snow into a ball...
from.Target = new SnowTarget(from, this);
@ -87,7 +87,7 @@ namespace Server.Items
protected override void OnTick()
{
m_From.EndAction(typeof(SnowPile));
m_From.EndAction<SnowPile>();
}
}
@ -112,13 +112,13 @@ namespace Server.Items
{
Container pack = targ.Backpack;
if (from.Region.IsPartOf(typeof(SafeZone)) || targ.Region.IsPartOf(typeof(SafeZone)))
if (from.Region.IsPartOf<SafeZone>() || targ.Region.IsPartOf<SafeZone>())
{
from.SendMessage("You may not throw snow here.");
}
else if (pack?.FindItemByType(new[] { typeof(SnowPile), typeof(PileOfGlacialSnow) }) != null)
{
if (from.BeginAction(typeof(SnowPile)))
if (from.BeginAction<SnowPile>())
{
new InternalTimer(from).Start();
@ -129,7 +129,7 @@ namespace Server.Items
targ.SendLocalizedMessage(1010572); // You have just been hit by a snowball!
from.SendLocalizedMessage(1010573); // You throw the snowball and hit the target!
Effects.SendMovingEffect(from, targ, 0x36E4, 7, 0, false, true, 0x47F, 0);
Effects.SendMovingEffect(from, targ, 0x36E4, 7, 0, false, true, 0x47F);
}
else
{

View file

@ -51,7 +51,7 @@ namespace Server.Items
from.SendLocalizedMessage(1010097); // You cannot use this while mounted.
}
else if (from.CanBeginAction(typeof(SnowPile)))
else if (from.CanBeginAction<SnowPile>())
{
from.SendLocalizedMessage(1005575); // You carefully pack the snow into a ball...
from.Target = new SnowTarget(from, this);
@ -73,7 +73,7 @@ namespace Server.Items
protected override void OnTick()
{
m_From.EndAction(typeof(SnowPile));
m_From.EndAction<SnowPile>();
}
}
@ -98,13 +98,13 @@ namespace Server.Items
{
Container pack = targ.Backpack;
if (from.Region.IsPartOf(typeof(SafeZone)) || targ.Region.IsPartOf(typeof(SafeZone)))
if (from.Region.IsPartOf<SafeZone>() || targ.Region.IsPartOf<SafeZone>())
{
from.SendMessage("You may not throw snow here.");
}
else if (pack?.FindItemByType(new[] { typeof(SnowPile), typeof(PileOfGlacialSnow) }) != null)
{
if (from.BeginAction(typeof(SnowPile)))
if (from.BeginAction<SnowPile>())
{
new InternalTimer(from).Start();
@ -115,7 +115,7 @@ namespace Server.Items
targ.SendLocalizedMessage(1010572); // You have just been hit by a snowball!
from.SendLocalizedMessage(1010573); // You throw the snowball and hit the target!
Effects.SendMovingEffect(from, targ, 0x36E4, 7, 0, false, true, 0x480, 0);
Effects.SendMovingEffect(from, targ, 0x36E4, 7, 0, false, true, 0x480);
}
else
{