Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AdmiralJacksPumpkinSpiceAle : BaseShield
|
||||
{
|
||||
public override bool IsArtifact { get { return true; } }
|
||||
public override int LabelNumber { get { return 1159230; } } // Admiral Jack's Pumpkin Spice Ale
|
||||
|
||||
[Constructable]
|
||||
public AdmiralJacksPumpkinSpiceAle()
|
||||
: base(0xA40B)
|
||||
{
|
||||
Hue = 1922;
|
||||
Weight = 3.0;
|
||||
Attributes.SpellChanneling = 1;
|
||||
}
|
||||
|
||||
public AdmiralJacksPumpkinSpiceAle(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CaptainTitleDeed : BaseRewardTitleDeed
|
||||
{
|
||||
public override TextDefinition Title { get { return new TextDefinition(1159216); } } // Captain
|
||||
|
||||
[Constructable]
|
||||
public CaptainTitleDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public CaptainTitleDeed(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int v = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CommanderTitleDeed : BaseRewardTitleDeed
|
||||
{
|
||||
public override TextDefinition Title { get { return new TextDefinition(1159215); } } // Commander
|
||||
|
||||
[Constructable]
|
||||
public CommanderTitleDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public CommanderTitleDeed(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int v = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EnsignTitleDeed : BaseRewardTitleDeed
|
||||
{
|
||||
public override TextDefinition Title { get { return new TextDefinition(1159214); } } // Ensign
|
||||
|
||||
[Constructable]
|
||||
public EnsignTitleDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public EnsignTitleDeed(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int v = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EtherealSoulbinder : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1159167; } } // ethereal soulbinder
|
||||
|
||||
public double MaxSoulPoint { get; set; } = 100;
|
||||
|
||||
private double m_SoulPoint;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double SoulPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SoulPoint;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < 0)
|
||||
value = 0;
|
||||
else if (value > MaxSoulPoint)
|
||||
value = MaxSoulPoint;
|
||||
|
||||
m_SoulPoint += value;
|
||||
|
||||
SetHue();
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetHue()
|
||||
{
|
||||
if (SoulPoint <= 0)
|
||||
Hue = 0;
|
||||
else if (SoulPoint <= 1)
|
||||
Hue = 1910; // Meager
|
||||
else if (SoulPoint <= 25)
|
||||
Hue = 1916; // Grand
|
||||
else if (SoulPoint <= 50)
|
||||
Hue = 1914; // Exalted
|
||||
else if (SoulPoint <= 90)
|
||||
Hue = 1922; // Legendary
|
||||
else
|
||||
Hue = 1919; // Mythical
|
||||
}
|
||||
|
||||
private int GetDescription()
|
||||
{
|
||||
if (SoulPoint <= 0)
|
||||
return 1159177; // An Empty Soulbinder
|
||||
else if (SoulPoint <= 1)
|
||||
return 1159176; // Meager
|
||||
else if (SoulPoint <= 25)
|
||||
return 1159175; // Grand
|
||||
else if (SoulPoint <= 50)
|
||||
return 1159174; // Exalted
|
||||
else if (SoulPoint <= 90)
|
||||
return 1159173; // Legendary
|
||||
else
|
||||
return 1159172; // Mythical
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EtherealSoulbinder()
|
||||
: base(0xA1E7)
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealSoulbinder(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
int desc = GetDescription();
|
||||
|
||||
if (desc == 1159177)
|
||||
{
|
||||
list.Add(1159177); // An Empty Soulbinder
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(1159178, string.Format("#{0}", desc)); // Contains a ~1_TYPE~ Soul
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
|
||||
writer.Write(m_SoulPoint);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_SoulPoint = reader.ReadDouble();
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
EventSink.CreatureDeath += CreatureDeath;
|
||||
}
|
||||
|
||||
public static void CreatureDeath(CreatureDeathEventArgs e)
|
||||
{
|
||||
var bc = e.Creature as BaseCreature;
|
||||
var killer = e.Killer;
|
||||
|
||||
if (bc != null && bc.IsSoulbound && killer is PlayerMobile && killer.Backpack != null)
|
||||
{
|
||||
EtherealSoulbinder es = killer.Backpack.FindItemsByType<EtherealSoulbinder>().Where(x => x.SoulPoint < x.MaxSoulPoint).FirstOrDefault();
|
||||
|
||||
if (es != null)
|
||||
{
|
||||
es.SoulPoint += bc.HitsMax / 1000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using Server.Engines.Points;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EtherealSoulcleanser : BaseContainer
|
||||
{
|
||||
public override int LabelNumber { get { return 1159196; } } // Ethereal Soulcleanser
|
||||
|
||||
public override int DefaultGumpID { get { return 0x10C; } }
|
||||
public override bool DisplaysContent { get { return false; } }
|
||||
|
||||
public static EtherealSoulcleanser InstanceTram { get; set; }
|
||||
public static EtherealSoulcleanser InstanceFel { get; set; }
|
||||
|
||||
[Constructable]
|
||||
public EtherealSoulcleanser()
|
||||
: base(0x2DF4)
|
||||
{
|
||||
Hue = 2591;
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public EtherealSoulcleanser(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
return Check(from, dropped);
|
||||
}
|
||||
|
||||
public override bool OnDragDropInto(Mobile from, Item item, Point3D p)
|
||||
{
|
||||
return Check(from, item);
|
||||
}
|
||||
|
||||
public bool Check(Mobile from, Item item)
|
||||
{
|
||||
if (from == null || from.Deleted || item == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(item is EtherealSoulbinder) || item is EtherealSoulbinder && ((EtherealSoulbinder)item).SoulPoint <= 0)
|
||||
{
|
||||
from.SendLocalizedMessage(1159170); // The machine only accepts filled ethereal soulbinders.
|
||||
return false;
|
||||
}
|
||||
|
||||
double amount = 100 * ((EtherealSoulbinder)item).SoulPoint;
|
||||
PointsSystem.FellowshipData.AwardPoints(from, amount);
|
||||
|
||||
Effects.SendPacket(from.Location, from.Map, new GraphicalEffect(EffectType.FixedXYZ, from.Serial, Serial.Zero, 0x373A, from.Location, from.Location, 10, 15, true, true));
|
||||
from.PlaySound(0x1F2);
|
||||
|
||||
item.Delete();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (Map == Map.Trammel)
|
||||
{
|
||||
InstanceTram = this;
|
||||
}
|
||||
|
||||
if (Map == Map.Felucca)
|
||||
{
|
||||
InstanceFel = this;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ExplodingJackOLantern : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1159220; } } // Exploding Jack o' Lantern
|
||||
|
||||
[Constructable]
|
||||
public ExplodingJackOLantern()
|
||||
: base(0xA407)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from.Mounted)
|
||||
{
|
||||
from.SendLocalizedMessage(1061130); // You can't do that while riding a mount.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1113280); // Which target do you wish to throw this at?
|
||||
from.Target = new ThrowTarget(from);
|
||||
}
|
||||
}
|
||||
|
||||
private class ThrowTarget : Target
|
||||
{
|
||||
private Mobile m_From;
|
||||
|
||||
public ThrowTarget(Mobile from)
|
||||
: base(12, true, TargetFlags.None)
|
||||
{
|
||||
m_From = from;
|
||||
}
|
||||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (targeted is PlayerMobile)
|
||||
{
|
||||
Mobile m = targeted as Mobile;
|
||||
|
||||
if (from == m)
|
||||
{
|
||||
from.SendLocalizedMessage(501588); // Verbal taunts might be more effective!
|
||||
return;
|
||||
}
|
||||
|
||||
Effects.SendPacket(from, from.Map, new HuedEffect(EffectType.Moving, from.Serial, m.Serial, 0xA407, from, m, 10, 0, false, false, 0, 0));
|
||||
from.SendLocalizedMessage(1159219); // You hit your target!
|
||||
m.SendLocalizedMessage(1159218); // You have just been hit by a Jack o' Lantern!!!
|
||||
m.PlaySound(519);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ExplodingJackOLantern(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FellowshipCoin : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1159036; } } // The Fellowship Coin
|
||||
|
||||
[Constructable]
|
||||
public FellowshipCoin()
|
||||
: base(0x2F60)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 1912;
|
||||
Light = LightType.Circle300;
|
||||
}
|
||||
|
||||
public FellowshipCoin(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.HasGump(typeof(FellowshipCoinGump)))
|
||||
{
|
||||
from.SendGump(new FellowshipCoinGump());
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1157722, "its origin"); // *Your proficiency in ~1_SKILL~ reveals more about the item*
|
||||
from.PlaySound(1050);
|
||||
}
|
||||
}
|
||||
|
||||
private class FellowshipCoinGump : Gump
|
||||
{
|
||||
public FellowshipCoinGump()
|
||||
: base(100, 100)
|
||||
{
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 454, 400, 0x24A4);
|
||||
AddItem(75, 120, 0x2F60);
|
||||
AddHtmlLocalized(177, 50, 250, 18, 1114513, "#1159036", 0x3442, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
|
||||
AddHtmlLocalized(177, 77, 250, 36, 1114513, "#1159033", 0x3442, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
|
||||
AddHtmlLocalized(177, 122, 250, 228, 1159037, 0xC63, true, true); // The coin's gilded brilliance is striking. Engraved on the coin are the letters T, W, U.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FellowshipDonationBox : BaseContainer
|
||||
{
|
||||
public override int LabelNumber { get { return 1159042; } } // Fellowship Donation Box
|
||||
|
||||
public override int DefaultGumpID { get { return 0x10C; } }
|
||||
|
||||
public static string FilePath = Path.Combine("Saves/Misc", "FellowshipDonationBox.bin");
|
||||
private static readonly Dictionary<Mobile, int> Donations = new Dictionary<Mobile, int>();
|
||||
|
||||
public static void Configure()
|
||||
{
|
||||
EventSink.WorldSave += OnSave;
|
||||
EventSink.WorldLoad += OnLoad;
|
||||
}
|
||||
|
||||
public static FellowshipDonationBox InstanceTram { get; set; }
|
||||
public static FellowshipDonationBox InstanceFel { get; set; }
|
||||
|
||||
[Constructable]
|
||||
public FellowshipDonationBox()
|
||||
: base(0x2DE9)
|
||||
{
|
||||
Hue = 1191;
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public FellowshipDonationBox(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
return Check(from, dropped);
|
||||
}
|
||||
|
||||
public override bool OnDragDropInto(Mobile from, Item item, Point3D p)
|
||||
{
|
||||
return Check(from, item);
|
||||
}
|
||||
|
||||
public bool Check(Mobile from, Item item)
|
||||
{
|
||||
if (from == null || from.Deleted)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item != null && !(item is MaritimeCargo))
|
||||
{
|
||||
from.SendLocalizedMessage(1159030); // The Fellowship only requires trade cargo donations at this time.
|
||||
return false;
|
||||
}
|
||||
|
||||
int amount = ((MaritimeCargo)item).GetAwardAmount() * 1000;
|
||||
|
||||
if (Donations.ContainsKey(from))
|
||||
{
|
||||
Donations[from] += amount;
|
||||
}
|
||||
else
|
||||
{
|
||||
Donations.Add(from, amount);
|
||||
}
|
||||
|
||||
from.SendMessage(1159032, string.Format("{0}", Donations[from].ToString())); // The Fellowship thanks you for your donation. You have donated ~1_val~ worth of goods!
|
||||
|
||||
if (Donations[from] >= 450000000)
|
||||
{
|
||||
from.SendLocalizedMessage(1152339, string.Format("{0}", Donations[from].ToString())); // A reward of ~1_ITEM~ has been placed in your backpack.
|
||||
from.AddToBackpack(new FellowshipCoin());
|
||||
Donations[from] -= 450000000;
|
||||
}
|
||||
|
||||
item.Delete();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (Map == Map.Trammel)
|
||||
{
|
||||
InstanceTram = this;
|
||||
}
|
||||
|
||||
if (Map == Map.Felucca)
|
||||
{
|
||||
InstanceFel = this;
|
||||
}
|
||||
}
|
||||
|
||||
public static void OnSave(WorldSaveEventArgs e)
|
||||
{
|
||||
Persistence.Serialize(
|
||||
FilePath,
|
||||
writer =>
|
||||
{
|
||||
writer.Write((int)0);
|
||||
|
||||
writer.Write(Donations.Count);
|
||||
|
||||
Donations.ToList().ForEach(s =>
|
||||
{
|
||||
writer.Write(s.Key);
|
||||
writer.Write(s.Value);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public static void OnLoad()
|
||||
{
|
||||
Persistence.Deserialize(
|
||||
FilePath,
|
||||
reader =>
|
||||
{
|
||||
int version = reader.ReadInt();
|
||||
int count = reader.ReadInt();
|
||||
|
||||
for (int i = count; i > 0; i--)
|
||||
{
|
||||
Mobile m = reader.ReadMobile();
|
||||
int value = reader.ReadInt();
|
||||
|
||||
if (m != null)
|
||||
{
|
||||
Donations.Add(m, value);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FellowshipMedallion : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1159248; } } // Fellowship Medallion
|
||||
|
||||
[Constructable]
|
||||
public FellowshipMedallion()
|
||||
: base(0xA429)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Layer = Layer.Neck;
|
||||
}
|
||||
|
||||
public FellowshipMedallion(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.HasGump(typeof(FellowshipMedallionGump)))
|
||||
{
|
||||
from.SendGump(new FellowshipMedallionGump());
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1157722, "its origin"); // *Your proficiency in ~1_SKILL~ reveals more about the item*
|
||||
from.PlaySound(1050);
|
||||
}
|
||||
}
|
||||
|
||||
private class FellowshipMedallionGump : Gump
|
||||
{
|
||||
public FellowshipMedallionGump()
|
||||
: base(100, 100)
|
||||
{
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 454, 400, 0x24A4);
|
||||
AddItem(75, 120, 0xA429);
|
||||
AddHtmlLocalized(177, 50, 250, 18, 1114513, "#1159248", 0x3442, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
|
||||
AddHtmlLocalized(177, 77, 250, 36, 1114513, "#1159033", 0x3442, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
|
||||
AddHtmlLocalized(177, 122, 250, 228, 1159247, 0xC63, true, true); // This is an otherwise unassuming metal medallion in the shape of a triangle. The letters T, W, and U are engraved on it. It is almost immediately recognizable as a sign of the Fellowship.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class JackOLanternHelm : BaseArmor
|
||||
{
|
||||
public override int LabelNumber { get { return 1125986; } } // jack o' lantern helm
|
||||
public override bool IsArtifact { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public JackOLanternHelm()
|
||||
: base(0xA3EA)
|
||||
{
|
||||
Weight = 3.0;
|
||||
Layer = Layer.Helm;
|
||||
Light = LightType.Circle300;
|
||||
}
|
||||
|
||||
public override int BasePhysicalResistance { get { return 12; } }
|
||||
public override int BaseFireResistance { get { return 14; } }
|
||||
public override int BaseColdResistance { get { return 4; } }
|
||||
public override int BasePoisonResistance { get { return 8; } }
|
||||
public override int BaseEnergyResistance { get { return 10; } }
|
||||
|
||||
public override int InitMinHits { get { return 255; } }
|
||||
public override int InitMaxHits { get { return 255; } }
|
||||
public override int AosStrReq { get { return 10; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType
|
||||
{
|
||||
get
|
||||
{
|
||||
return ArmorMaterialType.Plate;
|
||||
}
|
||||
}
|
||||
|
||||
public JackOLanternHelm(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using Server;
|
||||
using System;
|
||||
using Server.Multis;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PumpkinDeed : ShipCannonDeed
|
||||
{
|
||||
public override CannonPower CannonType { get { return CannonPower.Pumpkin; } }
|
||||
public override int LabelNumber { get { return 1159232; } } // Pumpkin Cannon
|
||||
|
||||
[Constructable]
|
||||
public PumpkinDeed()
|
||||
{
|
||||
Hue = 1192;
|
||||
}
|
||||
|
||||
public PumpkinDeed(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class PumpkinCannon : BaseShipCannon
|
||||
{
|
||||
public override int LabelNumber { get { return 1023691; } } // cannon
|
||||
|
||||
public override int Range { get { return 10; } }
|
||||
public override ShipCannonDeed GetDeed { get { return new PumpkinDeed(); } }
|
||||
public override CannonPower Power { get { return CannonPower.Pumpkin; } }
|
||||
|
||||
public PumpkinCannon(BaseGalleon g)
|
||||
: base(g)
|
||||
{
|
||||
}
|
||||
|
||||
public PumpkinCannon(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,416 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Engines.PartySystem;
|
||||
|
||||
namespace Server.Multis
|
||||
{
|
||||
public class PumpkinRowBoat : BaseBoat
|
||||
{
|
||||
public override int NorthID { get { return 0x50; } }
|
||||
public override int EastID { get { return 0x51; } }
|
||||
public override int SouthID { get { return 0x52; } }
|
||||
public override int WestID { get { return 0x53; } }
|
||||
|
||||
public override int HoldDistance { get { return -1; } }
|
||||
public override int TillerManDistance { get { return -2; } }
|
||||
|
||||
public override Point3D MarkOffset { get { return new Point3D(0, 1, 3); } }
|
||||
|
||||
public override BaseDockedBoat DockedBoat { get { return new DockedPumpkinRowBoat(this); } }
|
||||
|
||||
public override bool IsClassicBoat { get { return false; } }
|
||||
public override bool IsRowBoat { get { return true; } }
|
||||
public override bool CanLinkToLighthouse { get { return false; } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public MooringBlock Line { get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Rudder Rudder { get; private set; }
|
||||
|
||||
[Constructable]
|
||||
public PumpkinRowBoat(Direction d)
|
||||
: base(d, false)
|
||||
{
|
||||
Rudder = new PumpkinRudder(this, d);
|
||||
TillerMan = Rudder;
|
||||
Line = new MooringBlock(this, d);
|
||||
|
||||
switch (d)
|
||||
{
|
||||
default:
|
||||
case Direction.North:
|
||||
Rudder.Location = new Point3D(X + 1, Y + 3, Z);
|
||||
Line.Location = new Point3D(X, Y - 1, Z + 2);
|
||||
break;
|
||||
case Direction.South:
|
||||
Rudder.Location = new Point3D(X, Y - 2, Z);
|
||||
Line.Location = new Point3D(X, Y + 1, Z + 2);
|
||||
break;
|
||||
case Direction.East:
|
||||
Rudder.Location = new Point3D(X - 2, Y, Z);
|
||||
Line.Location = new Point3D(X + 1, Y, Z + 2);
|
||||
break;
|
||||
case Direction.West:
|
||||
Rudder.Location = new Point3D(X + 3, Y + 1, Z);
|
||||
Line.Location = new Point3D(X - 1, Y, Z + 2);
|
||||
break;
|
||||
}
|
||||
|
||||
Rudder.Handle = new PumpkinRudderHandle(Rudder, d);
|
||||
}
|
||||
|
||||
public override void Delete()
|
||||
{
|
||||
if (Line != null)
|
||||
Line.Delete();
|
||||
|
||||
if (Rudder != null && Rudder.Handle != null)
|
||||
Rudder.Handle.Delete();
|
||||
|
||||
base.Delete();
|
||||
}
|
||||
|
||||
public override void SetFacingComponents(Direction facing, Direction old, bool ignore)
|
||||
{
|
||||
if (Rudder == null || Rudder.Handle == null)
|
||||
return;
|
||||
|
||||
switch(facing)
|
||||
{
|
||||
case Direction.North:
|
||||
{
|
||||
Rudder.Y++;
|
||||
break;
|
||||
}
|
||||
case Direction.West:
|
||||
{
|
||||
Rudder.X++;
|
||||
Rudder.Y++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Line.SetFacing(facing);
|
||||
Rudder.Handle.SetFacing(facing);
|
||||
}
|
||||
|
||||
public override void OnLocationChange(Point3D old)
|
||||
{
|
||||
base.OnLocationChange(old);
|
||||
|
||||
if (Line != null)
|
||||
Line.Location = new Point3D(X + (Line.X - old.X), Y + (Line.Y - old.Y), Z + (Line.Z - old.Z));
|
||||
|
||||
if(Rudder != null && Rudder.Handle != null)
|
||||
Rudder.Handle.Location = new Point3D(X + (Rudder.Handle.X - old.X), Y + (Rudder.Handle.Y - old.Y), Z + (Rudder.Handle.Z - old.Z));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This must be overriden due to the tillerman not being in the MCL bounds
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override IEnumerable<IEntity> GetEntitiesOnBoard()
|
||||
{
|
||||
Map map = Map;
|
||||
|
||||
if (map == null || map == Map.Internal)
|
||||
yield break;
|
||||
|
||||
MultiComponentList mcl = Components;
|
||||
IPooledEnumerable eable = map.GetObjectsInBounds(new Rectangle2D(X + mcl.Min.X, Y + mcl.Min.Y, mcl.Width, mcl.Height));
|
||||
|
||||
foreach (IEntity ent in eable)
|
||||
{
|
||||
if (Contains(ent) && CheckOnBoard(ent))
|
||||
{
|
||||
yield return ent;
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
yield return Rudder;
|
||||
}
|
||||
|
||||
public override void OnMapChange()
|
||||
{
|
||||
base.OnMapChange();
|
||||
|
||||
if (Line != null)
|
||||
Line.Map = Map;
|
||||
}
|
||||
|
||||
public override void OnPlacement(Mobile from)
|
||||
{
|
||||
base.OnPlacement(from);
|
||||
|
||||
if (Line == null)
|
||||
return;
|
||||
|
||||
switch (Facing)
|
||||
{
|
||||
default:
|
||||
case Direction.North:
|
||||
Line.Location = new Point3D(X, Y - 2, Z + 5);
|
||||
break;
|
||||
case Direction.South:
|
||||
Line.Location = new Point3D(X, Y + 2, Z + 5);
|
||||
break;
|
||||
case Direction.East:
|
||||
Line.Location = new Point3D(X + 2, Y, Z + 5);
|
||||
break;
|
||||
case Direction.West:
|
||||
Line.Location = new Point3D(X - 2, Y, Z + 5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsComponentItem(IEntity item)
|
||||
{
|
||||
return item == this || item == Line || item == Rudder || (Rudder != null && item == Rudder.Handle);
|
||||
}
|
||||
|
||||
public override bool HasAccess(Mobile from)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public PumpkinRowBoat(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
|
||||
writer.Write(Rudder);
|
||||
writer.Write(Line);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Rudder = reader.ReadItem() as PumpkinRudder;
|
||||
Line = reader.ReadItem() as MooringBlock;
|
||||
|
||||
TillerMan = Rudder;
|
||||
}
|
||||
}
|
||||
|
||||
public class PumpkinRowBoatDeed : BaseBoatDeed
|
||||
{
|
||||
public override int LabelNumber { get { return 1159233; } } // Pumpkin Rowboat
|
||||
public override BaseBoat Boat { get { return new PumpkinRowBoat(BoatDirection); } }
|
||||
|
||||
[Constructable]
|
||||
public PumpkinRowBoatDeed()
|
||||
: base(0x50, Point3D.Zero)
|
||||
{
|
||||
}
|
||||
|
||||
public PumpkinRowBoatDeed(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
}
|
||||
|
||||
public class MooringBlock : MooringLine
|
||||
{
|
||||
public MooringBlock(BaseBoat boat, Direction d)
|
||||
: base(boat)
|
||||
{
|
||||
SetFacing(d);
|
||||
}
|
||||
|
||||
public void SetFacing(Direction dir)
|
||||
{
|
||||
switch (dir)
|
||||
{
|
||||
case Direction.North:
|
||||
case Direction.South:
|
||||
ItemID = 42088;
|
||||
break;
|
||||
case Direction.East:
|
||||
case Direction.West:
|
||||
ItemID = 42087;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public MooringBlock(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class PumpkinRudder : Rudder
|
||||
{
|
||||
public PumpkinRudder(BaseBoat boat, Direction d)
|
||||
: base(boat, d)
|
||||
{
|
||||
}
|
||||
|
||||
public override void SetFacing(Direction dir)
|
||||
{
|
||||
switch (dir)
|
||||
{
|
||||
case Direction.South:
|
||||
ItemID = 42073;
|
||||
break;
|
||||
case Direction.North:
|
||||
ItemID = 42030;
|
||||
Y++;
|
||||
break;
|
||||
case Direction.West:
|
||||
ItemID = 42044;
|
||||
X++;
|
||||
Y++;
|
||||
break;
|
||||
case Direction.East:
|
||||
ItemID = 42058;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public PumpkinRudder(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (ItemID == 42030)
|
||||
{
|
||||
Y++;
|
||||
}
|
||||
|
||||
if (ItemID == 42044)
|
||||
{
|
||||
X++;
|
||||
Y++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class PumpkinRudderHandle : RudderHandle
|
||||
{
|
||||
public PumpkinRudderHandle(Rudder rudder, Direction d)
|
||||
: base(rudder, d)
|
||||
{
|
||||
}
|
||||
|
||||
public override void SetFacing(Direction dir)
|
||||
{
|
||||
if (Rudder == null)
|
||||
Delete();
|
||||
else
|
||||
{
|
||||
switch (dir)
|
||||
{
|
||||
default:
|
||||
case Direction.South:
|
||||
ItemID = 16067;
|
||||
MoveToWorld(new Point3D(Rudder.X + 1, Rudder.Y + 1, Rudder.Z + 9), Map);
|
||||
break;
|
||||
case Direction.North:
|
||||
ItemID = 16061;
|
||||
MoveToWorld(new Point3D(Rudder.X, Rudder.Y - 1, Rudder.Z + 2), Map);
|
||||
break;
|
||||
case Direction.West:
|
||||
ItemID = 15991;
|
||||
MoveToWorld(new Point3D(Rudder.X - 1, Rudder.Y, Rudder.Z + 2), Map);
|
||||
break;
|
||||
case Direction.East:
|
||||
ItemID = 15970;
|
||||
MoveToWorld(new Point3D(Rudder.X + 1, Rudder.Y + 1, Rudder.Z + 9), Map);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public PumpkinRudderHandle(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class DockedPumpkinRowBoat : BaseDockedBoat
|
||||
{
|
||||
public override BaseBoat Boat { get { return new PumpkinRowBoat(BoatDirection); } }
|
||||
|
||||
public DockedPumpkinRowBoat(BaseBoat boat)
|
||||
: base(0x50, Point3D.Zero, boat)
|
||||
{
|
||||
}
|
||||
|
||||
public DockedPumpkinRowBoat(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable(0xA343, 0xA344)]
|
||||
public class TheFellowshipStaff : BaseStaff
|
||||
{
|
||||
public override int LabelNumber { get { return 1159034; } } // The Fellowship Staff
|
||||
|
||||
public static TheFellowshipStaff InstanceTram { get; set; }
|
||||
public static TheFellowshipStaff InstanceFel { get; set; }
|
||||
|
||||
[Constructable]
|
||||
public TheFellowshipStaff()
|
||||
: base (0xA343)
|
||||
{
|
||||
Hue = 2721;
|
||||
}
|
||||
|
||||
public override WeaponAbility PrimaryAbility { get { return WeaponAbility.Block; } }
|
||||
public override WeaponAbility SecondaryAbility { get { return WeaponAbility.ForceOfNature; } }
|
||||
public override int AosStrengthReq { get { return 20; } }
|
||||
public override int AosMinDamage { get { return 15; } }
|
||||
public override int AosMaxDamage { get { return 18; } }
|
||||
public override float MlSpeed { get { return 3.25f; } }
|
||||
|
||||
public override int InitMinHits { get { return 30; } }
|
||||
public override int InitMaxHits { get { return 60; } }
|
||||
|
||||
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct)
|
||||
{
|
||||
fire = cold = pois = nrgy = chaos = direct = 0;
|
||||
phys = 100;
|
||||
}
|
||||
|
||||
public TheFellowshipStaff(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
if (Map == Map.Trammel)
|
||||
{
|
||||
InstanceTram = this;
|
||||
}
|
||||
|
||||
if (Map == Map.Felucca)
|
||||
{
|
||||
InstanceFel = this;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user