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

@ -46,9 +46,7 @@ namespace Server.Items
public static MoonPhase GetMoonPhase(Map map, int x, int y)
{
int hours, minutes, totalMinutes;
GetTime(map, x, y, out hours, out minutes, out totalMinutes);
GetTime(map, x, y, out _, out _, out int totalMinutes);
if (map != null)
totalMinutes /= 10 + map.MapIndex * 20;
@ -58,9 +56,7 @@ namespace Server.Items
public static void GetTime(Map map, int x, int y, out int hours, out int minutes)
{
int totalMinutes;
GetTime(map, x, y, out hours, out minutes, out totalMinutes);
GetTime(map, x, y, out hours, out minutes, out _);
}
public static void GetTime(Map map, int x, int y, out int hours, out int minutes, out int totalMinutes)
@ -91,9 +87,7 @@ namespace Server.Items
public static void GetTime(Map map, int x, int y, out int generalNumber, out string exactTime)
{
int hours, minutes;
GetTime(map, x, y, out hours, out minutes);
GetTime(map, x, y, out int hours, out int minutes);
// 00:00 AM - 00:59 AM : Witching hour
// 01:00 AM - 03:59 AM : Middle of night
@ -131,10 +125,7 @@ namespace Server.Items
public override void OnDoubleClick(Mobile from)
{
int genericNumber;
string exactTime;
GetTime(from, out genericNumber, out exactTime);
GetTime(from, out int genericNumber, out string exactTime);
SendLocalizedMessageTo(from, genericNumber);
SendLocalizedMessageTo(from, 1042958, exactTime); // ~1_TIME~ to be exact
@ -152,9 +143,6 @@ namespace Server.Items
base.Deserialize(reader);
int version = reader.ReadInt();
if (Weight == 2.0)
Weight = 3.0;
}
}

View file

@ -32,25 +32,28 @@ namespace Server.Items
{
QuestSystem qs = player.Quest;
if (qs is WitchApprenticeQuest)
if (qs.FindObjective(typeof(FindIngredientObjective)) is FindIngredientObjective obj && !obj.Completed &&
obj.Ingredient == Ingredient.StarChart)
if (!(qs is WitchApprenticeQuest))
return;
FindIngredientObjective obj = qs.FindObjective<FindIngredientObjective>();
if (obj?.Completed == false && obj.Ingredient == Ingredient.StarChart)
{
Clock.GetTime(from.Map, from.X, from.Y, out int hours, out int _);
if (hours < 5 || hours > 17)
{
Clock.GetTime(from.Map, from.X, from.Y, out int hours, out int _);
player.SendLocalizedMessage(
1055040); // You gaze up into the glittering night sky. With great care, you compose a chart of the most prominent star patterns.
if (hours < 5 || hours > 17)
{
player.SendLocalizedMessage(
1055040); // You gaze up into the glittering night sky. With great care, you compose a chart of the most prominent star patterns.
obj.Complete();
}
else
{
player.SendLocalizedMessage(
1055039); // You gaze up into the sky, but it is not dark enough to see any stars.
}
obj.Complete();
}
else
{
player.SendLocalizedMessage(
1055039); // You gaze up into the sky, but it is not dark enough to see any stars.
}
}
}
}