fix: Finishes code gen for misc items (#1248)
This commit is contained in:
parent
6d00b2caa9
commit
5660f4636e
43 changed files with 2797 additions and 3156 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
using Server.Factions;
|
||||
using Server.Mobiles;
|
||||
using Server.Spells;
|
||||
|
|
@ -6,87 +7,67 @@ using Server.Spells.Fifth;
|
|||
using Server.Spells.Ninjitsu;
|
||||
using Server.Spells.Seventh;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class TribalPaint : Item
|
||||
{
|
||||
public class TribalPaint : Item
|
||||
[Constructible]
|
||||
public TribalPaint() : base(0x9EC)
|
||||
{
|
||||
[Constructible]
|
||||
public TribalPaint() : base(0x9EC)
|
||||
Hue = 2101;
|
||||
Weight = 2.0;
|
||||
Stackable = Core.ML;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1040000; // savage kin paint
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
Hue = 2101;
|
||||
Weight = 2.0;
|
||||
Stackable = Core.ML;
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
return;
|
||||
}
|
||||
|
||||
public TribalPaint(Serial serial) : base(serial)
|
||||
if (Sigil.ExistsOn(from))
|
||||
{
|
||||
from.SendLocalizedMessage(1010465); // You cannot disguise yourself while holding a sigil.
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1040000; // savage kin paint
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
else if (!from.CanBeginAction<IncognitoSpell>())
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
from.SendLocalizedMessage(501698); // You cannot disguise yourself while incognitoed.
|
||||
}
|
||||
else if (!from.CanBeginAction<PolymorphSpell>())
|
||||
{
|
||||
from.SendLocalizedMessage(501699); // You cannot disguise yourself while polymorphed.
|
||||
}
|
||||
else if (TransformationSpellHelper.UnderTransformation(from))
|
||||
{
|
||||
from.SendLocalizedMessage(501699); // You cannot disguise yourself while polymorphed.
|
||||
}
|
||||
else if (AnimalForm.UnderTransformation(from))
|
||||
{
|
||||
from.SendLocalizedMessage(1061634); // You cannot disguise yourself while in that form.
|
||||
}
|
||||
else if (from.IsBodyMod || from.FindItemOnLayer(Layer.Helm) is OrcishKinMask)
|
||||
{
|
||||
from.SendLocalizedMessage(501605); // You are already disguised.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.BodyMod = from.Female ? 184 : 183;
|
||||
from.HueMod = 0;
|
||||
|
||||
if (from is PlayerMobile mobile)
|
||||
{
|
||||
if (Sigil.ExistsOn(from))
|
||||
{
|
||||
from.SendLocalizedMessage(1010465); // You cannot disguise yourself while holding a sigil.
|
||||
}
|
||||
else if (!from.CanBeginAction<IncognitoSpell>())
|
||||
{
|
||||
from.SendLocalizedMessage(501698); // You cannot disguise yourself while incognitoed.
|
||||
}
|
||||
else if (!from.CanBeginAction<PolymorphSpell>())
|
||||
{
|
||||
from.SendLocalizedMessage(501699); // You cannot disguise yourself while polymorphed.
|
||||
}
|
||||
else if (TransformationSpellHelper.UnderTransformation(from))
|
||||
{
|
||||
from.SendLocalizedMessage(501699); // You cannot disguise yourself while polymorphed.
|
||||
}
|
||||
else if (AnimalForm.UnderTransformation(from))
|
||||
{
|
||||
from.SendLocalizedMessage(1061634); // You cannot disguise yourself while in that form.
|
||||
}
|
||||
else if (from.IsBodyMod || from.FindItemOnLayer(Layer.Helm) is OrcishKinMask)
|
||||
{
|
||||
from.SendLocalizedMessage(501605); // You are already disguised.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.BodyMod = from.Female ? 184 : 183;
|
||||
from.HueMod = 0;
|
||||
|
||||
if (from is PlayerMobile mobile)
|
||||
{
|
||||
mobile.SavagePaintExpiration = TimeSpan.FromDays(7.0);
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(
|
||||
1042537
|
||||
); // You now bear the markings of the savage tribe. Your body paint will last about a week or you can remove it with an oil cloth.
|
||||
|
||||
Consume();
|
||||
}
|
||||
mobile.SavagePaintExpiration = TimeSpan.FromDays(7.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
// You now bear the markings of the savage tribe. Your body paint will last about a week or you can remove it with an oil cloth.
|
||||
from.SendLocalizedMessage(1042537);
|
||||
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
Consume();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue