Fixes code according to modern code style. Fixes a few expression bugs.

This commit is contained in:
Kamron Batman 2018-09-15 09:58:51 -07:00
parent 89eea25e5f
commit 970fd563b2
3324 changed files with 441118 additions and 433755 deletions

View file

@ -3,42 +3,42 @@ using Server.Items;
namespace Server.Misc
{
public class WinterGiftGiver2004 : GiftGiver
{
public static void Initialize()
{
GiftGiving.Register( new WinterGiftGiver2004() );
}
public class WinterGiftGiver2004 : GiftGiver
{
public override DateTime Start => new DateTime(2004, 12, 24);
public override DateTime Finish => new DateTime(2005, 1, 1);
public override DateTime Start => new DateTime( 2004, 12, 24 );
public override DateTime Finish => new DateTime( 2005, 1, 1 );
public static void Initialize()
{
GiftGiving.Register(new WinterGiftGiver2004());
}
public override void GiveGift( Mobile mob )
{
GiftBox box = new GiftBox();
public override void GiveGift(Mobile mob)
{
GiftBox box = new GiftBox();
box.DropItem( new MistletoeDeed() );
box.DropItem( new PileOfGlacialSnow() );
box.DropItem( new LightOfTheWinterSolstice() );
box.DropItem(new MistletoeDeed());
box.DropItem(new PileOfGlacialSnow());
box.DropItem(new LightOfTheWinterSolstice());
int random = Utility.Random( 100 );
int random = Utility.Random(100);
if ( random < 60 )
box.DropItem( new DecorativeTopiary() );
else if ( random < 84 )
box.DropItem( new FestiveCactus() );
else
box.DropItem( new SnowyTree() );
if (random < 60)
box.DropItem(new DecorativeTopiary());
else if (random < 84)
box.DropItem(new FestiveCactus());
else
box.DropItem(new SnowyTree());
switch ( GiveGift( mob, box ) )
{
case GiftResult.Backpack:
mob.SendMessage( 0x482, "Happy Holidays from the team! Gift items have been placed in your backpack." );
break;
case GiftResult.BankBox:
mob.SendMessage( 0x482, "Happy Holidays from the team! Gift items have been placed in your bank box." );
break;
}
}
}
}
switch (GiveGift(mob, box))
{
case GiftResult.Backpack:
mob.SendMessage(0x482, "Happy Holidays from the team! Gift items have been placed in your backpack.");
break;
case GiftResult.BankBox:
mob.SendMessage(0x482, "Happy Holidays from the team! Gift items have been placed in your bank box.");
break;
}
}
}
}