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

@ -67,7 +67,7 @@ namespace Server.Items
if (house != null && house.IsOwner(from))
{
from.CloseGump(typeof(RewardDemolitionGump));
from.CloseGump<RewardDemolitionGump>();
from.SendGump(new RewardDemolitionGump(this, 1049783)); // Do you wish to re-deed this decoration?
}
else
@ -122,7 +122,7 @@ namespace Server.Items
if (house != null && house.IsOwner(from))
{
from.CloseGump(typeof(FacingGump));
from.CloseGump<FacingGump>();
if (!from.SendGump(new FacingGump(this, from)))
from.SendLocalizedMessage(1150062); // You fail to re-deed the holiday fireflies.
@ -165,7 +165,7 @@ namespace Server.Items
Closable = true;
Disposable = true;
Dragable = true;
Draggable = true;
Resizable = false;
AddPage(0);

View file

@ -252,8 +252,7 @@ namespace Server.Engines.Events
m_From = from;
Name = $"{from.Name}\'s Naughty Twin";
Timer.DelayCall(TrickOrTreat.OneSecond,
Utility.RandomBool() ? StealCandy : new TimerStateCallback<Mobile>(ToGate), m_From);
Timer.DelayCall(TrickOrTreat.OneSecond, StealCandyOrGate, m_From);
}
}
@ -278,25 +277,24 @@ namespace Server.Engines.Events
return null;
}
public static void StealCandy(Mobile target)
public static void StealCandyOrGate(Mobile target)
{
if (TrickOrTreat.CheckMobile(target))
{
Item item = FindCandyTypes(target);
if (Utility.RandomBool())
{
Item item = FindCandyTypes(target);
target.SendLocalizedMessage(1113967); /* Your naughty twin steals some of your candy. */
target.SendLocalizedMessage(1113967); /* Your naughty twin steals some of your candy. */
if (item != null && !item.Deleted) item.Delete();
}
}
public static void ToGate(Mobile target)
{
if (TrickOrTreat.CheckMobile(target))
{
target.SendLocalizedMessage(1113972); /* Your naughty twin teleports you away with a naughty laugh! */
target.MoveToWorld(RandomMoongate(target), target.Map);
if (item != null && !item.Deleted)
item.Delete();
}
else
{
target.SendLocalizedMessage(1113972); /* Your naughty twin teleports you away with a naughty laugh! */
target.MoveToWorld(RandomMoongate(target), target.Map);
}
}
}