fix: Codegens spell items (#1765)
### Summary - Fixes some serialization issues with spell items - Fixes accessibility issues with field spells and removes the awkward "InternalItem" concept - Codegens the fields/items used in spells
This commit is contained in:
parent
542b672d9d
commit
8efa90b3ce
25 changed files with 1389 additions and 1507 deletions
|
|
@ -164,8 +164,7 @@ namespace Server.Spells.Spellweaving
|
|||
else // OSI renewal rules: the new one will override the old one, always.
|
||||
{
|
||||
to.SendLocalizedMessage(1072828); // Your arcane focus is renewed.
|
||||
focus.LifeSpan = duration;
|
||||
focus.CreationTime = Core.Now;
|
||||
focus.ResetExpiration(duration);
|
||||
focus.StrengthBonus = strengthBonus;
|
||||
focus.InvalidateProperties();
|
||||
focus.SendTimeRemainingMessage(to);
|
||||
|
|
|
|||
|
|
@ -1,60 +1,40 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class ArcaneFocus : TransientItem
|
||||
{
|
||||
public class ArcaneFocus : TransientItem
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private int _strengthBonus;
|
||||
|
||||
[Constructible]
|
||||
public ArcaneFocus() : this(TimeSpan.FromHours(1), 1)
|
||||
{
|
||||
[Constructible]
|
||||
public ArcaneFocus()
|
||||
: this(TimeSpan.FromHours(1), 1)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ArcaneFocus(int lifeSpan, int strengthBonus)
|
||||
: this(TimeSpan.FromSeconds(lifeSpan), strengthBonus)
|
||||
{
|
||||
}
|
||||
[Constructible]
|
||||
public ArcaneFocus(int lifeSpan, int strengthBonus) : this(TimeSpan.FromSeconds(lifeSpan), strengthBonus)
|
||||
{
|
||||
}
|
||||
|
||||
public ArcaneFocus(TimeSpan lifeSpan, int strengthBonus) : base(0x3155, lifeSpan)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
StrengthBonus = strengthBonus;
|
||||
}
|
||||
public ArcaneFocus(TimeSpan lifeSpan, int strengthBonus) : base(0x3155, lifeSpan)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
_strengthBonus = strengthBonus;
|
||||
}
|
||||
|
||||
public ArcaneFocus(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
public override int LabelNumber => 1032629; // Arcane Focus
|
||||
|
||||
public override int LabelNumber => 1032629; // Arcane Focus
|
||||
public override TextDefinition InvalidTransferMessage => 1073480; // Your arcane focus disappears.
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int StrengthBonus { get; set; }
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
public override TextDefinition InvalidTransferMessage { get; } = 1073480; // Your arcane focus disappears.
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1060485, StrengthBonus); // strength bonus ~1_val~
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write(StrengthBonus);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
var version = reader.ReadInt();
|
||||
|
||||
StrengthBonus = reader.ReadInt();
|
||||
}
|
||||
list.Add(1060485, _strengthBonus); // strength bonus ~1_val~
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,105 +1,94 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(1, false)]
|
||||
public partial class TransientItem : Item
|
||||
{
|
||||
public class TransientItem : Item
|
||||
private TimerExecutionToken _timerToken;
|
||||
|
||||
[DeltaDateTime]
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private DateTime _expiration;
|
||||
|
||||
[Constructible]
|
||||
public TransientItem(int itemID, TimeSpan lifeSpan) : base(itemID)
|
||||
{
|
||||
private TimerExecutionToken _timerToken;
|
||||
_expiration = Core.Now + lifeSpan;
|
||||
|
||||
[Constructible]
|
||||
public TransientItem(int itemID, TimeSpan lifeSpan)
|
||||
: base(itemID)
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5), CheckExpiry, out _timerToken);
|
||||
}
|
||||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public virtual TextDefinition InvalidTransferMessage => TextDefinition.Empty;
|
||||
|
||||
public override void HandleInvalidTransfer(Mobile from)
|
||||
{
|
||||
InvalidTransferMessage.SendMessageTo(from);
|
||||
|
||||
Delete();
|
||||
}
|
||||
|
||||
public virtual void Expire(Mobile parent)
|
||||
{
|
||||
parent?.SendLocalizedMessage(1072515, Name ?? $"#{LabelNumber}"); // The ~1_name~ expired...
|
||||
|
||||
Effects.PlaySound(GetWorldLocation(), Map, 0x201);
|
||||
|
||||
Delete();
|
||||
}
|
||||
|
||||
public virtual void SendTimeRemainingMessage(Mobile to)
|
||||
{
|
||||
var remaining = Utility.Max(_expiration - Core.Now, TimeSpan.Zero);
|
||||
to.SendLocalizedMessage(
|
||||
1072516, // ~1_name~ will expire in ~2_val~ seconds!
|
||||
$"{Name ?? $"#{LabelNumber}"}\t{remaining.TotalSeconds:F0}"
|
||||
);
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
_timerToken.Cancel();
|
||||
base.OnDelete();
|
||||
}
|
||||
|
||||
public virtual void CheckExpiry()
|
||||
{
|
||||
if (_expiration - Core.Now <= TimeSpan.Zero)
|
||||
{
|
||||
CreationTime = Core.Now;
|
||||
LifeSpan = lifeSpan;
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5), CheckExpiry, out _timerToken);
|
||||
Expire(RootParent as Mobile);
|
||||
}
|
||||
|
||||
public TransientItem(Serial serial)
|
||||
: base(serial)
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public TimeSpan LifeSpan { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DateTime CreationTime { get; set; }
|
||||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public virtual TextDefinition InvalidTransferMessage => TextDefinition.Empty;
|
||||
|
||||
public override void HandleInvalidTransfer(Mobile from)
|
||||
{
|
||||
InvalidTransferMessage.SendMessageTo(from);
|
||||
|
||||
Delete();
|
||||
}
|
||||
|
||||
public virtual void Expire(Mobile parent)
|
||||
{
|
||||
parent?.SendLocalizedMessage(1072515, Name ?? $"#{LabelNumber}"); // The ~1_name~ expired...
|
||||
|
||||
Effects.PlaySound(GetWorldLocation(), Map, 0x201);
|
||||
|
||||
Delete();
|
||||
}
|
||||
|
||||
public virtual void SendTimeRemainingMessage(Mobile to)
|
||||
{
|
||||
to.SendLocalizedMessage(
|
||||
1072516, // ~1_name~ will expire in ~2_val~ seconds!
|
||||
$"{Name ?? $"#{LabelNumber}"}\t{LifeSpan.TotalSeconds:F0}"
|
||||
);
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
_timerToken.Cancel();
|
||||
base.OnDelete();
|
||||
}
|
||||
|
||||
public virtual void CheckExpiry()
|
||||
{
|
||||
if (CreationTime + LifeSpan < Core.Now)
|
||||
{
|
||||
Expire(RootParent as Mobile);
|
||||
}
|
||||
else
|
||||
{
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
var remaining = CreationTime + LifeSpan - Core.Now;
|
||||
|
||||
list.Add(1072517, $"{remaining.TotalSeconds:F0}"); // Lifespan: ~1_val~ seconds
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write(LifeSpan);
|
||||
writer.Write(CreationTime);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
var version = reader.ReadInt();
|
||||
|
||||
LifeSpan = reader.ReadTimeSpan();
|
||||
CreationTime = reader.ReadDateTime();
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5), CheckExpiry, out _timerToken);
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetExpiration(TimeSpan duration) => Expiration = Core.Now + duration;
|
||||
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
var remaining = Utility.Max(_expiration - Core.Now, TimeSpan.Zero);
|
||||
list.Add(1072517, $"{remaining.TotalSeconds:F0}"); // Lifespan: ~1_val~ seconds
|
||||
}
|
||||
|
||||
private void Deserialize(IGenericReader reader, int version)
|
||||
{
|
||||
var lifespan = reader.ReadTimeSpan();
|
||||
var creationTime = reader.ReadDateTime(); // CreationTime
|
||||
|
||||
_expiration = creationTime + lifespan;
|
||||
}
|
||||
|
||||
[AfterDeserialization]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5), CheckExpiry, out _timerToken);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,62 +1,48 @@
|
|||
namespace Server.Mobiles
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Mobiles;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class ArcaneFey : BaseCreature
|
||||
{
|
||||
public class ArcaneFey : BaseCreature
|
||||
[Constructible]
|
||||
public ArcaneFey() : base(AIType.AI_Mage, FightMode.Evil)
|
||||
{
|
||||
[Constructible]
|
||||
public ArcaneFey() : base(AIType.AI_Mage, FightMode.Evil)
|
||||
{
|
||||
Name = NameList.RandomName("pixie");
|
||||
Body = 128;
|
||||
BaseSoundID = 0x467;
|
||||
Name = NameList.RandomName("pixie");
|
||||
Body = 128;
|
||||
BaseSoundID = 0x467;
|
||||
|
||||
SetStr(20);
|
||||
SetDex(150);
|
||||
SetInt(125);
|
||||
SetStr(20);
|
||||
SetDex(150);
|
||||
SetInt(125);
|
||||
|
||||
SetDamage(9, 15);
|
||||
SetDamage(9, 15);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 80, 90);
|
||||
SetResistance(ResistanceType.Fire, 40, 50);
|
||||
SetResistance(ResistanceType.Cold, 40, 50);
|
||||
SetResistance(ResistanceType.Poison, 40, 50);
|
||||
SetResistance(ResistanceType.Energy, 40, 50);
|
||||
SetResistance(ResistanceType.Physical, 80, 90);
|
||||
SetResistance(ResistanceType.Fire, 40, 50);
|
||||
SetResistance(ResistanceType.Cold, 40, 50);
|
||||
SetResistance(ResistanceType.Poison, 40, 50);
|
||||
SetResistance(ResistanceType.Energy, 40, 50);
|
||||
|
||||
SetSkill(SkillName.EvalInt, 70.1, 80.0);
|
||||
SetSkill(SkillName.Magery, 70.1, 80.0);
|
||||
SetSkill(SkillName.Meditation, 70.1, 80.0);
|
||||
SetSkill(SkillName.MagicResist, 50.5, 100.0);
|
||||
SetSkill(SkillName.Tactics, 10.1, 20.0);
|
||||
SetSkill(SkillName.Wrestling, 10.1, 12.5);
|
||||
SetSkill(SkillName.EvalInt, 70.1, 80.0);
|
||||
SetSkill(SkillName.Magery, 70.1, 80.0);
|
||||
SetSkill(SkillName.Meditation, 70.1, 80.0);
|
||||
SetSkill(SkillName.MagicResist, 50.5, 100.0);
|
||||
SetSkill(SkillName.Tactics, 10.1, 20.0);
|
||||
SetSkill(SkillName.Wrestling, 10.1, 12.5);
|
||||
|
||||
Fame = 0;
|
||||
Karma = 0;
|
||||
Fame = 0;
|
||||
Karma = 0;
|
||||
|
||||
ControlSlots = 1;
|
||||
}
|
||||
|
||||
public ArcaneFey(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a pixie corpse";
|
||||
public override double DispelDifficulty => 70.0;
|
||||
public override double DispelFocus => 20.0;
|
||||
|
||||
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
||||
public override bool InitialInnocent => true;
|
||||
|
||||
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();
|
||||
}
|
||||
ControlSlots = 1;
|
||||
}
|
||||
|
||||
public override string CorpseName => "a pixie corpse";
|
||||
public override double DispelDifficulty => 70.0;
|
||||
public override double DispelFocus => 20.0;
|
||||
|
||||
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
||||
public override bool InitialInnocent => true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,63 +1,49 @@
|
|||
namespace Server.Mobiles
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Mobiles;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class ArcaneFiend : BaseCreature
|
||||
{
|
||||
public class ArcaneFiend : BaseCreature
|
||||
[Constructible]
|
||||
public ArcaneFiend() : base(AIType.AI_Mage)
|
||||
{
|
||||
[Constructible]
|
||||
public ArcaneFiend() : base(AIType.AI_Mage)
|
||||
{
|
||||
Body = 74;
|
||||
BaseSoundID = 422;
|
||||
Body = 74;
|
||||
BaseSoundID = 422;
|
||||
|
||||
SetStr(55);
|
||||
SetDex(40);
|
||||
SetInt(60);
|
||||
SetStr(55);
|
||||
SetDex(40);
|
||||
SetInt(60);
|
||||
|
||||
SetDamage(10, 14);
|
||||
SetDamage(10, 14);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 0);
|
||||
SetDamageType(ResistanceType.Fire, 50);
|
||||
SetDamageType(ResistanceType.Poison, 50);
|
||||
SetDamageType(ResistanceType.Physical, 0);
|
||||
SetDamageType(ResistanceType.Fire, 50);
|
||||
SetDamageType(ResistanceType.Poison, 50);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 25, 35);
|
||||
SetResistance(ResistanceType.Fire, 40, 50);
|
||||
SetResistance(ResistanceType.Cold, 20, 30);
|
||||
SetResistance(ResistanceType.Poison, 30, 40);
|
||||
SetResistance(ResistanceType.Energy, 30, 40);
|
||||
SetResistance(ResistanceType.Physical, 25, 35);
|
||||
SetResistance(ResistanceType.Fire, 40, 50);
|
||||
SetResistance(ResistanceType.Cold, 20, 30);
|
||||
SetResistance(ResistanceType.Poison, 30, 40);
|
||||
SetResistance(ResistanceType.Energy, 30, 40);
|
||||
|
||||
SetSkill(SkillName.EvalInt, 20.1, 30.0);
|
||||
SetSkill(SkillName.Magery, 60.1, 70.0);
|
||||
SetSkill(SkillName.MagicResist, 30.1, 50.0);
|
||||
SetSkill(SkillName.Tactics, 42.1, 50.0);
|
||||
SetSkill(SkillName.Wrestling, 40.1, 44.0);
|
||||
SetSkill(SkillName.EvalInt, 20.1, 30.0);
|
||||
SetSkill(SkillName.Magery, 60.1, 70.0);
|
||||
SetSkill(SkillName.MagicResist, 30.1, 50.0);
|
||||
SetSkill(SkillName.Tactics, 42.1, 50.0);
|
||||
SetSkill(SkillName.Wrestling, 40.1, 44.0);
|
||||
|
||||
Fame = 0;
|
||||
Karma = 0;
|
||||
Fame = 0;
|
||||
Karma = 0;
|
||||
|
||||
ControlSlots = 1;
|
||||
}
|
||||
|
||||
public ArcaneFiend(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "an imp corpse";
|
||||
public override double DispelDifficulty => 70.0;
|
||||
public override double DispelFocus => 20.0;
|
||||
|
||||
public override PackInstinct PackInstinct => PackInstinct.Daemon;
|
||||
public override bool BleedImmune => true; // TODO: Verify on OSI. Guide says this.
|
||||
public override string DefaultName => "an imp";
|
||||
|
||||
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();
|
||||
}
|
||||
ControlSlots = 1;
|
||||
}
|
||||
|
||||
public override string CorpseName => "an imp corpse";
|
||||
public override double DispelDifficulty => 70.0;
|
||||
public override double DispelFocus => 20.0;
|
||||
|
||||
public override PackInstinct PackInstinct => PackInstinct.Daemon;
|
||||
public override bool BleedImmune => true; // TODO: Verify on OSI. Guide says this.
|
||||
public override string DefaultName => "an imp";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,86 +1,74 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Mobiles
|
||||
namespace Server.Mobiles;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class NatureFury : BaseCreature
|
||||
{
|
||||
public class NatureFury : BaseCreature
|
||||
[Constructible]
|
||||
public NatureFury() : base(AIType.AI_Melee)
|
||||
{
|
||||
[Constructible]
|
||||
public NatureFury() : base(AIType.AI_Melee)
|
||||
Body = 0x33;
|
||||
Hue = 0x4001;
|
||||
|
||||
SetStr(150);
|
||||
SetDex(150);
|
||||
SetInt(100);
|
||||
|
||||
SetHits(80);
|
||||
SetStam(250);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(6, 8);
|
||||
|
||||
SetDamageType(ResistanceType.Poison, 100);
|
||||
SetDamageType(ResistanceType.Physical, 0);
|
||||
SetResistance(ResistanceType.Physical, 90);
|
||||
|
||||
SetSkill(SkillName.Wrestling, 90.0);
|
||||
SetSkill(SkillName.MagicResist, 70.0);
|
||||
SetSkill(SkillName.Tactics, 100.0);
|
||||
|
||||
Fame = 0;
|
||||
Karma = 0;
|
||||
|
||||
ControlSlots = 1;
|
||||
}
|
||||
|
||||
public override bool DeleteCorpseOnDeath => Core.AOS;
|
||||
public override bool IsHouseSummonable => true;
|
||||
|
||||
public override double DispelDifficulty => 125.0;
|
||||
public override double DispelFocus => 90.0;
|
||||
|
||||
public override bool BleedImmune => true;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
public override string DefaultName => "a nature's fury";
|
||||
|
||||
public override void MoveToWorld(Point3D loc, Map map)
|
||||
{
|
||||
base.MoveToWorld(loc, map);
|
||||
Timer.StartTimer(DoEffects);
|
||||
}
|
||||
|
||||
public void DoEffects()
|
||||
{
|
||||
FixedParticles(0x91C, 10, 180, 0x2543, 0, 0, EffectLayer.Waist);
|
||||
PlaySound(0xE);
|
||||
PlaySound(0x1BC);
|
||||
|
||||
if (Alive && !Deleted)
|
||||
{
|
||||
Body = 0x33;
|
||||
Hue = 0x4001;
|
||||
|
||||
SetStr(150);
|
||||
SetDex(150);
|
||||
SetInt(100);
|
||||
|
||||
SetHits(80);
|
||||
SetStam(250);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(6, 8);
|
||||
|
||||
SetDamageType(ResistanceType.Poison, 100);
|
||||
SetDamageType(ResistanceType.Physical, 0);
|
||||
SetResistance(ResistanceType.Physical, 90);
|
||||
|
||||
SetSkill(SkillName.Wrestling, 90.0);
|
||||
SetSkill(SkillName.MagicResist, 70.0);
|
||||
SetSkill(SkillName.Tactics, 100.0);
|
||||
|
||||
Fame = 0;
|
||||
Karma = 0;
|
||||
|
||||
ControlSlots = 1;
|
||||
}
|
||||
|
||||
public NatureFury(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DeleteCorpseOnDeath => Core.AOS;
|
||||
public override bool IsHouseSummonable => true;
|
||||
|
||||
public override double DispelDifficulty => 125.0;
|
||||
public override double DispelFocus => 90.0;
|
||||
|
||||
public override bool BleedImmune => true;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
public override string DefaultName => "a nature's fury";
|
||||
|
||||
public override void MoveToWorld(Point3D loc, Map map)
|
||||
{
|
||||
base.MoveToWorld(loc, map);
|
||||
Timer.StartTimer(DoEffects);
|
||||
}
|
||||
|
||||
public void DoEffects()
|
||||
{
|
||||
FixedParticles(0x91C, 10, 180, 0x2543, 0, 0, EffectLayer.Waist);
|
||||
PlaySound(0xE);
|
||||
PlaySound(0x1BC);
|
||||
|
||||
if (Alive && !Deleted)
|
||||
{
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(7.0), DoEffects);
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
Delete();
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(7.0), DoEffects);
|
||||
}
|
||||
}
|
||||
|
||||
[AfterDeserialization(false)]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue