This commit is contained in:
Ottermandias 2024-11-17 14:27:14 +01:00
parent 2ce8076e9a
commit fe028e5ec7
9 changed files with 13 additions and 13 deletions

View file

@ -277,7 +277,7 @@ public sealed class AutoDesignApplier : IDisposable
}
forcedRedraw = false;
if (!_humans.IsHuman((uint)actor.AsCharacter->CharacterData.ModelCharaId))
if (!_humans.IsHuman((uint)actor.AsCharacter->ModelContainer.ModelCharaId))
return;
if (actor.IsTransformed)

View file

@ -166,7 +166,7 @@ internal class CustomizeSetFactory(
continue;
// Hair Row from CustomizeSheet might not be set in case of unlockable hair.
if (_customizeSheet.TryGetRow(customizeIdx, out var hairRow))
if (!_customizeSheet.TryGetRow(customizeIdx, out var hairRow))
hairList.Add(new CustomizeData(CustomizeIndex.Hairstyle, (CustomizeValue)i, customizeIdx));
else if (_icons.IconExists(hairRow.Icon))
hairList.Add(new CustomizeData(CustomizeIndex.Hairstyle, (CustomizeValue)hairRow.FeatureID, hairRow.Icon,

View file

@ -52,11 +52,11 @@ public unsafe class ModelEvaluationPanel(
ImGui.TableNextColumn();
if (actor.IsCharacter)
{
ImGui.TextUnformatted(actor.AsCharacter->CharacterData.ModelCharaId.ToString());
ImGui.TextUnformatted(actor.AsCharacter->ModelContainer.ModelCharaId.ToString());
if (actor.AsCharacter->CharacterData.TransformationId != 0)
ImGui.TextUnformatted($"Transformation Id: {actor.AsCharacter->CharacterData.TransformationId}");
if (actor.AsCharacter->CharacterData.ModelCharaId_2 != -1)
ImGui.TextUnformatted($"ModelChara2 {actor.AsCharacter->CharacterData.ModelCharaId_2}");
if (actor.AsCharacter->ModelContainer.ModelCharaId_2 != -1)
ImGui.TextUnformatted($"ModelChara2 {actor.AsCharacter->ModelContainer.ModelCharaId_2}");
ImGuiUtil.DrawTableColumn("Character Mode");
ImGuiUtil.DrawTableColumn($"{actor.AsCharacter->Mode}");

View file

@ -50,7 +50,7 @@ public unsafe class MetaService : IDisposable
// The function seems to not do anything if the head is 0, but also breaks for carbuncles turned human, sometimes?
var old = actor.AsCharacter->DrawData.Equipment(DrawDataContainer.EquipmentSlot.Head).Id;
if (old == 0 && actor.AsCharacter->CharacterData.ModelCharaId == 0)
if (old == 0 && actor.AsCharacter->ModelContainer.ModelCharaId == 0)
actor.AsCharacter->DrawData.Equipment(DrawDataContainer.EquipmentSlot.Head).Id = 1;
_hideHatGearHook.Original(&actor.AsCharacter->DrawData, 0, (byte)(value ? 0 : 1));
actor.AsCharacter->DrawData.Equipment(DrawDataContainer.EquipmentSlot.Head).Id = old;

View file

@ -19,7 +19,7 @@ public unsafe class ScalingService : IDisposable
_setupMountHook =
interop.HookFromAddress<SetupMount>((nint)MountContainer.MemberFunctionPointers.SetupMount, SetupMountDetour);
_calculateHeightHook =
interop.HookFromAddress<CalculateHeight>((nint)HeightContainer.MemberFunctionPointers.CalculateHeight, CalculateHeightDetour);
interop.HookFromAddress<CalculateHeight>((nint)Character.MemberFunctionPointers.CalculateHeight, CalculateHeightDetour);
_setupMountHook.Enable();
_updateOrnamentHook.Enable();

View file

@ -333,7 +333,7 @@ public unsafe class FunModule : IDisposable
=> actor.IsCharacter
&& actor.AsObject->ObjectKind is ObjectKind.Pc
&& !actor.IsTransformed
&& actor.AsCharacter->CharacterData.ModelCharaId == 0;
&& actor.AsCharacter->ModelContainer.ModelCharaId == 0;
private static void KeepOldArmor(Actor actor, EquipSlot slot, ref CharacterArmor armor)
=> armor = actor.Model.Valid ? actor.Model.GetArmor(slot) : armor;

View file

@ -593,7 +593,7 @@ public class StateListener : IDisposable
private unsafe UpdateState UpdateBaseData(Actor actor, ActorState state, uint modelId, nint customizeData, nint equipData)
{
// Model ID does not agree between game object and new draw object => Transformation.
if (modelId != (uint)actor.AsCharacter->CharacterData.ModelCharaId)
if (modelId != (uint)actor.AsCharacter->ModelContainer.ModelCharaId)
return UpdateState.Transformed;
// Model ID did not change to stored state.

View file

@ -114,14 +114,14 @@ public sealed class StateManager(
// Model ID is only unambiguously contained in the game object.
// The draw object only has the object type.
// TODO reverse search model data to get model id from model.
if (!_humans.IsHuman((uint)actor.AsCharacter->CharacterData.ModelCharaId))
if (!_humans.IsHuman((uint)actor.AsCharacter->ModelContainer.ModelCharaId))
{
ret.LoadNonHuman((uint)actor.AsCharacter->CharacterData.ModelCharaId, *(CustomizeArray*)&actor.AsCharacter->DrawData.CustomizeData,
ret.LoadNonHuman((uint)actor.AsCharacter->ModelContainer.ModelCharaId, *(CustomizeArray*)&actor.AsCharacter->DrawData.CustomizeData,
(nint)Unsafe.AsPointer(ref actor.AsCharacter->DrawData.EquipmentModelIds[0]));
return ret;
}
ret.ModelId = (uint)actor.AsCharacter->CharacterData.ModelCharaId;
ret.ModelId = (uint)actor.AsCharacter->ModelContainer.ModelCharaId;
ret.IsHuman = true;
CharacterWeapon main;

@ -1 +1 @@
Subproject commit 8ba88eff15326bb28ed5e6157f5252c114d40b5f
Subproject commit 95b8d177883b03f804d77434f45e9de97fdb9adf