fix: Updates disguises and codegens tinkering items (#1353)
This commit is contained in:
parent
f2fdc0321c
commit
d14e864c85
56 changed files with 1012 additions and 1454 deletions
|
|
@ -1,32 +1,16 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x105B, 0x105C)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Axle : Item
|
||||
{
|
||||
[Flippable(0x105B, 0x105C)]
|
||||
public class Axle : Item
|
||||
[Constructible]
|
||||
public Axle(int amount = 1) : base(0x105B)
|
||||
{
|
||||
[Constructible]
|
||||
public Axle(int amount = 1) : base(0x105B)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Axle(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,16 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x1051, 0x1052)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class AxleGears : Item
|
||||
{
|
||||
[Flippable(0x1051, 0x1052)]
|
||||
public class AxleGears : Item
|
||||
[Constructible]
|
||||
public AxleGears(int amount = 1) : base(0x1051)
|
||||
{
|
||||
[Constructible]
|
||||
public AxleGears(int amount = 1) : base(0x1051)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public AxleGears(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,16 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x104D, 0x104E)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class ClockFrame : Item
|
||||
{
|
||||
[Flippable(0x104D, 0x104E)]
|
||||
public class ClockFrame : Item
|
||||
[Constructible]
|
||||
public ClockFrame(int amount = 1) : base(0x104D)
|
||||
{
|
||||
[Constructible]
|
||||
public ClockFrame(int amount = 1) : base(0x104D)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public ClockFrame(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 2.0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,16 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x104F, 0x1050)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class ClockParts : Item
|
||||
{
|
||||
[Flippable(0x104F, 0x1050)]
|
||||
public class ClockParts : Item
|
||||
[Constructible]
|
||||
public ClockParts(int amount = 1) : base(0x104F)
|
||||
{
|
||||
[Constructible]
|
||||
public ClockParts(int amount = 1) : base(0x104F)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public ClockParts(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,216 +1,144 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
public enum MoonPhase
|
||||
{
|
||||
public enum MoonPhase
|
||||
NewMoon,
|
||||
WaxingCrescentMoon,
|
||||
FirstQuarter,
|
||||
WaxingGibbous,
|
||||
FullMoon,
|
||||
WaningGibbous,
|
||||
LastQuarter,
|
||||
WaningCrescent
|
||||
}
|
||||
|
||||
[Flippable(0x104B, 0x104C)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Clock : Item
|
||||
{
|
||||
public const double SecondsPerUOMinute = 5.0;
|
||||
public const double MinutesPerUODay = SecondsPerUOMinute * 24;
|
||||
|
||||
private static readonly DateTime WorldStart = new(1997, 9, 1);
|
||||
|
||||
[Constructible]
|
||||
public Clock(int itemID = 0x104B) : base(itemID) => Weight = 3.0;
|
||||
|
||||
public static DateTime ServerStart { get; private set; }
|
||||
|
||||
public static void Configure()
|
||||
{
|
||||
NewMoon,
|
||||
WaxingCrescentMoon,
|
||||
FirstQuarter,
|
||||
WaxingGibbous,
|
||||
FullMoon,
|
||||
WaningGibbous,
|
||||
LastQuarter,
|
||||
WaningCrescent
|
||||
ServerStart = Core.Now;
|
||||
}
|
||||
|
||||
[Flippable(0x104B, 0x104C)]
|
||||
public class Clock : Item
|
||||
public static MoonPhase GetMoonPhase(Map map, int x, int y)
|
||||
{
|
||||
public const double SecondsPerUOMinute = 5.0;
|
||||
public const double MinutesPerUODay = SecondsPerUOMinute * 24;
|
||||
GetTime(map, x, y, out _, out _, out var totalMinutes);
|
||||
|
||||
private static readonly DateTime WorldStart = new(1997, 9, 1);
|
||||
|
||||
[Constructible]
|
||||
public Clock(int itemID = 0x104B) : base(itemID) => Weight = 3.0;
|
||||
|
||||
public Clock(Serial serial) : base(serial)
|
||||
if (map != null)
|
||||
{
|
||||
totalMinutes /= 10 + map.MapIndex * 20;
|
||||
}
|
||||
|
||||
public static DateTime ServerStart { get; private set; }
|
||||
|
||||
public static void Configure()
|
||||
{
|
||||
ServerStart = Core.Now;
|
||||
}
|
||||
|
||||
public static MoonPhase GetMoonPhase(Map map, int x, int y)
|
||||
{
|
||||
GetTime(map, x, y, out _, out _, out var totalMinutes);
|
||||
|
||||
if (map != null)
|
||||
{
|
||||
totalMinutes /= 10 + map.MapIndex * 20;
|
||||
}
|
||||
|
||||
return (MoonPhase)(totalMinutes % 8);
|
||||
}
|
||||
|
||||
public static void GetTime(Map map, int x, int y, out int hours, out int minutes)
|
||||
{
|
||||
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)
|
||||
{
|
||||
var timeSpan = Core.Now - WorldStart;
|
||||
|
||||
totalMinutes = (int)(timeSpan.TotalSeconds / SecondsPerUOMinute);
|
||||
|
||||
if (map != null)
|
||||
{
|
||||
totalMinutes += map.MapIndex * 320;
|
||||
}
|
||||
|
||||
// Really on OSI this must be by subserver
|
||||
totalMinutes += x / 16;
|
||||
|
||||
hours = totalMinutes / 60 % 24;
|
||||
minutes = totalMinutes % 60;
|
||||
}
|
||||
|
||||
public static void GetTime(out int generalNumber, out string exactTime)
|
||||
{
|
||||
GetTime(null, 0, 0, out generalNumber, out exactTime);
|
||||
}
|
||||
|
||||
public static void GetTime(Mobile from, out int generalNumber, out string exactTime)
|
||||
{
|
||||
GetTime(from.Map, from.X, from.Y, out generalNumber, out exactTime);
|
||||
}
|
||||
|
||||
public static void GetTime(Map map, int x, int y, out int generalNumber, out string exactTime)
|
||||
{
|
||||
GetTime(map, x, y, out var hours, out int minutes);
|
||||
|
||||
// 00:00 AM - 00:59 AM : Witching hour
|
||||
// 01:00 AM - 03:59 AM : Middle of night
|
||||
// 04:00 AM - 07:59 AM : Early morning
|
||||
// 08:00 AM - 11:59 AM : Late morning
|
||||
// 12:00 PM - 12:59 PM : Noon
|
||||
// 01:00 PM - 03:59 PM : Afternoon
|
||||
// 04:00 PM - 07:59 PM : Early evening
|
||||
// 08:00 PM - 11:59 AM : Late at night
|
||||
|
||||
if (hours >= 20)
|
||||
{
|
||||
generalNumber = 1042957; // It's late at night
|
||||
}
|
||||
else if (hours >= 16)
|
||||
{
|
||||
generalNumber = 1042956; // It's early in the evening
|
||||
}
|
||||
else if (hours >= 13)
|
||||
{
|
||||
generalNumber = 1042955; // It's the afternoon
|
||||
}
|
||||
else if (hours >= 12)
|
||||
{
|
||||
generalNumber = 1042954; // It's around noon
|
||||
}
|
||||
else if (hours >= 08)
|
||||
{
|
||||
generalNumber = 1042953; // It's late in the morning
|
||||
}
|
||||
else if (hours >= 04)
|
||||
{
|
||||
generalNumber = 1042952; // It's early in the morning
|
||||
}
|
||||
else if (hours >= 01)
|
||||
{
|
||||
generalNumber = 1042951; // It's the middle of the night
|
||||
}
|
||||
else
|
||||
{
|
||||
generalNumber = 1042950; // 'Tis the witching hour. 12 Midnight.
|
||||
}
|
||||
|
||||
hours %= 12;
|
||||
|
||||
if (hours == 0)
|
||||
{
|
||||
hours = 12;
|
||||
}
|
||||
|
||||
exactTime = $"{hours}:{minutes:D2}";
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
GetTime(from, out var genericNumber, out var exactTime);
|
||||
|
||||
SendLocalizedMessageTo(from, genericNumber);
|
||||
SendLocalizedMessageTo(from, 1042958, exactTime); // ~1_TIME~ to be exact
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
return (MoonPhase)(totalMinutes % 8);
|
||||
}
|
||||
|
||||
[Flippable(0x104B, 0x104C)]
|
||||
public class ClockRight : Clock
|
||||
public static void GetTime(Map map, int x, int y, out int hours, out int minutes)
|
||||
{
|
||||
[Constructible]
|
||||
public ClockRight()
|
||||
{
|
||||
}
|
||||
|
||||
public ClockRight(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
GetTime(map, x, y, out hours, out minutes, out _);
|
||||
}
|
||||
|
||||
[Flippable(0x104B, 0x104C)]
|
||||
public class ClockLeft : Clock
|
||||
public static void GetTime(Map map, int x, int y, out int hours, out int minutes, out int totalMinutes)
|
||||
{
|
||||
[Constructible]
|
||||
public ClockLeft() : base(0x104C)
|
||||
var timeSpan = Core.Now - WorldStart;
|
||||
|
||||
totalMinutes = (int)(timeSpan.TotalSeconds / SecondsPerUOMinute);
|
||||
|
||||
if (map != null)
|
||||
{
|
||||
totalMinutes += map.MapIndex * 320;
|
||||
}
|
||||
|
||||
public ClockLeft(Serial serial) : base(serial)
|
||||
// Really on OSI this must be by subserver
|
||||
totalMinutes += x / 16;
|
||||
|
||||
hours = totalMinutes / 60 % 24;
|
||||
minutes = totalMinutes % 60;
|
||||
}
|
||||
|
||||
public static void GetTime(out int generalNumber, out string exactTime)
|
||||
{
|
||||
GetTime(null, 0, 0, out generalNumber, out exactTime);
|
||||
}
|
||||
|
||||
public static void GetTime(Mobile from, out int generalNumber, out string exactTime)
|
||||
{
|
||||
GetTime(from.Map, from.X, from.Y, out generalNumber, out exactTime);
|
||||
}
|
||||
|
||||
public static void GetTime(Map map, int x, int y, out int generalNumber, out string exactTime)
|
||||
{
|
||||
GetTime(map, x, y, out var hours, out int minutes);
|
||||
|
||||
// 00:00 AM - 00:59 AM : Witching hour
|
||||
// 01:00 AM - 03:59 AM : Middle of night
|
||||
// 04:00 AM - 07:59 AM : Early morning
|
||||
// 08:00 AM - 11:59 AM : Late morning
|
||||
// 12:00 PM - 12:59 PM : Noon
|
||||
// 01:00 PM - 03:59 PM : Afternoon
|
||||
// 04:00 PM - 07:59 PM : Early evening
|
||||
// 08:00 PM - 11:59 AM : Late at night
|
||||
|
||||
generalNumber = hours switch
|
||||
{
|
||||
>= 20 => 1042957, // It's late at night
|
||||
>= 16 => 1042956, // It's early in the evening
|
||||
>= 13 => 1042955, // It's the afternoon
|
||||
>= 12 => 1042954, // It's around noon
|
||||
>= 08 => 1042953, // It's late in the morning
|
||||
>= 04 => 1042952, // It's early in the morning
|
||||
>= 01 => 1042951, // It's the middle of the night
|
||||
_ => 1042950 // 'Tis the witching hour. 12 Midnight.
|
||||
};
|
||||
|
||||
hours %= 12;
|
||||
|
||||
if (hours == 0)
|
||||
{
|
||||
hours = 12;
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
exactTime = $"{hours}:{minutes:D2}";
|
||||
}
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
GetTime(from, out var genericNumber, out var exactTime);
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
SendLocalizedMessageTo(from, genericNumber);
|
||||
SendLocalizedMessageTo(from, 1042958, exactTime); // ~1_TIME~ to be exact
|
||||
}
|
||||
}
|
||||
|
||||
[Flippable(0x104B, 0x104C)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class ClockRight : Clock
|
||||
{
|
||||
[Constructible]
|
||||
public ClockRight()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Flippable(0x104B, 0x104C)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class ClockLeft : Clock
|
||||
{
|
||||
[Constructible]
|
||||
public ClockLeft() : base(0x104C)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,16 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x1053, 0x1054)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Gears : Item
|
||||
{
|
||||
[Flippable(0x1053, 0x1054)]
|
||||
public class Gears : Item
|
||||
[Constructible]
|
||||
public Gears(int amount = 1) : base(0x1053)
|
||||
{
|
||||
[Constructible]
|
||||
public Gears(int amount = 1) : base(0x1053)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Gears(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,11 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
// It isn't flippable
|
||||
[SerializationGenerator(0)]
|
||||
public partial class Globe : Item
|
||||
{
|
||||
public class Globe : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Globe() : base(0x1047) // It isn't flippable
|
||||
=>
|
||||
Weight = 3.0;
|
||||
|
||||
public Globe(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
[Constructible]
|
||||
public Globe() : base(0x1047) => Weight = 3.0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,16 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x1055, 0x1056)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Hinge : Item
|
||||
{
|
||||
[Flippable(0x1055, 0x1056)]
|
||||
public class Hinge : Item
|
||||
[Constructible]
|
||||
public Hinge(int amount = 1) : base(0x1055)
|
||||
{
|
||||
[Constructible]
|
||||
public Hinge(int amount = 1) : base(0x1055)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Hinge(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,16 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x1059, 0x105A)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class SextantParts : Item
|
||||
{
|
||||
[Flippable(0x1059, 0x105A)]
|
||||
public class SextantParts : Item
|
||||
[Constructible]
|
||||
public SextantParts(int amount = 1) : base(0x1059)
|
||||
{
|
||||
[Constructible]
|
||||
public SextantParts(int amount = 1) : base(0x1059)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public SextantParts(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 2.0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,16 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x105D, 0x105E)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Springs : Item
|
||||
{
|
||||
[Flippable(0x105D, 0x105E)]
|
||||
public class Springs : Item
|
||||
[Constructible]
|
||||
public Springs(int amount = 1) : base(0x105D)
|
||||
{
|
||||
[Constructible]
|
||||
public Springs(int amount = 1) : base(0x105D)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Springs(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,96 +1,74 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Engines.Quests.Hag;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x14F5, 0x14F6)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Spyglass : Item
|
||||
{
|
||||
[Flippable(0x14F5, 0x14F6)]
|
||||
public class Spyglass : Item
|
||||
[Constructible]
|
||||
public Spyglass() : base(0x14F5) => Weight = 3.0;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
[Constructible]
|
||||
public Spyglass() : base(0x14F5) => Weight = 3.0;
|
||||
// You peer into the heavens, seeking the moons...
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1008155);
|
||||
|
||||
public Spyglass(Serial serial) : base(serial)
|
||||
from.NetState.SendMessageLocalizedAffix(
|
||||
from.Serial,
|
||||
from.Body,
|
||||
MessageType.Regular,
|
||||
0x3B2,
|
||||
3,
|
||||
1008146 + (int)Clock.GetMoonPhase(Map.Trammel, from.X, from.Y),
|
||||
"",
|
||||
AffixType.Prepend,
|
||||
"Trammel : "
|
||||
);
|
||||
|
||||
from.NetState.SendMessageLocalizedAffix(
|
||||
from.Serial,
|
||||
from.Body,
|
||||
MessageType.Regular,
|
||||
0x3B2,
|
||||
3,
|
||||
1008146 + (int)Clock.GetMoonPhase(Map.Felucca, from.X, from.Y),
|
||||
"",
|
||||
AffixType.Prepend,
|
||||
"Felucca : "
|
||||
);
|
||||
|
||||
if (from is PlayerMobile player)
|
||||
{
|
||||
}
|
||||
var qs = player.Quest;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
from.LocalOverheadMessage(
|
||||
MessageType.Regular,
|
||||
0x3B2,
|
||||
1008155
|
||||
); // You peer into the heavens, seeking the moons...
|
||||
|
||||
from.NetState.SendMessageLocalizedAffix(
|
||||
from.Serial,
|
||||
from.Body,
|
||||
MessageType.Regular,
|
||||
0x3B2,
|
||||
3,
|
||||
1008146 + (int)Clock.GetMoonPhase(Map.Trammel, from.X, from.Y),
|
||||
"",
|
||||
AffixType.Prepend,
|
||||
"Trammel : "
|
||||
);
|
||||
|
||||
from.NetState.SendMessageLocalizedAffix(
|
||||
from.Serial,
|
||||
from.Body,
|
||||
MessageType.Regular,
|
||||
0x3B2,
|
||||
3,
|
||||
1008146 + (int)Clock.GetMoonPhase(Map.Felucca, from.X, from.Y),
|
||||
"",
|
||||
AffixType.Prepend,
|
||||
"Felucca : "
|
||||
);
|
||||
|
||||
if (from is PlayerMobile player)
|
||||
if (qs is not WitchApprenticeQuest)
|
||||
{
|
||||
var qs = player.Quest;
|
||||
return;
|
||||
}
|
||||
|
||||
if (qs is not WitchApprenticeQuest)
|
||||
var obj = qs.FindObjective<FindIngredientObjective>();
|
||||
|
||||
if (obj?.Completed == false && obj.Ingredient == Ingredient.StarChart)
|
||||
{
|
||||
Clock.GetTime(from.Map, from.X, from.Y, out var hours, out int _);
|
||||
|
||||
if (hours is < 5 or > 17)
|
||||
{
|
||||
return;
|
||||
// You gaze up into the glittering night sky. With great care, you compose a chart of the most prominent star patterns.
|
||||
player.SendLocalizedMessage(1055040);
|
||||
|
||||
obj.Complete();
|
||||
}
|
||||
|
||||
var obj = qs.FindObjective<FindIngredientObjective>();
|
||||
|
||||
if (obj?.Completed == false && obj.Ingredient == Ingredient.StarChart)
|
||||
else
|
||||
{
|
||||
Clock.GetTime(from.Map, from.X, from.Y, out var hours, out int _);
|
||||
|
||||
if (hours is < 5 or > 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.
|
||||
}
|
||||
// You gaze up into the sky, but it is not dark enough to see any stars.
|
||||
player.SendLocalizedMessage(1055039);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,245 +1,76 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x9F4, 0x9F5, 0x9A3, 0x9A4)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Fork : Item
|
||||
{
|
||||
[Flippable(0x9F4, 0x9F5, 0x9A3, 0x9A4)]
|
||||
public class Fork : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Fork() : base(0x9F4) => Weight = 1.0;
|
||||
|
||||
public Fork(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class ForkLeft : Item
|
||||
{
|
||||
[Constructible]
|
||||
public ForkLeft() : base(0x9F4) => Weight = 1.0;
|
||||
|
||||
public ForkLeft(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class ForkRight : Item
|
||||
{
|
||||
[Constructible]
|
||||
public ForkRight() : base(0x9F5) => Weight = 1.0;
|
||||
|
||||
public ForkRight(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
[Flippable(0x9F8, 0x9F9, 0x9C2, 0x9C3)]
|
||||
public class Spoon : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Spoon() : base(0x9F8) => Weight = 1.0;
|
||||
|
||||
public Spoon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class SpoonLeft : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SpoonLeft() : base(0x9F8) => Weight = 1.0;
|
||||
|
||||
public SpoonLeft(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class SpoonRight : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SpoonRight() : base(0x9F9) => Weight = 1.0;
|
||||
|
||||
public SpoonRight(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
[Flippable(0x9F6, 0x9F7, 0x9A5, 0x9A6)]
|
||||
public class Knife : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Knife() : base(0x9F6) => Weight = 1.0;
|
||||
|
||||
public Knife(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class KnifeLeft : Item
|
||||
{
|
||||
[Constructible]
|
||||
public KnifeLeft() : base(0x9F6) => Weight = 1.0;
|
||||
|
||||
public KnifeLeft(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class KnifeRight : Item
|
||||
{
|
||||
[Constructible]
|
||||
public KnifeRight() : base(0x9F7) => Weight = 1.0;
|
||||
|
||||
public KnifeRight(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class Plate : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Plate() : base(0x9D7) => Weight = 1.0;
|
||||
|
||||
public Plate(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
[Constructible]
|
||||
public Fork() : base(0x9F4) => Weight = 1.0;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class ForkLeft : Item
|
||||
{
|
||||
[Constructible]
|
||||
public ForkLeft() : base(0x9F4) => Weight = 1.0;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class ForkRight : Item
|
||||
{
|
||||
[Constructible]
|
||||
public ForkRight() : base(0x9F5) => Weight = 1.0;
|
||||
}
|
||||
|
||||
[Flippable(0x9F8, 0x9F9, 0x9C2, 0x9C3)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Spoon : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Spoon() : base(0x9F8) => Weight = 1.0;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class SpoonLeft : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SpoonLeft() : base(0x9F8) => Weight = 1.0;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class SpoonRight : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SpoonRight() : base(0x9F9) => Weight = 1.0;
|
||||
}
|
||||
|
||||
[Flippable(0x9F6, 0x9F7, 0x9A5, 0x9A6)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Knife : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Knife() : base(0x9F6) => Weight = 1.0;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class KnifeLeft : Item
|
||||
{
|
||||
[Constructible]
|
||||
public KnifeLeft() : base(0x9F6) => Weight = 1.0;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class KnifeRight : Item
|
||||
{
|
||||
[Constructible]
|
||||
public KnifeRight() : base(0x9F7) => Weight = 1.0;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Plate : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Plate() : base(0x9D7) => Weight = 1.0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue