Reorganizes Project (#41)
This commit is contained in:
parent
08bf44af9a
commit
3614a66aee
3499 changed files with 79 additions and 55 deletions
|
|
@ -0,0 +1,119 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class BellOfTheDead : Item
|
||||
{
|
||||
[Constructible]
|
||||
public BellOfTheDead() : base(0x91A)
|
||||
{
|
||||
Hue = 0x835;
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public BellOfTheDead(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1050018; // bell of the dead
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster, AccessLevel.Administrator)]
|
||||
public Chyloth Chyloth{ get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster, AccessLevel.Administrator)]
|
||||
public SkeletalDragon Dragon{ get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster, AccessLevel.Administrator)]
|
||||
public bool Summoning{ get; set; }
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from.InRange(GetWorldLocation(), 2))
|
||||
BeginSummon(from);
|
||||
else
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
|
||||
public virtual void BeginSummon(Mobile from)
|
||||
{
|
||||
if (Chyloth?.Deleted == false)
|
||||
{
|
||||
from.SendLocalizedMessage(
|
||||
1050010); // The ferry man has already been summoned. There is no need to ring for him again.
|
||||
}
|
||||
else if (Dragon?.Deleted == false)
|
||||
{
|
||||
from.SendLocalizedMessage(
|
||||
1050017); // The ferryman has recently been summoned already. You decide against ringing the bell again so soon.
|
||||
}
|
||||
else if (!Summoning)
|
||||
{
|
||||
Summoning = true;
|
||||
|
||||
Effects.PlaySound(GetWorldLocation(), Map, 0x100);
|
||||
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(8.0), () => EndSummon(from));
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void EndSummon(Mobile from)
|
||||
{
|
||||
if (Chyloth?.Deleted == false)
|
||||
{
|
||||
from.SendLocalizedMessage(
|
||||
1050010); // The ferry man has already been summoned. There is no need to ring for him again.
|
||||
}
|
||||
else if (Dragon?.Deleted == false)
|
||||
{
|
||||
from.SendLocalizedMessage(
|
||||
1050017); // The ferryman has recently been summoned already. You decide against ringing the bell again so soon.
|
||||
}
|
||||
else if (Summoning)
|
||||
{
|
||||
Summoning = false;
|
||||
|
||||
Point3D loc = GetWorldLocation();
|
||||
|
||||
loc.Z -= 16;
|
||||
|
||||
Effects.SendLocationParticles(EffectItem.Create(loc, Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 0, 0,
|
||||
2023, 0);
|
||||
Effects.PlaySound(loc, Map, 0x1FE);
|
||||
|
||||
Chyloth = new Chyloth { Direction = (Direction)(7 & (4 + (int)from.GetDirectionTo(loc))) };
|
||||
|
||||
Chyloth.MoveToWorld(loc, Map);
|
||||
|
||||
Chyloth.Bell = this;
|
||||
Chyloth.AngryAt = from;
|
||||
Chyloth.BeginGiveWarning();
|
||||
Chyloth.BeginRemove(TimeSpan.FromSeconds(40.0));
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(Chyloth);
|
||||
writer.Write(Dragon);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Chyloth = reader.ReadMobile() as Chyloth;
|
||||
Dragon = reader.ReadMobile() as SkeletalDragon;
|
||||
|
||||
Chyloth?.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class ChylothShroud : Item
|
||||
{
|
||||
[Constructible]
|
||||
public ChylothShroud() : base(0x204E)
|
||||
{
|
||||
Hue = 0x846;
|
||||
Layer = Layer.OuterTorso;
|
||||
}
|
||||
|
||||
public ChylothShroud(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
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,33 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class ChylothStaff : BlackStaff
|
||||
{
|
||||
[Constructible]
|
||||
public ChylothStaff()
|
||||
{
|
||||
Hue = 0x482;
|
||||
}
|
||||
|
||||
public ChylothStaff(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041111; // a magic staff
|
||||
|
||||
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,33 @@
|
|||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class GoldenSkull : Item
|
||||
{
|
||||
[Constructible]
|
||||
public GoldenSkull() : base(Utility.Random(0x1AE2, 3))
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x8A5;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public GoldenSkull(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1061619; // a golden skull
|
||||
|
||||
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,34 @@
|
|||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class GrandGrimoire : Item
|
||||
{
|
||||
[Constructible]
|
||||
public GrandGrimoire() : base(0xEFA)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x835;
|
||||
Layer = Layer.OneHanded;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public GrandGrimoire(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1060801; // The Grand Grimoire
|
||||
|
||||
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,62 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Doom
|
||||
{
|
||||
public class SummoningAltar : AbbatoirAddon
|
||||
{
|
||||
private BoneDemon m_Daemon;
|
||||
|
||||
[Constructible]
|
||||
public SummoningAltar()
|
||||
{
|
||||
}
|
||||
|
||||
public SummoningAltar(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public BoneDemon Daemon
|
||||
{
|
||||
get => m_Daemon;
|
||||
set
|
||||
{
|
||||
m_Daemon = value;
|
||||
CheckDaemon();
|
||||
}
|
||||
}
|
||||
|
||||
public void CheckDaemon()
|
||||
{
|
||||
if (m_Daemon == null || !m_Daemon.Alive)
|
||||
{
|
||||
m_Daemon = null;
|
||||
Hue = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Hue = 0x66D;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(m_Daemon);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Daemon = reader.ReadMobile() as BoneDemon;
|
||||
|
||||
CheckDaemon();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue