Reorganizes Project (#41)
This commit is contained in:
parent
08bf44af9a
commit
3614a66aee
3499 changed files with 79 additions and 55 deletions
|
|
@ -0,0 +1,96 @@
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HalloweenPumpkin : Item
|
||||
{
|
||||
private static readonly string[] m_Staff =
|
||||
{
|
||||
"Ryan", "Mark", "Eos", "Athena", "Xavier", "Krrios", "Zippy"
|
||||
};
|
||||
|
||||
[Constructible]
|
||||
public HalloweenPumpkin()
|
||||
{
|
||||
Weight = Utility.RandomMinMax(3, 20);
|
||||
ItemID = Utility.RandomDouble() <= .02
|
||||
? Utility.RandomList(0x4694, 0x4698)
|
||||
: Utility.RandomList(0xc6a, 0xc6b, 0xc6c);
|
||||
}
|
||||
|
||||
public HalloweenPumpkin(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.InRange(GetWorldLocation(), 2))
|
||||
return;
|
||||
|
||||
bool douse = false;
|
||||
|
||||
switch (ItemID)
|
||||
{
|
||||
case 0x4694:
|
||||
ItemID = 0x4691;
|
||||
break;
|
||||
case 0x4691:
|
||||
ItemID = 0x4694;
|
||||
douse = true;
|
||||
break;
|
||||
case 0x4698:
|
||||
ItemID = 0x4695;
|
||||
break;
|
||||
case 0x4695:
|
||||
ItemID = 0x4698;
|
||||
douse = true;
|
||||
break;
|
||||
default: return;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(douse ? 1113988 : 1113987); // You extinguish/light the Jack-O-Lantern
|
||||
Effects.PlaySound(GetWorldLocation(), Map, douse ? 0x3be : 0x47);
|
||||
}
|
||||
|
||||
private void AssignRandomName()
|
||||
{
|
||||
Name = $"{m_Staff[Utility.Random(m_Staff.Length)]}'s Jack-O-Lantern";
|
||||
}
|
||||
|
||||
public override bool OnDragLift(Mobile from)
|
||||
{
|
||||
if (Name == null && (ItemID == 0x4694 || ItemID == 0x4691 || ItemID == 0x4698 || ItemID == 0x4695))
|
||||
{
|
||||
if (Utility.RandomBool())
|
||||
{
|
||||
new PumpkinHead().MoveToWorld(GetWorldLocation(), Map);
|
||||
|
||||
Delete();
|
||||
return false;
|
||||
}
|
||||
|
||||
AssignRandomName();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(1); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (version == 0 && Name == null && ItemID == 0x4698)
|
||||
AssignRandomName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class PumpkinScarecrow : Item
|
||||
{
|
||||
[Constructible]
|
||||
public PumpkinScarecrow()
|
||||
: base(Utility.RandomBool() ? 0x469B : 0x469C)
|
||||
{
|
||||
}
|
||||
|
||||
public PumpkinScarecrow(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1096947;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class RuinedTapestry : Item
|
||||
{
|
||||
[Constructible]
|
||||
public RuinedTapestry()
|
||||
: base(Utility.RandomBool() ? 0x4699 : 0x469A)
|
||||
{
|
||||
}
|
||||
|
||||
public RuinedTapestry(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Ruined Tapestry ";
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class TwilightLantern : Lantern
|
||||
{
|
||||
[Constructible]
|
||||
public TwilightLantern()
|
||||
{
|
||||
Hue = Utility.RandomBool() ? 244 : 997;
|
||||
}
|
||||
|
||||
public TwilightLantern(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Twilight Lantern";
|
||||
|
||||
public override bool AllowEquippedCast(Mobile from)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1060482); // Spell Channeling
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue