Fix: Fixes evil mages so they look correct for T2A/UOTD (#735)
This commit is contained in:
parent
db59bf6dd0
commit
408a343e0c
4 changed files with 65 additions and 34 deletions
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Mobiles.EvilMage"
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Mobiles.EvilMageLord"
|
||||
}
|
||||
|
|
@ -2,14 +2,15 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class EvilMage : BaseCreature
|
||||
[Serializable(0, false)]
|
||||
public partial class EvilMage : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public EvilMage() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Name = NameList.RandomName("evil mage");
|
||||
Title = "the evil mage";
|
||||
Body = 124;
|
||||
Body = Core.UOR ? 124 : 0x190;
|
||||
|
||||
SetStr(81, 105);
|
||||
SetDex(91, 115);
|
||||
|
|
@ -37,12 +38,8 @@ namespace Server.Mobiles
|
|||
|
||||
VirtualArmor = 16;
|
||||
PackReg(6);
|
||||
PackItem(new Robe(Utility.RandomNeutralHue())); // TODO: Proper hue
|
||||
PackItem(new Sandals());
|
||||
}
|
||||
|
||||
public EvilMage(Serial serial) : base(serial)
|
||||
{
|
||||
EquipItem(new Robe(Utility.RandomNeutralHue()));
|
||||
EquipItem(new Sandals());
|
||||
}
|
||||
|
||||
public override string CorpseName => "an evil mage corpse";
|
||||
|
|
@ -58,16 +55,30 @@ namespace Server.Mobiles
|
|||
AddLoot(LootPack.MedScrolls);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
[AfterDeserialization]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
if (Core.UOR)
|
||||
{
|
||||
if (Body == 0x190)
|
||||
{
|
||||
Body = 124;
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
var version = reader.ReadInt();
|
||||
if (Hue != 0)
|
||||
{
|
||||
Hue = 0;
|
||||
}
|
||||
}
|
||||
else if (Body == 124)
|
||||
{
|
||||
Body = 0x190;
|
||||
|
||||
if (Hue == 0)
|
||||
{
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,16 +2,18 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class EvilMageLord : BaseCreature
|
||||
[Serializable(0, false)]
|
||||
public partial class EvilMageLord : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public EvilMageLord() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Name = NameList.RandomName("evil mage lord");
|
||||
Body = Utility.RandomList(125, 126);
|
||||
Body = Core.UOR ? Utility.Random(125, 2) : 0x190;
|
||||
Hue = Core.UOR ? 0 : Race.Human.RandomSkinHue();
|
||||
|
||||
PackItem(new Robe(Utility.RandomMetalHue()));
|
||||
PackItem(new WizardsHat(Utility.RandomMetalHue()));
|
||||
EquipItem(new Robe(Utility.RandomMetalHue()));
|
||||
EquipItem(new WizardsHat(Utility.RandomMetalHue()));
|
||||
|
||||
SetStr(81, 105);
|
||||
SetDex(191, 215);
|
||||
|
|
@ -43,18 +45,14 @@ namespace Server.Mobiles
|
|||
PackReg(23);
|
||||
if (Utility.RandomBool())
|
||||
{
|
||||
PackItem(new Shoes());
|
||||
EquipItem(new Shoes());
|
||||
}
|
||||
else
|
||||
{
|
||||
PackItem(new Sandals());
|
||||
EquipItem(new Sandals());
|
||||
}
|
||||
}
|
||||
|
||||
public EvilMageLord(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "an evil mage lord corpse";
|
||||
|
||||
public override bool CanRummageCorpses => true;
|
||||
|
|
@ -69,16 +67,30 @@ namespace Server.Mobiles
|
|||
AddLoot(LootPack.MedScrolls, 2);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
[AfterDeserialization]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
if (Core.UOR)
|
||||
{
|
||||
if (Body == 0x190)
|
||||
{
|
||||
Body = Utility.Random(125, 2);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
var version = reader.ReadInt();
|
||||
if (Hue != 0)
|
||||
{
|
||||
Hue = 0;
|
||||
}
|
||||
}
|
||||
else if (Body.BodyID is 125 or 126)
|
||||
{
|
||||
Body = 0x190;
|
||||
|
||||
if (Hue == 0)
|
||||
{
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue