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
|
|
@ -1854,11 +1854,7 @@ namespace Server.Engines.ConPVP
|
||||||
|
|
||||||
TransformationSpellHelper.RemoveContext(mob, true);
|
TransformationSpellHelper.RemoveContext(mob, true);
|
||||||
AnimalForm.RemoveContext(mob, true);
|
AnimalForm.RemoveContext(mob, true);
|
||||||
|
DisguisePersistence.StopTimer(mob);
|
||||||
if (DisguiseTimers.IsDisguised(mob))
|
|
||||||
{
|
|
||||||
DisguiseTimers.StopTimer(mob);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!mob.CanBeginAction<PolymorphSpell>())
|
if (!mob.CanBeginAction<PolymorphSpell>())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Gumps;
|
using Server.Gumps;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
|
|
@ -167,9 +168,10 @@ namespace Server.Engines.MLQuests.Gumps
|
||||||
{
|
{
|
||||||
from.SendLocalizedMessage(1073647); // You may not continue while mounted...
|
from.SendLocalizedMessage(1073647); // You may not continue while mounted...
|
||||||
}
|
}
|
||||||
else if (!from.CanBeginAction<PolymorphSpell>() || DisguiseTimers.IsDisguised(from) ||
|
// TODO: Does this cover everything?
|
||||||
|
else if (!from.CanBeginAction<PolymorphSpell>() || DisguisePersistence.IsDisguised(from) ||
|
||||||
AnimalForm.UnderTransformation(from) || !from.CanBeginAction<IncognitoSpell>() ||
|
AnimalForm.UnderTransformation(from) || !from.CanBeginAction<IncognitoSpell>() ||
|
||||||
from.IsBodyMod) // TODO: Does this cover everything?
|
from.IsBodyMod)
|
||||||
{
|
{
|
||||||
from.SendLocalizedMessage(1073648); // You may only proceed while in your original state...
|
from.SendLocalizedMessage(1073648); // You may only proceed while in your original state...
|
||||||
}
|
}
|
||||||
|
|
@ -284,17 +286,11 @@ namespace Server.Engines.MLQuests.Gumps
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RaceChangeDeed : Item, IRaceChanger
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class RaceChangeDeed : Item, IRaceChanger
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public RaceChangeDeed()
|
public RaceChangeDeed() : base(0x14F0) => LootType = LootType.Blessed;
|
||||||
: base(0x14F0) =>
|
|
||||||
LootType = LootType.Blessed;
|
|
||||||
|
|
||||||
public RaceChangeDeed(Serial serial)
|
|
||||||
: base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string DefaultName => "a race change deed";
|
public override string DefaultName => "a race change deed";
|
||||||
|
|
||||||
|
|
@ -335,19 +331,5 @@ namespace Server.Engines.MLQuests.Gumps
|
||||||
pm.SendGump(new RaceChangeConfirmGump(this, pm, pm.Race == Race.Human ? Race.Elf : Race.Human));
|
pm.SendGump(new RaceChangeConfirmGump(this, pm, pm.Race == Race.Human ? Race.Elf : Race.Human));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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,27 +1,11 @@
|
||||||
namespace Server.Items
|
using ModernUO.Serialization;
|
||||||
|
|
||||||
|
namespace Server.Items;
|
||||||
|
|
||||||
|
[Flippable(0xec6, 0xec7)]
|
||||||
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class Dressform : Item
|
||||||
{
|
{
|
||||||
[Flippable(0xec6, 0xec7)]
|
[Constructible]
|
||||||
public class Dressform : Item
|
public Dressform() : base(0xec6) => Weight = 10;
|
||||||
{
|
|
||||||
[Constructible]
|
|
||||||
public Dressform() : base(0xec6) => Weight = 10;
|
|
||||||
|
|
||||||
public Dressform(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,110 +1,77 @@
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.HuePickers;
|
using Server.HuePickers;
|
||||||
using Server.Targeting;
|
using Server.Targeting;
|
||||||
|
|
||||||
namespace Server.Items
|
namespace Server.Items;
|
||||||
|
|
||||||
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class Dyes : Item
|
||||||
{
|
{
|
||||||
public class Dyes : Item /* , IUsesRemaining */ /* TODO complete usesremaing */
|
// TODO: Add uses remaining
|
||||||
|
|
||||||
|
[Constructible]
|
||||||
|
public Dyes() : base(0xFA9) => Weight = 3.0;
|
||||||
|
|
||||||
|
public override void OnDoubleClick(Mobile from)
|
||||||
{
|
{
|
||||||
/*
|
from.SendLocalizedMessage(500856); // Select the dye tub to use the dyes on.
|
||||||
public bool ShowUsesRemaining { get { return false; } set { } }
|
from.Target = new InternalTarget();
|
||||||
|
}
|
||||||
|
|
||||||
[CommandProperty( AccessLevel.GameMaster )]
|
private class InternalTarget : Target
|
||||||
public virtual int UsesRemaining { get { return m_UsesRemaining; } set { m_UsesRemaining = value; } }
|
{
|
||||||
|
public InternalTarget() : base(1, false, TargetFlags.None)
|
||||||
private int m_UsesRemaining;
|
|
||||||
*/
|
|
||||||
|
|
||||||
[Constructible]
|
|
||||||
public Dyes() : base(0xFA9) => Weight = 3.0;
|
|
||||||
|
|
||||||
public Dyes(Serial serial) : base(serial)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
public virtual void SetTubHue(Mobile from, DyeTub tub, int hue)
|
||||||
{
|
{
|
||||||
base.Serialize(writer);
|
tub.DyedHue = hue;
|
||||||
|
|
||||||
writer.Write(1); // version
|
|
||||||
|
|
||||||
/* writer.Write( ( int )m_UsesRemaining ); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
protected override void OnTarget(Mobile from, object targeted)
|
||||||
{
|
{
|
||||||
base.Deserialize(reader);
|
if (targeted is DyeTub tub)
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
|
|
||||||
if (Weight == 0.0)
|
|
||||||
{
|
{
|
||||||
Weight = 3.0;
|
if (tub.Redyable)
|
||||||
}
|
|
||||||
|
|
||||||
/* m_UsesRemaining = ( version == 0 ) ? 25 : reader.ReadInt(); */
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnDoubleClick(Mobile from)
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(500856); // Select the dye tub to use the dyes on.
|
|
||||||
from.Target = new InternalTarget();
|
|
||||||
}
|
|
||||||
|
|
||||||
private class InternalTarget : Target
|
|
||||||
{
|
|
||||||
public InternalTarget() : base(1, false, TargetFlags.None)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual void SetTubHue(Mobile from, DyeTub tub, int hue)
|
|
||||||
{
|
|
||||||
tub.DyedHue = hue;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnTarget(Mobile from, object targeted)
|
|
||||||
{
|
|
||||||
if (targeted is DyeTub tub)
|
|
||||||
{
|
{
|
||||||
if (tub.Redyable)
|
if (tub.MetallicHues) /* OSI has three metallic tubs now */
|
||||||
{
|
{
|
||||||
if (tub.MetallicHues) /* OSI has three metallic tubs now */
|
from.SendGump(new MetallicHuePicker<DyeTub>(from, SetTubHue, tub));
|
||||||
{
|
|
||||||
from.SendGump(new MetallicHuePicker<DyeTub>(from, SetTubHue, tub));
|
|
||||||
}
|
|
||||||
else if (tub.CustomHuePicker != null)
|
|
||||||
{
|
|
||||||
from.SendGump(new CustomHuePickerGump<DyeTub>(from, tub.CustomHuePicker, SetTubHue, tub));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
from.SendHuePicker(new InternalPicker(tub));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (tub is BlackDyeTub)
|
else if (tub.CustomHuePicker != null)
|
||||||
{
|
{
|
||||||
from.SendLocalizedMessage(1010092); // You can not use this on a black dye tub.
|
from.SendGump(new CustomHuePickerGump<DyeTub>(from, tub.CustomHuePicker, SetTubHue, tub));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
from.SendMessage("That dye tub may not be redyed.");
|
from.SendHuePicker(new InternalPicker(tub));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (tub is BlackDyeTub)
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(1010092); // You can not use this on a black dye tub.
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
from.SendLocalizedMessage(500857); // Use this on a dye tub.
|
from.SendMessage("That dye tub may not be redyed.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
private class InternalPicker : HuePicker
|
|
||||||
{
|
{
|
||||||
private readonly DyeTub m_Tub;
|
from.SendLocalizedMessage(500857); // Use this on a dye tub.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public InternalPicker(DyeTub tub) : base(tub.ItemID) => m_Tub = tub;
|
private class InternalPicker : HuePicker
|
||||||
|
{
|
||||||
|
private readonly DyeTub m_Tub;
|
||||||
|
|
||||||
public override void OnResponse(int hue)
|
public InternalPicker(DyeTub tub) : base(tub.ItemID) => m_Tub = tub;
|
||||||
{
|
|
||||||
m_Tub.DyedHue = hue;
|
public override void OnResponse(int hue)
|
||||||
}
|
{
|
||||||
|
m_Tub.DyedHue = hue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,123 +1,98 @@
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Targeting;
|
using Server.Targeting;
|
||||||
|
|
||||||
namespace Server.Items
|
namespace Server.Items;
|
||||||
|
|
||||||
|
public interface IScissorable
|
||||||
{
|
{
|
||||||
public interface IScissorable
|
bool Scissor(Mobile from, Scissors scissors);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Flippable(0xf9f, 0xf9e)]
|
||||||
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class Scissors : Item
|
||||||
|
{
|
||||||
|
[Constructible]
|
||||||
|
public Scissors() : base(0xF9F) => Weight = 1.0;
|
||||||
|
|
||||||
|
public override void OnDoubleClick(Mobile from)
|
||||||
{
|
{
|
||||||
bool Scissor(Mobile from, Scissors scissors);
|
from.SendLocalizedMessage(502434); // What should I use these scissors on?
|
||||||
|
|
||||||
|
from.Target = new InternalTarget(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Flippable(0xf9f, 0xf9e)]
|
public static bool CanScissor(Mobile from, IScissorable obj)
|
||||||
public class Scissors : Item
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
if (obj is Item item && item.Nontransferable)
|
||||||
public Scissors() : base(0xF9F) => Weight = 1.0;
|
|
||||||
|
|
||||||
public Scissors(Serial serial) : base(serial)
|
|
||||||
{
|
{
|
||||||
|
from.SendLocalizedMessage(502440); // Scissors can not be used on that to produce anything.
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
// TODO: Move other general checks from the different implementations here
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private class InternalTarget : Target
|
||||||
|
{
|
||||||
|
private readonly Scissors m_Item;
|
||||||
|
|
||||||
|
public InternalTarget(Scissors item) : base(2, false, TargetFlags.None) => m_Item = item;
|
||||||
|
|
||||||
|
protected override void OnTarget(Mobile from, object targeted)
|
||||||
{
|
{
|
||||||
base.Serialize(writer);
|
if (m_Item.Deleted)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
writer.Write(0); // version
|
if (Core.AOS && targeted == from)
|
||||||
}
|
{
|
||||||
|
// "That doesn't seem like the smartest thing to do." / "That was an encounter you don't wish to repeat." / "Ha! You missed!"
|
||||||
public override void Deserialize(IGenericReader reader)
|
from.SendLocalizedMessage(1062845 + Utility.Random(3));
|
||||||
{
|
}
|
||||||
base.Deserialize(reader);
|
else if (Core.SE && Utility.RandomDouble() < 0.80 && (from.Direction & Direction.Running) != 0 &&
|
||||||
|
Core.TickCount - from.LastMoveTime < from.ComputeMovementSpeed(from.Direction))
|
||||||
var version = reader.ReadInt();
|
{
|
||||||
}
|
// Didn't your parents ever tell you not to run with scissors in your hand?!
|
||||||
|
from.SendLocalizedMessage(1063305);
|
||||||
public override void OnDoubleClick(Mobile from)
|
}
|
||||||
{
|
else if (targeted is Item item && !item.Movable)
|
||||||
from.SendLocalizedMessage(502434); // What should I use these scissors on?
|
{
|
||||||
|
if (item is IScissorable obj && obj is PlagueBeastInnard or PlagueBeastMutationCore)
|
||||||
from.Target = new InternalTarget(this);
|
{
|
||||||
}
|
if (CanScissor(from, obj) && obj.Scissor(from, m_Item))
|
||||||
|
{
|
||||||
public static bool CanScissor(Mobile from, IScissorable obj)
|
from.PlaySound(0x248);
|
||||||
{
|
}
|
||||||
if (obj is Item item && item.Nontransferable)
|
}
|
||||||
|
}
|
||||||
|
else if (targeted is IScissorable obj)
|
||||||
|
{
|
||||||
|
if (CanScissor(from, obj) && obj.Scissor(from, m_Item))
|
||||||
|
{
|
||||||
|
from.PlaySound(0x248);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
from.SendLocalizedMessage(502440); // Scissors can not be used on that to produce anything.
|
from.SendLocalizedMessage(502440); // Scissors can not be used on that to produce anything.
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Move other general checks from the different implementations here
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class InternalTarget : Target
|
protected override void OnNonlocalTarget(Mobile from, object targeted)
|
||||||
{
|
{
|
||||||
private readonly Scissors m_Item;
|
if (targeted is not (IScissorable obj and (PlagueBeastInnard or PlagueBeastMutationCore)))
|
||||||
|
|
||||||
public InternalTarget(Scissors item) : base(2, false, TargetFlags.None) => m_Item = item;
|
|
||||||
|
|
||||||
protected override void OnTarget(Mobile from, object targeted)
|
|
||||||
{
|
{
|
||||||
if (m_Item.Deleted)
|
base.OnNonlocalTarget(from, targeted);
|
||||||
{
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*if (targeted is Item && !((Item)targeted).IsStandardLoot())
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
|
|
||||||
}
|
|
||||||
else */
|
|
||||||
if (Core.AOS && targeted == from)
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(
|
|
||||||
1062845 + Utility
|
|
||||||
.Random(3)
|
|
||||||
); // "That doesn't seem like the smartest thing to do." / "That was an encounter you don't wish to repeat." / "Ha! You missed!"
|
|
||||||
}
|
|
||||||
else if (Core.SE && Utility.RandomDouble() < 0.80 && (from.Direction & Direction.Running) != 0 &&
|
|
||||||
Core.TickCount - from.LastMoveTime < from.ComputeMovementSpeed(from.Direction))
|
|
||||||
{
|
|
||||||
// Didn't your parents ever tell you not to run with scissors in your hand?!
|
|
||||||
from.SendLocalizedMessage(1063305);
|
|
||||||
}
|
|
||||||
else if (targeted is Item item && !item.Movable)
|
|
||||||
{
|
|
||||||
if (item is IScissorable obj && obj is PlagueBeastInnard or PlagueBeastMutationCore)
|
|
||||||
{
|
|
||||||
if (CanScissor(from, obj) && obj.Scissor(from, m_Item))
|
|
||||||
{
|
|
||||||
from.PlaySound(0x248);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (targeted is IScissorable obj)
|
|
||||||
{
|
|
||||||
if (CanScissor(from, obj) && obj.Scissor(from, m_Item))
|
|
||||||
{
|
|
||||||
from.PlaySound(0x248);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(502440); // Scissors can not be used on that to produce anything.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnNonlocalTarget(Mobile from, object targeted)
|
if (CanScissor(from, obj) && obj.Scissor(from, m_Item))
|
||||||
{
|
{
|
||||||
if (targeted is IScissorable obj && obj is PlagueBeastInnard or PlagueBeastMutationCore)
|
from.PlaySound(0x248);
|
||||||
{
|
|
||||||
if (CanScissor(from, obj) && obj.Scissor(from, m_Item))
|
|
||||||
{
|
|
||||||
from.PlaySound(0x248);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
base.OnNonlocalTarget(from, targeted);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Factions;
|
using Server.Factions;
|
||||||
using Server.Gumps;
|
using Server.Gumps;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
|
|
@ -9,347 +10,257 @@ using Server.Spells;
|
||||||
using Server.Spells.Fifth;
|
using Server.Spells.Fifth;
|
||||||
using Server.Spells.Seventh;
|
using Server.Spells.Seventh;
|
||||||
|
|
||||||
namespace Server.Items
|
namespace Server.Items;
|
||||||
|
|
||||||
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class DisguiseKit : Item
|
||||||
{
|
{
|
||||||
public class DisguiseKit : Item
|
[Constructible]
|
||||||
|
public DisguiseKit() : base(0xE05) => Weight = 1.0;
|
||||||
|
|
||||||
|
public bool ValidateUse(Mobile from)
|
||||||
{
|
{
|
||||||
[Constructible]
|
var pm = from as PlayerMobile;
|
||||||
public DisguiseKit() : base(0xE05) => Weight = 1.0;
|
|
||||||
|
|
||||||
public DisguiseKit(Serial serial) : base(serial)
|
if (!IsChildOf(from.Backpack))
|
||||||
{
|
{
|
||||||
|
from.SendLocalizedMessage(1042001);
|
||||||
|
}
|
||||||
|
else if (pm?.NpcGuild != NpcGuild.ThievesGuild)
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(501702);
|
||||||
|
}
|
||||||
|
else if (Stealing.SuspendOnMurder && pm.Kills > 0)
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(501703);
|
||||||
|
}
|
||||||
|
else if (!from.CanBeginAction<IncognitoSpell>())
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(501704);
|
||||||
|
}
|
||||||
|
else if (Sigil.ExistsOn(from))
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(1010465); // You cannot disguise yourself while holding a sigil
|
||||||
|
}
|
||||||
|
else if (TransformationSpellHelper.UnderTransformation(from))
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(1061634);
|
||||||
|
}
|
||||||
|
else if (from.BodyMod == 183 || from.BodyMod == 184)
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(1040002);
|
||||||
|
}
|
||||||
|
else if (!from.CanBeginAction<PolymorphSpell>() || from.IsBodyMod)
|
||||||
|
{
|
||||||
|
from.SendLocalizedMessage(501705);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int LabelNumber => 1041078; // a disguise kit
|
return false;
|
||||||
|
|
||||||
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 bool ValidateUse(Mobile from)
|
|
||||||
{
|
|
||||||
var pm = from as PlayerMobile;
|
|
||||||
|
|
||||||
if (!IsChildOf(from.Backpack))
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(1042001);
|
|
||||||
}
|
|
||||||
else if (pm?.NpcGuild != NpcGuild.ThievesGuild)
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(501702);
|
|
||||||
}
|
|
||||||
else if (Stealing.SuspendOnMurder && pm.Kills > 0)
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(501703);
|
|
||||||
}
|
|
||||||
else if (!from.CanBeginAction<IncognitoSpell>())
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(501704);
|
|
||||||
}
|
|
||||||
else if (Sigil.ExistsOn(from))
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(1010465); // You cannot disguise yourself while holding a sigil
|
|
||||||
}
|
|
||||||
else if (TransformationSpellHelper.UnderTransformation(from))
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(1061634);
|
|
||||||
}
|
|
||||||
else if (from.BodyMod == 183 || from.BodyMod == 184)
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(1040002);
|
|
||||||
}
|
|
||||||
else if (!from.CanBeginAction<PolymorphSpell>() || from.IsBodyMod)
|
|
||||||
{
|
|
||||||
from.SendLocalizedMessage(501705);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnDoubleClick(Mobile from)
|
|
||||||
{
|
|
||||||
if (ValidateUse(from))
|
|
||||||
{
|
|
||||||
from.SendGump(new DisguiseGump(from, this, true, false));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DisguiseGump : Gump
|
public override void OnDoubleClick(Mobile from)
|
||||||
{
|
{
|
||||||
private static readonly DisguiseEntry[] m_HairEntries =
|
if (ValidateUse(from))
|
||||||
{
|
{
|
||||||
new(8251, 50700, 0, 5, 1011052), // Short
|
from.SendGump(new DisguiseGump(from, this, true, false));
|
||||||
new(8261, 60710, 0, 3, 1011047), // Pageboy
|
}
|
||||||
new(8252, 60708, 0, -5, 1011053), // Long
|
}
|
||||||
new(8264, 60901, 0, 5, 1011048), // Receding
|
}
|
||||||
new(8253, 60702, 0, -5, 1011054), // Ponytail
|
|
||||||
new(8265, 60707, 0, -5, 1011049), // 2-tails
|
public class DisguiseGump : Gump
|
||||||
new(8260, 50703, 0, 5, 1011055), // Mohawk
|
{
|
||||||
new(8266, 60713, 0, 10, 1011050), // Topknot
|
private static readonly DisguiseEntry[] m_HairEntries =
|
||||||
null,
|
{
|
||||||
new(0, 0, 0, 0, 1011051) // None
|
new(8251, 50700, 0, 5, 1011052), // Short
|
||||||
};
|
new(8261, 60710, 0, 3, 1011047), // Pageboy
|
||||||
|
new(8252, 60708, 0, -5, 1011053), // Long
|
||||||
private static readonly DisguiseEntry[] m_BeardEntries =
|
new(8264, 60901, 0, 5, 1011048), // Receding
|
||||||
{
|
new(8253, 60702, 0, -5, 1011054), // Ponytail
|
||||||
new(8269, 50906, 0, 0, 1011401), // Vandyke
|
new(8265, 60707, 0, -5, 1011049), // 2-tails
|
||||||
new(8257, 50808, 0, -2, 1011062), // Mustache
|
new(8260, 50703, 0, 5, 1011055), // Mohawk
|
||||||
new(8255, 50802, 0, 0, 1011060), // Short beard
|
new(8266, 60713, 0, 10, 1011050), // Topknot
|
||||||
new(8268, 50905, 0, -10, 1011061), // Long beard
|
null,
|
||||||
new(8267, 50904, 0, 0, 1011060), // Short beard
|
new(0, 0, 0, 0, 1011051) // None
|
||||||
new(8254, 50801, 0, -10, 1011061), // Long beard
|
};
|
||||||
null,
|
|
||||||
new(0, 0, 0, 0, 1011051) // None
|
private static readonly DisguiseEntry[] m_BeardEntries =
|
||||||
};
|
{
|
||||||
|
new(8269, 50906, 0, 0, 1011401), // Vandyke
|
||||||
private readonly Mobile m_From;
|
new(8257, 50808, 0, -2, 1011062), // Mustache
|
||||||
private readonly DisguiseKit m_Kit;
|
new(8255, 50802, 0, 0, 1011060), // Short beard
|
||||||
private readonly bool m_Used;
|
new(8268, 50905, 0, -10, 1011061), // Long beard
|
||||||
|
new(8267, 50904, 0, 0, 1011060), // Short beard
|
||||||
public DisguiseGump(Mobile from, DisguiseKit kit, bool startAtHair, bool used) : base(50, 50)
|
new(8254, 50801, 0, -10, 1011061), // Long beard
|
||||||
{
|
null,
|
||||||
m_From = from;
|
new(0, 0, 0, 0, 1011051) // None
|
||||||
m_Kit = kit;
|
};
|
||||||
m_Used = used;
|
|
||||||
|
private readonly Mobile m_From;
|
||||||
from.CloseGump<DisguiseGump>();
|
private readonly DisguiseKit m_Kit;
|
||||||
|
private readonly bool m_Used;
|
||||||
AddPage(0);
|
|
||||||
|
public DisguiseGump(Mobile from, DisguiseKit kit, bool startAtHair, bool used) : base(50, 50)
|
||||||
AddBackground(100, 10, 400, 385, 2600);
|
{
|
||||||
|
m_From = from;
|
||||||
// <center>THIEF DISGUISE KIT</center>
|
m_Kit = kit;
|
||||||
AddHtmlLocalized(100, 25, 400, 35, 1011045);
|
m_Used = used;
|
||||||
|
|
||||||
AddButton(140, 353, 4005, 4007, 0);
|
from.CloseGump<DisguiseGump>();
|
||||||
AddHtmlLocalized(172, 355, 90, 35, 1011036); // OKAY
|
|
||||||
|
AddPage(0);
|
||||||
AddButton(257, 353, 4005, 4007, 1);
|
|
||||||
AddHtmlLocalized(289, 355, 90, 35, 1011046); // APPLY
|
AddBackground(100, 10, 400, 385, 2600);
|
||||||
|
|
||||||
if (from.Female || from.Body.IsFemale)
|
// <center>THIEF DISGUISE KIT</center>
|
||||||
{
|
AddHtmlLocalized(100, 25, 400, 35, 1011045);
|
||||||
DrawEntries(0, 1, -1, m_HairEntries, -1);
|
|
||||||
}
|
AddButton(140, 353, 4005, 4007, 0);
|
||||||
else if (startAtHair)
|
AddHtmlLocalized(172, 355, 90, 35, 1011036); // OKAY
|
||||||
{
|
|
||||||
DrawEntries(0, 1, 2, m_HairEntries, 1011056);
|
AddButton(257, 353, 4005, 4007, 1);
|
||||||
DrawEntries(1, 2, 1, m_BeardEntries, 1011059);
|
AddHtmlLocalized(289, 355, 90, 35, 1011046); // APPLY
|
||||||
}
|
|
||||||
else
|
if (from.Female || from.Body.IsFemale)
|
||||||
{
|
{
|
||||||
DrawEntries(1, 1, 2, m_BeardEntries, 1011059);
|
DrawEntries(0, 1, -1, m_HairEntries, -1);
|
||||||
DrawEntries(0, 2, 1, m_HairEntries, 1011056);
|
}
|
||||||
}
|
else if (startAtHair)
|
||||||
}
|
{
|
||||||
|
DrawEntries(0, 1, 2, m_HairEntries, 1011056);
|
||||||
private void DrawEntries(int index, int page, int nextPage, DisguiseEntry[] entries, int nextNumber)
|
DrawEntries(1, 2, 1, m_BeardEntries, 1011059);
|
||||||
{
|
}
|
||||||
AddPage(page);
|
else
|
||||||
|
{
|
||||||
if (nextPage != -1)
|
DrawEntries(1, 1, 2, m_BeardEntries, 1011059);
|
||||||
{
|
DrawEntries(0, 2, 1, m_HairEntries, 1011056);
|
||||||
AddButton(155, 320, 250 + index * 2, 251 + index * 2, 0, GumpButtonType.Page, nextPage);
|
}
|
||||||
AddHtmlLocalized(180, 320, 150, 35, nextNumber);
|
}
|
||||||
}
|
|
||||||
|
private void DrawEntries(int index, int page, int nextPage, DisguiseEntry[] entries, int nextNumber)
|
||||||
for (var i = 0; i < entries.Length; ++i)
|
{
|
||||||
{
|
AddPage(page);
|
||||||
var entry = entries[i];
|
|
||||||
|
if (nextPage != -1)
|
||||||
if (entry == null)
|
{
|
||||||
{
|
AddButton(155, 320, 250 + index * 2, 251 + index * 2, 0, GumpButtonType.Page, nextPage);
|
||||||
continue;
|
AddHtmlLocalized(180, 320, 150, 35, nextNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
var x = i % 2 * 205;
|
for (var i = 0; i < entries.Length; ++i)
|
||||||
var y = i / 2 * 55;
|
{
|
||||||
|
var entry = entries[i];
|
||||||
if (entry.m_GumpID != 0)
|
|
||||||
{
|
if (entry == null)
|
||||||
AddBackground(220 + x, 60 + y, 50, 50, 2620);
|
{
|
||||||
AddImage(153 + x + entry.m_OffsetX, 15 + y + entry.m_OffsetY, entry.m_GumpID);
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
AddHtmlLocalized(140 + x, 72 + y, 80, 35, entry.m_Number);
|
var x = i % 2 * 205;
|
||||||
AddRadio(118 + x, 73 + y, 208, 209, false, i * 2 + index);
|
var y = i / 2 * 55;
|
||||||
}
|
|
||||||
}
|
if (entry.m_GumpID != 0)
|
||||||
|
{
|
||||||
public override void OnResponse(NetState sender, RelayInfo info)
|
AddBackground(220 + x, 60 + y, 50, 50, 2620);
|
||||||
{
|
AddImage(153 + x + entry.m_OffsetX, 15 + y + entry.m_OffsetY, entry.m_GumpID);
|
||||||
if (info.ButtonID == 0)
|
}
|
||||||
{
|
|
||||||
if (m_Used)
|
AddHtmlLocalized(140 + x, 72 + y, 80, 35, entry.m_Number);
|
||||||
{
|
AddRadio(118 + x, 73 + y, 208, 209, false, i * 2 + index);
|
||||||
m_From.SendLocalizedMessage(501706); // Disguises wear off after 2 hours.
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
public override void OnResponse(NetState sender, RelayInfo info)
|
||||||
m_From.SendLocalizedMessage(501707); // You're looking good.
|
{
|
||||||
}
|
if (info.ButtonID == 0)
|
||||||
|
{
|
||||||
return;
|
if (m_Used)
|
||||||
}
|
{
|
||||||
|
m_From.SendLocalizedMessage(501706); // Disguises wear off after 2 hours.
|
||||||
var switches = info.Switches;
|
}
|
||||||
|
else
|
||||||
if (switches.Length == 0)
|
{
|
||||||
{
|
m_From.SendLocalizedMessage(501707); // You're looking good.
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
|
return;
|
||||||
var switched = switches[0];
|
}
|
||||||
var type = switched % 2;
|
|
||||||
var index = switched / 2;
|
var switches = info.Switches;
|
||||||
|
|
||||||
var hair = type == 0;
|
if (switches.Length == 0)
|
||||||
|
{
|
||||||
var entries = hair ? m_HairEntries : m_BeardEntries;
|
return;
|
||||||
|
}
|
||||||
if (index >= 0 && index < entries.Length)
|
|
||||||
{
|
var switched = switches[0];
|
||||||
var entry = entries[index];
|
var type = switched % 2;
|
||||||
|
var index = switched / 2;
|
||||||
if (entry == null)
|
|
||||||
{
|
var hair = type == 0;
|
||||||
return;
|
|
||||||
}
|
var entries = hair ? m_HairEntries : m_BeardEntries;
|
||||||
|
|
||||||
if (!m_Kit.ValidateUse(m_From))
|
if (index >= 0 && index < entries.Length)
|
||||||
{
|
{
|
||||||
return;
|
var entry = entries[index];
|
||||||
}
|
|
||||||
|
if (entry == null)
|
||||||
if (!hair && (m_From.Female || m_From.Body.IsFemale))
|
{
|
||||||
{
|
return;
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
|
if (!m_Kit.ValidateUse(m_From))
|
||||||
m_From.NameMod = NameList.RandomName(m_From.Female ? "female" : "male");
|
{
|
||||||
|
return;
|
||||||
if (m_From is PlayerMobile pm)
|
}
|
||||||
{
|
|
||||||
if (hair)
|
if (!hair && (m_From.Female || m_From.Body.IsFemale))
|
||||||
{
|
{
|
||||||
pm.SetHairMods(entry.m_ItemID, -2);
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
m_From.NameMod = NameList.RandomName(m_From.Female ? "female" : "male");
|
||||||
pm.SetHairMods(-2, entry.m_ItemID);
|
|
||||||
}
|
if (m_From is PlayerMobile pm)
|
||||||
}
|
{
|
||||||
|
if (hair)
|
||||||
m_From.SendGump(new DisguiseGump(m_From, m_Kit, hair, true));
|
{
|
||||||
|
pm.SetHairMods(entry.m_ItemID, -2);
|
||||||
DisguiseTimers.RemoveTimer(m_From);
|
}
|
||||||
|
else
|
||||||
DisguiseTimers.CreateTimer(m_From, TimeSpan.FromHours(2.0));
|
{
|
||||||
DisguiseTimers.StartTimer(m_From);
|
pm.SetHairMods(-2, entry.m_ItemID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class DisguiseEntry
|
m_From.SendGump(new DisguiseGump(m_From, m_Kit, hair, true));
|
||||||
{
|
|
||||||
public readonly int m_GumpID;
|
DisguisePersistence.RemoveTimer(m_From);
|
||||||
public readonly int m_ItemID;
|
|
||||||
public readonly int m_Number;
|
DisguisePersistence.CreateTimer(m_From, TimeSpan.FromHours(2.0));
|
||||||
public readonly int m_OffsetX;
|
DisguisePersistence.StartTimer(m_From);
|
||||||
public readonly int m_OffsetY;
|
}
|
||||||
|
}
|
||||||
public DisguiseEntry(int itemID, int gumpID, int ox, int oy, int name)
|
|
||||||
{
|
private class DisguiseEntry
|
||||||
m_ItemID = itemID;
|
{
|
||||||
m_GumpID = gumpID;
|
public readonly int m_GumpID;
|
||||||
m_OffsetX = ox;
|
public readonly int m_ItemID;
|
||||||
m_OffsetY = oy;
|
public readonly int m_Number;
|
||||||
m_Number = name;
|
public readonly int m_OffsetX;
|
||||||
}
|
public readonly int m_OffsetY;
|
||||||
}
|
|
||||||
}
|
public DisguiseEntry(int itemID, int gumpID, int ox, int oy, int name)
|
||||||
|
{
|
||||||
public static class DisguiseTimers
|
m_ItemID = itemID;
|
||||||
{
|
m_GumpID = gumpID;
|
||||||
public static Dictionary<Mobile, Timer> Timers { get; } = new();
|
m_OffsetX = ox;
|
||||||
|
m_OffsetY = oy;
|
||||||
public static void Initialize()
|
m_Number = name;
|
||||||
{
|
|
||||||
new DisguisePersistance();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void CreateTimer(Mobile m, TimeSpan delay)
|
|
||||||
{
|
|
||||||
if (m != null && !IsDisguised(m))
|
|
||||||
{
|
|
||||||
Timers[m] = new InternalTimer(m, delay);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void StartTimer(Mobile m)
|
|
||||||
{
|
|
||||||
Timers.TryGetValue(m, out var t);
|
|
||||||
t?.Start();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsDisguised(Mobile m) => Timers.ContainsKey(m);
|
|
||||||
|
|
||||||
public static void StopTimer(Mobile m)
|
|
||||||
{
|
|
||||||
if (!Timers.TryGetValue(m, out var t))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
t.Delay = Utility.Max(t.Next - Core.Now, TimeSpan.Zero);
|
|
||||||
t.Stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void RemoveTimer(Mobile m)
|
|
||||||
{
|
|
||||||
if (Timers.Remove(m, out var t))
|
|
||||||
{
|
|
||||||
t.Stop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static TimeSpan TimeRemaining(Mobile m) =>
|
|
||||||
Timers.TryGetValue(m, out var t) ? t.Next - Core.Now : TimeSpan.Zero;
|
|
||||||
|
|
||||||
private class InternalTimer : Timer
|
|
||||||
{
|
|
||||||
private readonly Mobile m_Player;
|
|
||||||
|
|
||||||
public InternalTimer(Mobile m, TimeSpan delay) : base(delay)
|
|
||||||
{
|
|
||||||
m_Player = m;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnTick()
|
|
||||||
{
|
|
||||||
m_Player.NameMod = null;
|
|
||||||
|
|
||||||
if (m_Player is PlayerMobile mobile)
|
|
||||||
{
|
|
||||||
mobile.SetHairMods(-1, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
RemoveTimer(m_Player);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
||||||
namespace Server.Items
|
|
||||||
{
|
|
||||||
public class DisguisePersistance : Item
|
|
||||||
{
|
|
||||||
public DisguisePersistance() : base(1)
|
|
||||||
{
|
|
||||||
Movable = false;
|
|
||||||
|
|
||||||
if (Instance?.Deleted != false)
|
|
||||||
{
|
|
||||||
Instance = this;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
base.Delete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public DisguisePersistance(Serial serial) : base(serial) => Instance = this;
|
|
||||||
|
|
||||||
public static DisguisePersistance Instance { get; private set; }
|
|
||||||
|
|
||||||
public override string DefaultName => "Disguise Persistance - Internal";
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
|
|
||||||
var timerCount = DisguiseTimers.Timers.Count;
|
|
||||||
|
|
||||||
writer.Write(timerCount);
|
|
||||||
|
|
||||||
foreach (var entry in DisguiseTimers.Timers)
|
|
||||||
{
|
|
||||||
var m = entry.Key;
|
|
||||||
|
|
||||||
writer.Write(m);
|
|
||||||
writer.Write(entry.Value.Next - Core.Now);
|
|
||||||
writer.Write(m.NameMod);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
|
|
||||||
switch (version)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
{
|
|
||||||
var count = reader.ReadInt();
|
|
||||||
|
|
||||||
for (var i = 0; i < count; ++i)
|
|
||||||
{
|
|
||||||
var m = reader.ReadEntity<Mobile>();
|
|
||||||
DisguiseTimers.CreateTimer(m, reader.ReadTimeSpan());
|
|
||||||
m.NameMod = reader.ReadString();
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Delete()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,133 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Server.Mobiles;
|
||||||
|
|
||||||
|
namespace Server.Items;
|
||||||
|
|
||||||
|
public static class DisguisePersistence
|
||||||
|
{
|
||||||
|
public static Dictionary<Mobile, Timer> Timers { get; } = new();
|
||||||
|
|
||||||
|
public static void Configure()
|
||||||
|
{
|
||||||
|
GenericPersistence.Register("Disguises", Serialize, Deserialize);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void Deserialize(IGenericReader reader)
|
||||||
|
{
|
||||||
|
var count = reader.ReadEncodedInt();
|
||||||
|
for (var i = 0; i < count; ++i)
|
||||||
|
{
|
||||||
|
var m = reader.ReadEntity<Mobile>();
|
||||||
|
CreateTimer(m, reader.ReadTimeSpan());
|
||||||
|
m.NameMod = reader.ReadString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void Serialize(IGenericWriter writer)
|
||||||
|
{
|
||||||
|
writer.WriteEncodedInt(Timers.Count);
|
||||||
|
foreach (var (m, timer) in Timers)
|
||||||
|
{
|
||||||
|
writer.Write(m);
|
||||||
|
writer.Write(timer.Next - Core.Now);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void CreateTimer(Mobile m, TimeSpan delay)
|
||||||
|
{
|
||||||
|
if (m != null && !IsDisguised(m))
|
||||||
|
{
|
||||||
|
Timers[m] = new InternalTimer(m, delay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void StartTimer(Mobile m)
|
||||||
|
{
|
||||||
|
if (Timers.TryGetValue(m, out var t))
|
||||||
|
{
|
||||||
|
t.Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool IsDisguised(Mobile m) => Timers.ContainsKey(m);
|
||||||
|
|
||||||
|
public static void StopTimer(Mobile m)
|
||||||
|
{
|
||||||
|
if (!Timers.TryGetValue(m, out var t))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
t.Delay = Utility.Max(t.Next - Core.Now, TimeSpan.Zero);
|
||||||
|
t.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void RemoveTimer(Mobile m)
|
||||||
|
{
|
||||||
|
if (Timers.Remove(m, out var t))
|
||||||
|
{
|
||||||
|
t.Stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static TimeSpan TimeRemaining(Mobile m) =>
|
||||||
|
Timers.TryGetValue(m, out var t) ? t.Next - Core.Now : TimeSpan.Zero;
|
||||||
|
|
||||||
|
private class InternalTimer : Timer
|
||||||
|
{
|
||||||
|
private readonly Mobile _player;
|
||||||
|
|
||||||
|
public InternalTimer(Mobile m, TimeSpan delay) : base(delay) => _player = m;
|
||||||
|
|
||||||
|
protected override void OnTick()
|
||||||
|
{
|
||||||
|
_player.NameMod = null;
|
||||||
|
|
||||||
|
if (_player is PlayerMobile mobile)
|
||||||
|
{
|
||||||
|
mobile.SetHairMods(-1, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
RemoveTimer(_player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[ManualDirtyChecking]
|
||||||
|
[TypeAlias("Server.Items.DisguisePersistance")]
|
||||||
|
[Obsolete("Deprecated in favor of the static system. Only used for legacy deserialization")]
|
||||||
|
public class DisguisePersistenceTimers : Item
|
||||||
|
{
|
||||||
|
public DisguisePersistenceTimers() : base(1)
|
||||||
|
{
|
||||||
|
Movable = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DisguisePersistenceTimers(Serial serial) : base(serial)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string DefaultName => "Disguise Persistence - Internal";
|
||||||
|
|
||||||
|
public override void Serialize(IGenericWriter writer)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Deserialize(IGenericReader reader)
|
||||||
|
{
|
||||||
|
base.Deserialize(reader);
|
||||||
|
|
||||||
|
var version = reader.ReadInt();
|
||||||
|
|
||||||
|
var count = reader.ReadInt();
|
||||||
|
for (var i = 0; i < count; ++i)
|
||||||
|
{
|
||||||
|
var m = reader.ReadEntity<Mobile>();
|
||||||
|
DisguisePersistence.CreateTimer(m, reader.ReadTimeSpan());
|
||||||
|
m.NameMod = reader.ReadString();
|
||||||
|
}
|
||||||
|
|
||||||
|
Timer.DelayCall(Delete);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Targeting;
|
using Server.Targeting;
|
||||||
|
|
||||||
namespace Server.Items;
|
namespace Server.Items;
|
||||||
|
|
@ -18,7 +19,8 @@ public interface ILockpickable : IPoint2D
|
||||||
}
|
}
|
||||||
|
|
||||||
[Flippable(0x14fc, 0x14fb)]
|
[Flippable(0x14fc, 0x14fb)]
|
||||||
public class Lockpick : Item
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class Lockpick : Item
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public Lockpick(int amount = 1) : base(0x14FC)
|
public Lockpick(int amount = 1) : base(0x14FC)
|
||||||
|
|
@ -27,29 +29,6 @@ public class Lockpick : Item
|
||||||
Amount = amount;
|
Amount = amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Lockpick(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(1); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
|
|
||||||
if (version == 0 && Weight == 0.1)
|
|
||||||
{
|
|
||||||
Weight = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnDoubleClick(Mobile from)
|
public override void OnDoubleClick(Mobile from)
|
||||||
{
|
{
|
||||||
from.SendLocalizedMessage(502068); // What do you want to pick?
|
from.SendLocalizedMessage(502068); // What do you want to pick?
|
||||||
|
|
@ -96,15 +75,15 @@ public class Lockpick : Item
|
||||||
|
|
||||||
private class InternalTimer : Timer
|
private class InternalTimer : Timer
|
||||||
{
|
{
|
||||||
private readonly Mobile m_From;
|
private readonly Mobile _from;
|
||||||
private readonly ILockpickable m_Item;
|
private readonly ILockpickable _item;
|
||||||
private readonly Lockpick m_Lockpick;
|
private readonly Lockpick _lockpick;
|
||||||
|
|
||||||
public InternalTimer(Mobile from, ILockpickable item, Lockpick lockpick) : base(TimeSpan.FromSeconds(3.0))
|
public InternalTimer(Mobile from, ILockpickable item, Lockpick lockpick) : base(TimeSpan.FromSeconds(3.0))
|
||||||
{
|
{
|
||||||
m_From = from;
|
_from = from;
|
||||||
m_Item = item;
|
_item = item;
|
||||||
m_Lockpick = lockpick;
|
_lockpick = lockpick;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void BrokeLockPickTest()
|
protected void BrokeLockPickTest()
|
||||||
|
|
@ -112,56 +91,52 @@ public class Lockpick : Item
|
||||||
// When failed, a 25% chance to break the lockpick
|
// When failed, a 25% chance to break the lockpick
|
||||||
if (Utility.Random(4) == 0)
|
if (Utility.Random(4) == 0)
|
||||||
{
|
{
|
||||||
var item = (Item)m_Item;
|
var item = (Item)_item;
|
||||||
|
|
||||||
// You broke the lockpick.
|
// You broke the lockpick.
|
||||||
item.SendLocalizedMessageTo(m_From, 502074);
|
item.SendLocalizedMessageTo(_from, 502074);
|
||||||
|
|
||||||
m_From.PlaySound(0x3A4);
|
_from.PlaySound(0x3A4);
|
||||||
m_Lockpick.Consume();
|
_lockpick.Consume();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnTick()
|
protected override void OnTick()
|
||||||
{
|
{
|
||||||
var item = (Item)m_Item;
|
var item = (Item)_item;
|
||||||
|
|
||||||
if (!m_From.InRange(item.GetWorldLocation(), 1))
|
if (!_from.InRange(item.GetWorldLocation(), 1))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_Item.LockLevel is ILockpickable.CannotPick or ILockpickable.MagicLock)
|
if (_item.LockLevel is ILockpickable.CannotPick or ILockpickable.MagicLock)
|
||||||
{
|
{
|
||||||
// LockLevel of 0 means that the door can't be picklocked
|
// LockLevel of 0 means that the door can't be picklocked
|
||||||
// LockLevel of -255 means it's magic locked
|
// LockLevel of -255 means it's magic locked
|
||||||
item.SendLocalizedMessageTo(m_From, 502073); // This lock cannot be picked by normal means
|
item.SendLocalizedMessageTo(_from, 502073); // This lock cannot be picked by normal means
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_From.Skills.Lockpicking.Value < m_Item.RequiredSkill)
|
if (_from.Skills.Lockpicking.Value < _item.RequiredSkill)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
// Do some training to gain skills
|
|
||||||
m_From.CheckSkill( SkillName.Lockpicking, 0, m_Item.LockLevel );*/
|
|
||||||
|
|
||||||
// The LockLevel is higher thant the LockPicking of the player
|
// The LockLevel is higher thant the LockPicking of the player
|
||||||
item.SendLocalizedMessageTo(m_From, 502072); // You don't see how that lock can be manipulated.
|
item.SendLocalizedMessageTo(_from, 502072); // You don't see how that lock can be manipulated.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_From.CheckTargetSkill(SkillName.Lockpicking, m_Item, m_Item.LockLevel, m_Item.MaxLockLevel))
|
if (_from.CheckTargetSkill(SkillName.Lockpicking, _item, _item.LockLevel, _item.MaxLockLevel))
|
||||||
{
|
{
|
||||||
// Success! Pick the lock!
|
// Success! Pick the lock!
|
||||||
item.SendLocalizedMessageTo(m_From, 502076); // The lock quickly yields to your skill.
|
item.SendLocalizedMessageTo(_from, 502076); // The lock quickly yields to your skill.
|
||||||
m_From.PlaySound(0x4A);
|
_from.PlaySound(0x4A);
|
||||||
m_Item.LockPick(m_From);
|
_item.LockPick(_from);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// The player failed to pick the lock
|
// The player failed to pick the lock
|
||||||
BrokeLockPickTest();
|
BrokeLockPickTest();
|
||||||
item.SendLocalizedMessageTo(m_From, 502075); // You are unable to pick the lock.
|
item.SendLocalizedMessageTo(_from, 502075); // You are unable to pick the lock.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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)]
|
[Constructible]
|
||||||
public class Axle : Item
|
public Axle(int amount = 1) : base(0x105B)
|
||||||
{
|
{
|
||||||
[Constructible]
|
Stackable = true;
|
||||||
public Axle(int amount = 1) : base(0x105B)
|
Amount = amount;
|
||||||
{
|
Weight = 1.0;
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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)]
|
[Constructible]
|
||||||
public class AxleGears : Item
|
public AxleGears(int amount = 1) : base(0x1051)
|
||||||
{
|
{
|
||||||
[Constructible]
|
Stackable = true;
|
||||||
public AxleGears(int amount = 1) : base(0x1051)
|
Amount = amount;
|
||||||
{
|
Weight = 1.0;
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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)]
|
[Constructible]
|
||||||
public class ClockFrame : Item
|
public ClockFrame(int amount = 1) : base(0x104D)
|
||||||
{
|
{
|
||||||
[Constructible]
|
Stackable = true;
|
||||||
public ClockFrame(int amount = 1) : base(0x104D)
|
Amount = amount;
|
||||||
{
|
Weight = 2.0;
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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)]
|
[Constructible]
|
||||||
public class ClockParts : Item
|
public ClockParts(int amount = 1) : base(0x104F)
|
||||||
{
|
{
|
||||||
[Constructible]
|
Stackable = true;
|
||||||
public ClockParts(int amount = 1) : base(0x104F)
|
Amount = amount;
|
||||||
{
|
Weight = 1.0;
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,216 +1,144 @@
|
||||||
using System;
|
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,
|
ServerStart = Core.Now;
|
||||||
WaxingCrescentMoon,
|
|
||||||
FirstQuarter,
|
|
||||||
WaxingGibbous,
|
|
||||||
FullMoon,
|
|
||||||
WaningGibbous,
|
|
||||||
LastQuarter,
|
|
||||||
WaningCrescent
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Flippable(0x104B, 0x104C)]
|
public static MoonPhase GetMoonPhase(Map map, int x, int y)
|
||||||
public class Clock : Item
|
|
||||||
{
|
{
|
||||||
public const double SecondsPerUOMinute = 5.0;
|
GetTime(map, x, y, out _, out _, out var totalMinutes);
|
||||||
public const double MinutesPerUODay = SecondsPerUOMinute * 24;
|
|
||||||
|
|
||||||
private static readonly DateTime WorldStart = new(1997, 9, 1);
|
if (map != null)
|
||||||
|
|
||||||
[Constructible]
|
|
||||||
public Clock(int itemID = 0x104B) : base(itemID) => Weight = 3.0;
|
|
||||||
|
|
||||||
public Clock(Serial serial) : base(serial)
|
|
||||||
{
|
{
|
||||||
|
totalMinutes /= 10 + map.MapIndex * 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DateTime ServerStart { get; private set; }
|
return (MoonPhase)(totalMinutes % 8);
|
||||||
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Flippable(0x104B, 0x104C)]
|
public static void GetTime(Map map, int x, int y, out int hours, out int minutes)
|
||||||
public class ClockRight : Clock
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
GetTime(map, x, y, out hours, out minutes, out _);
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Flippable(0x104B, 0x104C)]
|
public static void GetTime(Map map, int x, int y, out int hours, out int minutes, out int totalMinutes)
|
||||||
public class ClockLeft : Clock
|
|
||||||
{
|
{
|
||||||
[Constructible]
|
var timeSpan = Core.Now - WorldStart;
|
||||||
public ClockLeft() : base(0x104C)
|
|
||||||
|
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)
|
exactTime = $"{hours}:{minutes:D2}";
|
||||||
{
|
}
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
public override void OnDoubleClick(Mobile from)
|
||||||
}
|
{
|
||||||
|
GetTime(from, out var genericNumber, out var exactTime);
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
SendLocalizedMessageTo(from, genericNumber);
|
||||||
{
|
SendLocalizedMessageTo(from, 1042958, exactTime); // ~1_TIME~ to be exact
|
||||||
base.Deserialize(reader);
|
}
|
||||||
|
}
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
[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)]
|
[Constructible]
|
||||||
public class Gears : Item
|
public Gears(int amount = 1) : base(0x1053)
|
||||||
{
|
{
|
||||||
[Constructible]
|
Stackable = true;
|
||||||
public Gears(int amount = 1) : base(0x1053)
|
Amount = amount;
|
||||||
{
|
Weight = 1.0;
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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) => Weight = 3.0;
|
||||||
[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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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)]
|
[Constructible]
|
||||||
public class Hinge : Item
|
public Hinge(int amount = 1) : base(0x1055)
|
||||||
{
|
{
|
||||||
[Constructible]
|
Stackable = true;
|
||||||
public Hinge(int amount = 1) : base(0x1055)
|
Amount = amount;
|
||||||
{
|
Weight = 1.0;
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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)]
|
[Constructible]
|
||||||
public class SextantParts : Item
|
public SextantParts(int amount = 1) : base(0x1059)
|
||||||
{
|
{
|
||||||
[Constructible]
|
Stackable = true;
|
||||||
public SextantParts(int amount = 1) : base(0x1059)
|
Amount = amount;
|
||||||
{
|
Weight = 2.0;
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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)]
|
[Constructible]
|
||||||
public class Springs : Item
|
public Springs(int amount = 1) : base(0x105D)
|
||||||
{
|
{
|
||||||
[Constructible]
|
Stackable = true;
|
||||||
public Springs(int amount = 1) : base(0x105D)
|
Amount = amount;
|
||||||
{
|
Weight = 1.0;
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,96 +1,74 @@
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Engines.Quests.Hag;
|
using Server.Engines.Quests.Hag;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
using Server.Network;
|
using Server.Network;
|
||||||
|
|
||||||
namespace Server.Items
|
namespace Server.Items;
|
||||||
|
|
||||||
|
[Flippable(0x14F5, 0x14F6)]
|
||||||
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class Spyglass : Item
|
||||||
{
|
{
|
||||||
[Flippable(0x14F5, 0x14F6)]
|
[Constructible]
|
||||||
public class Spyglass : Item
|
public Spyglass() : base(0x14F5) => Weight = 3.0;
|
||||||
|
|
||||||
|
public override void OnDoubleClick(Mobile from)
|
||||||
{
|
{
|
||||||
[Constructible]
|
// You peer into the heavens, seeking the moons...
|
||||||
public Spyglass() : base(0x14F5) => Weight = 3.0;
|
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)
|
if (qs is not WitchApprenticeQuest)
|
||||||
{
|
|
||||||
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)
|
|
||||||
{
|
{
|
||||||
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();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
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 _);
|
// You gaze up into the sky, but it is not dark enough to see any stars.
|
||||||
|
player.SendLocalizedMessage(1055039);
|
||||||
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.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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)]
|
[Constructible]
|
||||||
public class Fork : Item
|
public Fork() : base(0x9F4) => Weight = 1.0;
|
||||||
{
|
}
|
||||||
[Constructible]
|
|
||||||
public Fork() : base(0x9F4) => Weight = 1.0;
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class ForkLeft : Item
|
||||||
public Fork(Serial serial) : base(serial)
|
{
|
||||||
{
|
[Constructible]
|
||||||
}
|
public ForkLeft() : base(0x9F4) => Weight = 1.0;
|
||||||
|
}
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
[SerializationGenerator(0, false)]
|
||||||
base.Serialize(writer);
|
public partial class ForkRight : Item
|
||||||
|
{
|
||||||
writer.Write(0); // version
|
[Constructible]
|
||||||
}
|
public ForkRight() : base(0x9F5) => Weight = 1.0;
|
||||||
|
}
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
[Flippable(0x9F8, 0x9F9, 0x9C2, 0x9C3)]
|
||||||
base.Deserialize(reader);
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class Spoon : Item
|
||||||
var version = reader.ReadInt();
|
{
|
||||||
}
|
[Constructible]
|
||||||
}
|
public Spoon() : base(0x9F8) => Weight = 1.0;
|
||||||
|
}
|
||||||
public class ForkLeft : Item
|
|
||||||
{
|
[SerializationGenerator(0, false)]
|
||||||
[Constructible]
|
public partial class SpoonLeft : Item
|
||||||
public ForkLeft() : base(0x9F4) => Weight = 1.0;
|
{
|
||||||
|
[Constructible]
|
||||||
public ForkLeft(Serial serial) : base(serial)
|
public SpoonLeft() : base(0x9F8) => Weight = 1.0;
|
||||||
{
|
}
|
||||||
}
|
|
||||||
|
[SerializationGenerator(0, false)]
|
||||||
public override void Serialize(IGenericWriter writer)
|
public partial class SpoonRight : Item
|
||||||
{
|
{
|
||||||
base.Serialize(writer);
|
[Constructible]
|
||||||
|
public SpoonRight() : base(0x9F9) => Weight = 1.0;
|
||||||
writer.Write(0); // version
|
}
|
||||||
}
|
|
||||||
|
[Flippable(0x9F6, 0x9F7, 0x9A5, 0x9A6)]
|
||||||
public override void Deserialize(IGenericReader reader)
|
[SerializationGenerator(0, false)]
|
||||||
{
|
public partial class Knife : Item
|
||||||
base.Deserialize(reader);
|
{
|
||||||
|
[Constructible]
|
||||||
var version = reader.ReadInt();
|
public Knife() : base(0x9F6) => Weight = 1.0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
[SerializationGenerator(0, false)]
|
||||||
public class ForkRight : Item
|
public partial class KnifeLeft : Item
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public ForkRight() : base(0x9F5) => Weight = 1.0;
|
public KnifeLeft() : base(0x9F6) => Weight = 1.0;
|
||||||
|
}
|
||||||
public ForkRight(Serial serial) : base(serial)
|
|
||||||
{
|
[SerializationGenerator(0, false)]
|
||||||
}
|
public partial class KnifeRight : Item
|
||||||
|
{
|
||||||
public override void Serialize(IGenericWriter writer)
|
[Constructible]
|
||||||
{
|
public KnifeRight() : base(0x9F7) => Weight = 1.0;
|
||||||
base.Serialize(writer);
|
}
|
||||||
|
|
||||||
writer.Write(0); // version
|
[SerializationGenerator(0, false)]
|
||||||
}
|
public partial class Plate : Item
|
||||||
|
{
|
||||||
public override void Deserialize(IGenericReader reader)
|
[Constructible]
|
||||||
{
|
public Plate() : base(0x9D7) => Weight = 1.0;
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
4
Projects/UOContent/Migrations/Server.Engines.MLQuests.Gumps.RaceChangeDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.MLQuests.Gumps.RaceChangeDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.MLQuests.Gumps.RaceChangeDeed"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Axle.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Axle.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Axle"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.AxleGears.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.AxleGears.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.AxleGears"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Clock.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Clock.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Clock"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.ClockFrame.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.ClockFrame.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.ClockFrame"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.ClockLeft.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.ClockLeft.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.ClockLeft"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.ClockParts.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.ClockParts.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.ClockParts"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.ClockRight.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.ClockRight.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.ClockRight"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.DisguiseKit.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.DisguiseKit.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.DisguiseKit"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Dressform.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Dressform.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Dressform"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Dyes.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Dyes.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Dyes"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Fork.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Fork.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Fork"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.ForkLeft.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.ForkLeft.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.ForkLeft"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.ForkRight.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.ForkRight.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.ForkRight"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Gears.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Gears.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Gears"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Globe.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Globe.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Globe"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Hinge.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Hinge.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Hinge"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Knife.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Knife.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Knife"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.KnifeLeft.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.KnifeLeft.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.KnifeLeft"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.KnifeRight.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.KnifeRight.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.KnifeRight"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Lockpick.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Lockpick.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Lockpick"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Plate.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Plate.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Plate"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Scissors.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Scissors.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Scissors"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.SextantParts.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.SextantParts.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.SextantParts"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Spoon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Spoon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Spoon"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.SpoonLeft.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.SpoonLeft.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.SpoonLeft"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.SpoonRight.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.SpoonRight.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.SpoonRight"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Springs.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Springs.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Springs"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Items.Spyglass.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Spyglass.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Items.Spyglass"
|
||||||
|
}
|
||||||
|
|
@ -231,7 +231,7 @@ namespace Server.Mobiles
|
||||||
public DateTime AnkhNextUse { get; set; }
|
public DateTime AnkhNextUse { get; set; }
|
||||||
|
|
||||||
[CommandProperty(AccessLevel.GameMaster)]
|
[CommandProperty(AccessLevel.GameMaster)]
|
||||||
public TimeSpan DisguiseTimeLeft => DisguiseTimers.TimeRemaining(this);
|
public TimeSpan DisguiseTimeLeft => DisguisePersistence.TimeRemaining(this);
|
||||||
|
|
||||||
[CommandProperty(AccessLevel.GameMaster)]
|
[CommandProperty(AccessLevel.GameMaster)]
|
||||||
public DateTime PeacedUntil { get; set; }
|
public DateTime PeacedUntil { get; set; }
|
||||||
|
|
@ -1527,7 +1527,7 @@ namespace Server.Mobiles
|
||||||
pm.LastOnline = Core.Now;
|
pm.LastOnline = Core.Now;
|
||||||
}
|
}
|
||||||
|
|
||||||
DisguiseTimers.StartTimer(m);
|
DisguisePersistence.StartTimer(m);
|
||||||
|
|
||||||
Timer.StartTimer(() => SpecialMove.ClearAllMoves(m));
|
Timer.StartTimer(() => SpecialMove.ClearAllMoves(m));
|
||||||
}
|
}
|
||||||
|
|
@ -1575,7 +1575,7 @@ namespace Server.Mobiles
|
||||||
pm.LastOnline = Core.Now;
|
pm.LastOnline = Core.Now;
|
||||||
}
|
}
|
||||||
|
|
||||||
DisguiseTimers.StopTimer(from);
|
DisguisePersistence.StopTimer(from);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void RevealingAction()
|
public override void RevealingAction()
|
||||||
|
|
@ -2577,7 +2577,7 @@ namespace Server.Mobiles
|
||||||
|
|
||||||
PolymorphSpell.StopTimer(this);
|
PolymorphSpell.StopTimer(this);
|
||||||
IncognitoSpell.StopTimer(this);
|
IncognitoSpell.StopTimer(this);
|
||||||
DisguiseTimers.RemoveTimer(this);
|
DisguisePersistence.RemoveTimer(this);
|
||||||
|
|
||||||
EndAction<PolymorphSpell>();
|
EndAction<PolymorphSpell>();
|
||||||
EndAction<IncognitoSpell>();
|
EndAction<IncognitoSpell>();
|
||||||
|
|
@ -3487,7 +3487,7 @@ namespace Server.Mobiles
|
||||||
|
|
||||||
BaseHouse.HandleDeletion(this);
|
BaseHouse.HandleDeletion(this);
|
||||||
|
|
||||||
DisguiseTimers.RemoveTimer(this);
|
DisguisePersistence.RemoveTimer(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void GetProperties(IPropertyList list)
|
public override void GetProperties(IPropertyList list)
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ namespace Server.SkillHandlers
|
||||||
{
|
{
|
||||||
m_Thief.SendLocalizedMessage(1010581); // You cannot steal the sigil when you are incognito
|
m_Thief.SendLocalizedMessage(1010581); // You cannot steal the sigil when you are incognito
|
||||||
}
|
}
|
||||||
else if (DisguiseTimers.IsDisguised(m_Thief))
|
else if (DisguisePersistence.IsDisguised(m_Thief))
|
||||||
{
|
{
|
||||||
m_Thief.SendLocalizedMessage(1010583); // You cannot steal the sigil while disguised
|
m_Thief.SendLocalizedMessage(1010583); // You cannot steal the sigil while disguised
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1204,7 +1204,7 @@ namespace Server.Spells
|
||||||
{
|
{
|
||||||
caster.SendLocalizedMessage(1061628); // You can't do that while polymorphed.
|
caster.SendLocalizedMessage(1061628); // You can't do that while polymorphed.
|
||||||
}
|
}
|
||||||
else if (DisguiseTimers.IsDisguised(caster))
|
else if (DisguisePersistence.IsDisguised(caster))
|
||||||
{
|
{
|
||||||
caster.SendLocalizedMessage(1061631); // You can't do that while disguised.
|
caster.SendLocalizedMessage(1061631); // You can't do that while disguised.
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ namespace Server.Spells.Fifth
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DisguiseTimers.IsDisguised(Caster))
|
if (DisguisePersistence.IsDisguised(Caster))
|
||||||
{
|
{
|
||||||
Caster.SendLocalizedMessage(1061631); // You can't do that while disguised.
|
Caster.SendLocalizedMessage(1061631); // You can't do that while disguised.
|
||||||
return;
|
return;
|
||||||
|
|
@ -86,7 +86,7 @@ namespace Server.Spells.Fifth
|
||||||
{
|
{
|
||||||
if (Caster.BeginAction<IncognitoSpell>())
|
if (Caster.BeginAction<IncognitoSpell>())
|
||||||
{
|
{
|
||||||
DisguiseTimers.StopTimer(Caster);
|
DisguisePersistence.StopTimer(Caster);
|
||||||
|
|
||||||
Caster.HueMod = Caster.Race.RandomSkinHue();
|
Caster.HueMod = Caster.Race.RandomSkinHue();
|
||||||
Caster.NameMod = Caster.Female ? NameList.RandomName("female") : NameList.RandomName("male");
|
Caster.NameMod = Caster.Female ? NameList.RandomName("female") : NameList.RandomName("male");
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ namespace Server.Spells.Ninjitsu
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DisguiseTimers.IsDisguised(Caster))
|
if (DisguisePersistence.IsDisguised(Caster))
|
||||||
{
|
{
|
||||||
Caster.SendLocalizedMessage(1061631); // You can't do that while disguised.
|
Caster.SendLocalizedMessage(1061631); // You can't do that while disguised.
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ namespace Server.Spells.Seventh
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DisguiseTimers.IsDisguised(caster))
|
if (DisguisePersistence.IsDisguised(caster))
|
||||||
{
|
{
|
||||||
caster.SendLocalizedMessage(502167); // You cannot polymorph while disguised.
|
caster.SendLocalizedMessage(502167); // You cannot polymorph while disguised.
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -122,7 +122,7 @@ namespace Server.Spells.Seventh
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DisguiseTimers.IsDisguised(caster))
|
if (DisguisePersistence.IsDisguised(caster))
|
||||||
{
|
{
|
||||||
caster.SendLocalizedMessage(502167); // You cannot polymorph while disguised.
|
caster.SendLocalizedMessage(502167); // You cannot polymorph while disguised.
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue