diff --git a/Anamnesis/Actor/Extensions/INpcBaseExtensions.cs b/Anamnesis/Actor/Extensions/INpcBaseExtensions.cs index 560656226..1305eae8f 100644 --- a/Anamnesis/Actor/Extensions/INpcBaseExtensions.cs +++ b/Anamnesis/Actor/Extensions/INpcBaseExtensions.cs @@ -152,24 +152,24 @@ private static CharacterFile ToFile(this INpcAppearance appearance) file.FacePaint = (byte)appearance.FacePaint; file.FacePaintColor = (byte)appearance.FacePaintColor; - file.MainHand = WeaponFromItem(appearance.MainHand, appearance.DyeMainHand); - file.OffHand = WeaponFromItem(appearance.OffHand, appearance.DyeOffHand, true); - - file.HeadGear = GearFromItem(appearance.Head, appearance.DyeHead); - file.Body = GearFromItem(appearance.Body, appearance.DyeBody); - file.Hands = GearFromItem(appearance.Hands, appearance.DyeHands); - file.Legs = GearFromItem(appearance.Legs, appearance.DyeLegs); - file.Feet = GearFromItem(appearance.Feet, appearance.DyeFeet); - file.Ears = GearFromItem(appearance.Ears, appearance.DyeEars); - file.Neck = GearFromItem(appearance.Neck, appearance.DyeNeck); - file.Wrists = GearFromItem(appearance.Wrists, appearance.DyeWrists); - file.LeftRing = GearFromItem(appearance.LeftRing, appearance.DyeLeftRing); - file.RightRing = GearFromItem(appearance.RightRing, appearance.DyeRightRing); + file.MainHand = WeaponFromItem(appearance.MainHand, appearance.DyeMainHand, appearance.Dye2MainHand); + file.OffHand = WeaponFromItem(appearance.OffHand, appearance.DyeOffHand, appearance.Dye2OffHand, true); + + file.HeadGear = GearFromItem(appearance.Head, appearance.DyeHead, appearance.Dye2Head); + file.Body = GearFromItem(appearance.Body, appearance.DyeBody, appearance.Dye2Body); + file.Hands = GearFromItem(appearance.Hands, appearance.DyeHands, appearance.Dye2Hands); + file.Legs = GearFromItem(appearance.Legs, appearance.DyeLegs, appearance.Dye2Legs); + file.Feet = GearFromItem(appearance.Feet, appearance.DyeFeet, appearance.Dye2Feet); + file.Ears = GearFromItem(appearance.Ears, appearance.DyeEars, appearance.Dye2Ears); + file.Neck = GearFromItem(appearance.Neck, appearance.DyeNeck, appearance.Dye2Neck); + file.Wrists = GearFromItem(appearance.Wrists, appearance.DyeWrists, appearance.Dye2Wrists); + file.LeftRing = GearFromItem(appearance.LeftRing, appearance.DyeLeftRing, appearance.Dye2LeftRing); + file.RightRing = GearFromItem(appearance.RightRing, appearance.DyeRightRing, appearance.Dye2RightRing); return file; } - private static CharacterFile.WeaponSave? WeaponFromItem(IItem? item, IDye? dye, bool isOffHand = false) + private static CharacterFile.WeaponSave? WeaponFromItem(IItem? item, IDye? dye, IDye? dye2, bool isOffHand = false) { if (item == null) return null; @@ -191,11 +191,13 @@ private static CharacterFile ToFile(this INpcAppearance appearance) if (dye != null) save.DyeId = dye.Id; + if (dye2 != null) + save.DyeId2 = dye2.Id; return save; } - private static CharacterFile.ItemSave? GearFromItem(IItem? item, IDye? dye) + private static CharacterFile.ItemSave? GearFromItem(IItem? item, IDye? dye, IDye? dye2) { if (item == null) return null; @@ -207,6 +209,8 @@ private static CharacterFile ToFile(this INpcAppearance appearance) if (dye != null) save.DyeId = dye.Id; + if (dye2 != null) + save.DyeId2 = dye2.Id; return save; } diff --git a/Anamnesis/GameData/Excel/BattleNpc.cs b/Anamnesis/GameData/Excel/BattleNpc.cs index c2f7a10b9..ef96729a7 100644 --- a/Anamnesis/GameData/Excel/BattleNpc.cs +++ b/Anamnesis/GameData/Excel/BattleNpc.cs @@ -107,28 +107,40 @@ public BattleNpcAppearance(BattleNpc npc) { this.MainHand = LuminaExtensions.GetWeaponItem(ItemSlots.MainHand, npcEquip.ModelMainHand); this.DyeMainHand = GameDataService.Dyes.Get(npcEquip.DyeMainHand.Row); + this.Dye2MainHand = GameDataService.Dyes.Get(npcEquip.Dye2MainHand.Row); this.OffHand = LuminaExtensions.GetWeaponItem(ItemSlots.OffHand, npcEquip.ModelOffHand); this.DyeOffHand = GameDataService.Dyes.Get(npcEquip.DyeOffHand.Row); + this.Dye2OffHand = GameDataService.Dyes.Get(npcEquip.Dye2OffHand.Row); this.Head = LuminaExtensions.GetGearItem(ItemSlots.Head, npcEquip.ModelHead); this.DyeHead = GameDataService.Dyes.Get(npcEquip.DyeHead.Row); + this.Dye2Head = GameDataService.Dyes.Get(npcEquip.Dye2Head.Row); this.Body = LuminaExtensions.GetGearItem(ItemSlots.Body, npcEquip.ModelBody); this.DyeBody = GameDataService.Dyes.Get(npcEquip.DyeBody.Row); + this.Dye2Body = GameDataService.Dyes.Get(npcEquip.Dye2Body.Row); this.Hands = LuminaExtensions.GetGearItem(ItemSlots.Hands, npcEquip.ModelHead); this.DyeHands = GameDataService.Dyes.Get(npcEquip.DyeHands.Row); + this.Dye2Hands = GameDataService.Dyes.Get(npcEquip.Dye2Hands.Row); this.Legs = LuminaExtensions.GetGearItem(ItemSlots.Legs, npcEquip.ModelLegs); this.DyeLegs = GameDataService.Dyes.Get(npcEquip.DyeLegs.Row); + this.Dye2Legs = GameDataService.Dyes.Get(npcEquip.Dye2Legs.Row); this.Feet = LuminaExtensions.GetGearItem(ItemSlots.Feet, npcEquip.ModelFeet); this.DyeFeet = GameDataService.Dyes.Get(npcEquip.DyeFeet.Row); + this.Dye2Feet = GameDataService.Dyes.Get(npcEquip.Dye2Feet.Row); this.Ears = LuminaExtensions.GetGearItem(ItemSlots.Ears, npcEquip.ModelEars); this.DyeEars = GameDataService.Dyes.Get(npcEquip.DyeEars.Row); + this.Dye2Ears = GameDataService.Dyes.Get(npcEquip.Dye2Ears.Row); this.Neck = LuminaExtensions.GetGearItem(ItemSlots.Neck, npcEquip.ModelNeck); this.DyeNeck = GameDataService.Dyes.Get(npcEquip.DyeNeck.Row); + this.Dye2Neck = GameDataService.Dyes.Get(npcEquip.Dye2Neck.Row); this.Wrists = LuminaExtensions.GetGearItem(ItemSlots.Wrists, npcEquip.ModelWrists); this.DyeWrists = GameDataService.Dyes.Get(npcEquip.DyeWrists.Row); + this.Dye2Wrists = GameDataService.Dyes.Get(npcEquip.Dye2Wrists.Row); this.LeftRing = LuminaExtensions.GetGearItem(ItemSlots.LeftRing, npcEquip.ModelLeftRing); this.DyeLeftRing = GameDataService.Dyes.Get(npcEquip.DyeLeftRing.Row); + this.Dye2LeftRing = GameDataService.Dyes.Get(npcEquip.Dye2LeftRing.Row); this.RightRing = LuminaExtensions.GetGearItem(ItemSlots.RightRing, npcEquip.ModelRightRing); this.DyeRightRing = GameDataService.Dyes.Get(npcEquip.DyeRightRing.Row); + this.Dye2RightRing = GameDataService.Dyes.Get(npcEquip.Dye2RightRing.Row); } } @@ -163,27 +175,39 @@ public BattleNpcAppearance(BattleNpc npc) public IItem? MainHand { get; private set; } public IDye? DyeMainHand { get; private set; } + public IDye? Dye2MainHand { get; private set; } public IItem? OffHand { get; private set; } public IDye? DyeOffHand { get; private set; } + public IDye? Dye2OffHand { get; private set; } public IItem? Head { get; private set; } public IDye? DyeHead { get; private set; } + public IDye? Dye2Head { get; private set; } public IItem? Body { get; private set; } public IDye? DyeBody { get; private set; } + public IDye? Dye2Body { get; private set; } public IItem? Legs { get; private set; } public IDye? DyeLegs { get; private set; } + public IDye? Dye2Legs { get; private set; } public IItem? Feet { get; private set; } public IDye? DyeFeet { get; private set; } + public IDye? Dye2Feet { get; private set; } public IItem? Hands { get; private set; } public IDye? DyeHands { get; private set; } + public IDye? Dye2Hands { get; private set; } public IItem? Wrists { get; private set; } public IDye? DyeWrists { get; private set; } + public IDye? Dye2Wrists { get; private set; } public IItem? Neck { get; private set; } public IDye? DyeNeck { get; private set; } + public IDye? Dye2Neck { get; private set; } public IItem? Ears { get; private set; } public IDye? DyeEars { get; private set; } + public IDye? Dye2Ears { get; private set; } public IItem? LeftRing { get; private set; } public IDye? DyeLeftRing { get; private set; } + public IDye? Dye2LeftRing { get; private set; } public IItem? RightRing { get; private set; } public IDye? DyeRightRing { get; private set; } + public IDye? Dye2RightRing { get; private set; } } } diff --git a/Anamnesis/GameData/Excel/Companion.cs b/Anamnesis/GameData/Excel/Companion.cs index c635f4585..e20c0dc3d 100644 --- a/Anamnesis/GameData/Excel/Companion.cs +++ b/Anamnesis/GameData/Excel/Companion.cs @@ -111,5 +111,17 @@ public CompanionAppearance(Companion companion) public IDye DyeLeftRing => DyeUtility.NoneDye; public IItem RightRing => ItemUtility.NoneItem; public IDye DyeRightRing => DyeUtility.NoneDye; + public IDye Dye2MainHand => DyeUtility.NoneDye; + public IDye Dye2OffHand => DyeUtility.NoneDye; + public IDye Dye2Head => DyeUtility.NoneDye; + public IDye Dye2Body => DyeUtility.NoneDye; + public IDye Dye2Legs => DyeUtility.NoneDye; + public IDye Dye2Feet => DyeUtility.NoneDye; + public IDye Dye2Hands => DyeUtility.NoneDye; + public IDye Dye2Wrists => DyeUtility.NoneDye; + public IDye Dye2Neck => DyeUtility.NoneDye; + public IDye Dye2Ears => DyeUtility.NoneDye; + public IDye Dye2LeftRing => DyeUtility.NoneDye; + public IDye Dye2RightRing => DyeUtility.NoneDye; } } diff --git a/Anamnesis/GameData/Excel/EventNpcAppearance.cs b/Anamnesis/GameData/Excel/EventNpcAppearance.cs index 997f41727..7d170f961 100644 --- a/Anamnesis/GameData/Excel/EventNpcAppearance.cs +++ b/Anamnesis/GameData/Excel/EventNpcAppearance.cs @@ -10,7 +10,7 @@ namespace Anamnesis.GameData.Excel; using ExcelRow = Anamnesis.GameData.Sheets.ExcelRow; -[Sheet("ENpcBase", 0x927347d8)] +[Sheet("ENpcBase", 0x464052cd)] public class EventNpcAppearance : ExcelRow, INpcAppearance { public uint ModelCharaRow { get; private set; } @@ -44,28 +44,40 @@ public class EventNpcAppearance : ExcelRow, INpcAppearance public IItem? MainHand { get; private set; } public IDye? DyeMainHand { get; private set; } + public IDye? Dye2MainHand { get; private set; } public IItem? OffHand { get; private set; } public IDye? DyeOffHand { get; private set; } + public IDye? Dye2OffHand { get; private set; } public IItem? Head { get; private set; } public IDye? DyeHead { get; private set; } + public IDye? Dye2Head { get; private set; } public IItem? Body { get; private set; } public IDye? DyeBody { get; private set; } + public IDye? Dye2Body { get; private set; } + public IItem? Hands { get; private set; } + public IDye? DyeHands { get; private set; } + public IDye? Dye2Hands { get; private set; } public IItem? Legs { get; private set; } public IDye? DyeLegs { get; private set; } + public IDye? Dye2Legs { get; private set; } public IItem? Feet { get; private set; } public IDye? DyeFeet { get; private set; } - public IItem? Hands { get; private set; } - public IDye? DyeHands { get; private set; } - public IItem? Wrists { get; private set; } - public IDye? DyeWrists { get; private set; } - public IItem? Neck { get; private set; } - public IDye? DyeNeck { get; private set; } + public IDye? Dye2Feet { get; private set; } public IItem? Ears { get; private set; } public IDye? DyeEars { get; private set; } + public IDye? Dye2Ears { get; private set; } + public IItem? Neck { get; private set; } + public IDye? DyeNeck { get; private set; } + public IDye? Dye2Neck { get; private set; } + public IItem? Wrists { get; private set; } + public IDye? DyeWrists { get; private set; } + public IDye? Dye2Wrists { get; private set; } public IItem? LeftRing { get; private set; } public IDye? DyeLeftRing { get; private set; } + public IDye? Dye2LeftRing { get; private set; } public IItem? RightRing { get; private set; } public IDye? DyeRightRing { get; private set; } + public IDye? Dye2RightRing { get; private set; } public override void PopulateData(RowParser parser, GameData gameData, Language language) { @@ -109,28 +121,40 @@ public override void PopulateData(RowParser parser, GameData gameData, Language this.MainHand = LuminaExtensions.GetWeaponItem(ItemSlots.MainHand, parser.ReadColumn(65)); this.DyeMainHand = parser.ReadRowReference(66); - this.OffHand = LuminaExtensions.GetWeaponItem(ItemSlots.OffHand, parser.ReadColumn(67)); - this.DyeOffHand = parser.ReadRowReference(68); - this.Head = this.GetItem(ItemSlots.Head, parser.ReadColumn(69), npcEquip?.ModelHead); - this.DyeHead = parser.ReadRowReference(70); - this.Body = this.GetItem(ItemSlots.Body, parser.ReadColumn(72), npcEquip?.ModelBody); - this.DyeBody = parser.ReadRowReference(73); - this.Hands = this.GetItem(ItemSlots.Hands, parser.ReadColumn(74), npcEquip?.ModelHands); - this.DyeHands = parser.ReadRowReference(75); - this.Legs = this.GetItem(ItemSlots.Legs, parser.ReadColumn(76), npcEquip?.ModelLegs); - this.DyeLegs = parser.ReadRowReference(77); - this.Feet = this.GetItem(ItemSlots.Feet, parser.ReadColumn(78), npcEquip?.ModelFeet); - this.DyeFeet = parser.ReadRowReference(79); - this.Ears = this.GetItem(ItemSlots.Ears, parser.ReadColumn(80), npcEquip?.ModelEars); - this.DyeEars = parser.ReadRowReference(81); - this.Neck = this.GetItem(ItemSlots.Neck, parser.ReadColumn(82), npcEquip?.ModelNeck); - this.DyeNeck = parser.ReadRowReference(83); - this.Wrists = this.GetItem(ItemSlots.Wrists, parser.ReadColumn(84), npcEquip?.ModelWrists); - this.DyeWrists = parser.ReadRowReference(85); - this.LeftRing = this.GetItem(ItemSlots.LeftRing, parser.ReadColumn(86), npcEquip?.ModelLeftRing); - this.DyeLeftRing = parser.ReadRowReference(87); - this.RightRing = this.GetItem(ItemSlots.RightRing, parser.ReadColumn(88), npcEquip?.ModelRightRing); - this.DyeRightRing = parser.ReadRowReference(89); + this.Dye2MainHand = parser.ReadRowReference(67); + this.OffHand = LuminaExtensions.GetWeaponItem(ItemSlots.OffHand, parser.ReadColumn(68)); + this.DyeOffHand = parser.ReadRowReference(69); + this.Dye2OffHand = parser.ReadRowReference(70); + this.Head = this.GetItem(ItemSlots.Head, parser.ReadColumn(71), npcEquip?.ModelHead); + this.DyeHead = parser.ReadRowReference(72); + this.Dye2Head = parser.ReadRowReference(73); + this.Body = this.GetItem(ItemSlots.Body, parser.ReadColumn(75), npcEquip?.ModelBody); + this.DyeBody = parser.ReadRowReference(76); + this.Dye2Body = parser.ReadRowReference(77); + this.Hands = this.GetItem(ItemSlots.Hands, parser.ReadColumn(78), npcEquip?.ModelHands); + this.DyeHands = parser.ReadRowReference(79); + this.Dye2Hands = parser.ReadRowReference(80); + this.Legs = this.GetItem(ItemSlots.Legs, parser.ReadColumn(81), npcEquip?.ModelLegs); + this.DyeLegs = parser.ReadRowReference(82); + this.Dye2Legs = parser.ReadRowReference(83); + this.Feet = this.GetItem(ItemSlots.Feet, parser.ReadColumn(84), npcEquip?.ModelFeet); + this.DyeFeet = parser.ReadRowReference(85); + this.Dye2Feet = parser.ReadRowReference(86); + this.Ears = this.GetItem(ItemSlots.Ears, parser.ReadColumn(87), npcEquip?.ModelEars); + this.DyeEars = parser.ReadRowReference(88); + this.Dye2Ears = parser.ReadRowReference(89); + this.Neck = this.GetItem(ItemSlots.Neck, parser.ReadColumn(90), npcEquip?.ModelNeck); + this.DyeNeck = parser.ReadRowReference(91); + this.Dye2Neck = parser.ReadRowReference(92); + this.Wrists = this.GetItem(ItemSlots.Wrists, parser.ReadColumn(93), npcEquip?.ModelWrists); + this.DyeWrists = parser.ReadRowReference(94); + this.Dye2Wrists = parser.ReadRowReference(95); + this.LeftRing = this.GetItem(ItemSlots.LeftRing, parser.ReadColumn(96), npcEquip?.ModelLeftRing); + this.DyeLeftRing = parser.ReadRowReference(97); + this.Dye2LeftRing = parser.ReadRowReference(98); + this.RightRing = this.GetItem(ItemSlots.RightRing, parser.ReadColumn(99), npcEquip?.ModelRightRing); + this.DyeRightRing = parser.ReadRowReference(100); + this.Dye2RightRing = parser.ReadRowReference(101); } protected IItem GetItem(ItemSlots slot, uint baseVal, uint? equipVal) diff --git a/Anamnesis/GameData/Excel/Mount.cs b/Anamnesis/GameData/Excel/Mount.cs index 0df450728..a0d4d6376 100644 --- a/Anamnesis/GameData/Excel/Mount.cs +++ b/Anamnesis/GameData/Excel/Mount.cs @@ -129,5 +129,17 @@ public MountAppearance(Mount mount) public IDye DyeLeftRing => DyeUtility.NoneDye; public IItem RightRing => ItemUtility.NoneItem; public IDye DyeRightRing => DyeUtility.NoneDye; + public IDye Dye2MainHand => DyeUtility.NoneDye; + public IDye Dye2OffHand => DyeUtility.NoneDye; + public IDye Dye2Head => DyeUtility.NoneDye; + public IDye Dye2Body => DyeUtility.NoneDye; + public IDye Dye2Legs => DyeUtility.NoneDye; + public IDye Dye2Feet => DyeUtility.NoneDye; + public IDye Dye2Hands => DyeUtility.NoneDye; + public IDye Dye2Wrists => DyeUtility.NoneDye; + public IDye Dye2Neck => DyeUtility.NoneDye; + public IDye Dye2Ears => DyeUtility.NoneDye; + public IDye Dye2LeftRing => DyeUtility.NoneDye; + public IDye Dye2RightRing => DyeUtility.NoneDye; } } diff --git a/Anamnesis/GameData/Excel/Ornament.cs b/Anamnesis/GameData/Excel/Ornament.cs index 3c0aa6134..862c289ac 100644 --- a/Anamnesis/GameData/Excel/Ornament.cs +++ b/Anamnesis/GameData/Excel/Ornament.cs @@ -113,5 +113,17 @@ public OrnamentAppearance(Ornament ornament) public IDye DyeLeftRing => DyeUtility.NoneDye; public IItem RightRing => ItemUtility.NoneItem; public IDye DyeRightRing => DyeUtility.NoneDye; + public IDye Dye2MainHand => DyeUtility.NoneDye; + public IDye Dye2OffHand => DyeUtility.NoneDye; + public IDye Dye2Head => DyeUtility.NoneDye; + public IDye Dye2Body => DyeUtility.NoneDye; + public IDye Dye2Legs => DyeUtility.NoneDye; + public IDye Dye2Feet => DyeUtility.NoneDye; + public IDye Dye2Hands => DyeUtility.NoneDye; + public IDye Dye2Wrists => DyeUtility.NoneDye; + public IDye Dye2Neck => DyeUtility.NoneDye; + public IDye Dye2Ears => DyeUtility.NoneDye; + public IDye Dye2LeftRing => DyeUtility.NoneDye; + public IDye Dye2RightRing => DyeUtility.NoneDye; } } diff --git a/Anamnesis/GameData/Interfaces/INpcBase.cs b/Anamnesis/GameData/Interfaces/INpcBase.cs index c1b396749..d28de641e 100644 --- a/Anamnesis/GameData/Interfaces/INpcBase.cs +++ b/Anamnesis/GameData/Interfaces/INpcBase.cs @@ -54,26 +54,38 @@ public interface INpcAppearance IItem? MainHand { get; } IDye? DyeMainHand { get; } + IDye? Dye2MainHand { get; } IItem? OffHand { get; } IDye? DyeOffHand { get; } + IDye? Dye2OffHand { get; } IItem? Head { get; } IDye? DyeHead { get; } + IDye? Dye2Head { get; } IItem? Body { get; } IDye? DyeBody { get; } + IDye? Dye2Body { get; } IItem? Legs { get; } IDye? DyeLegs { get; } + IDye? Dye2Legs { get; } IItem? Feet { get; } IDye? DyeFeet { get; } + IDye? Dye2Feet { get; } IItem? Hands { get; } IDye? DyeHands { get; } + IDye? Dye2Hands { get; } IItem? Wrists { get; } IDye? DyeWrists { get; } + IDye? Dye2Wrists { get; } IItem? Neck { get; } IDye? DyeNeck { get; } + IDye? Dye2Neck { get; } IItem? Ears { get; } IDye? DyeEars { get; } + IDye? Dye2Ears { get; } IItem? LeftRing { get; } IDye? DyeLeftRing { get; } + IDye? Dye2LeftRing { get; } IItem? RightRing { get; } IDye? DyeRightRing { get; } + IDye? Dye2RightRing { get; } }