fix: Hair and facial hair "teleporting" when mobile dies several times (#1901)
### Summary * Added World.NewVirtual for creating virtual serial numbers * Reserved range 0x7EEEEEEE to 0x7FFFFFFF for virtual serials * Hair and Facial hair (for mobiles) now use virtual serials instead of FakeSerial() functions * Consolidated virtual hair to a single `VirtualHairInfo` class. Corpse hair and facial hair now persists across save/load and hair and facial hair no longer teleport to newest corpse.
This commit is contained in:
parent
883d873c1c
commit
91e37fb8d4
15 changed files with 548 additions and 357 deletions
|
|
@ -51,17 +51,17 @@ public partial class SchmendrickApprenticeCorpse : Corpse
|
|||
new Spellbook()
|
||||
];
|
||||
|
||||
private static HairInfo GetHair()
|
||||
private static VirtualHairInfo GetHair()
|
||||
{
|
||||
_hairHue = Race.Human.RandomHairHue();
|
||||
return new HairInfo(Race.Human.RandomHair(false), _hairHue);
|
||||
return new VirtualHairInfo(Race.Human.RandomHair(false), _hairHue);
|
||||
}
|
||||
|
||||
private static FacialHairInfo GetFacialHair()
|
||||
private static VirtualHairInfo GetFacialHair()
|
||||
{
|
||||
_hairHue = Race.Human.RandomHairHue();
|
||||
|
||||
return new FacialHairInfo(Race.Human.RandomFacialHair(false), _hairHue);
|
||||
return new VirtualHairInfo(Race.Human.RandomFacialHair(false), _hairHue);
|
||||
}
|
||||
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public partial class MilitiaFighter : BaseCreature
|
|||
[SerializationGenerator(0, false)]
|
||||
public partial class MilitiaFighterCorpse : Corpse
|
||||
{
|
||||
public MilitiaFighterCorpse(Mobile owner, HairInfo hair, FacialHairInfo facialhair, List<Item> equipItems) : base(
|
||||
public MilitiaFighterCorpse(Mobile owner, VirtualHairInfo hair, VirtualHairInfo facialhair, List<Item> equipItems) : base(
|
||||
owner,
|
||||
hair,
|
||||
facialhair,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue