mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-19 05:57:42 +01:00
Do a bunch of refactoring regarding available application options.
This commit is contained in:
parent
f55d25b088
commit
68327d3563
12 changed files with 168 additions and 150 deletions
|
|
@ -31,7 +31,7 @@ public class AutoDesign
|
|||
public string Name(bool incognito)
|
||||
=> Revert ? RevertName : incognito ? Design!.Incognito : Design!.Name.Text;
|
||||
|
||||
public ref DesignData GetDesignData(ActorState state)
|
||||
public ref readonly DesignData GetDesignData(ActorState state)
|
||||
=> ref Design == null ? ref state.BaseData : ref Design.DesignData;
|
||||
|
||||
public bool Revert
|
||||
|
|
|
|||
|
|
@ -89,7 +89,8 @@ public class AutoDesignApplier : IDisposable
|
|||
{
|
||||
if (_jobChangeMainhand.TryGetValue(current.Type, out var data))
|
||||
{
|
||||
Glamourer.Log.Verbose($"Changing Mainhand from {_jobChangeState.ModelData.Weapon(EquipSlot.MainHand)} | {_jobChangeState.BaseData.Weapon(EquipSlot.MainHand)} to {data.Item1} for 0x{actor.Address:X}.");
|
||||
Glamourer.Log.Verbose(
|
||||
$"Changing Mainhand from {_jobChangeState.ModelData.Weapon(EquipSlot.MainHand)} | {_jobChangeState.BaseData.Weapon(EquipSlot.MainHand)} to {data.Item1} for 0x{actor.Address:X}.");
|
||||
_state.ChangeItem(_jobChangeState, EquipSlot.MainHand, data.Item1, data.Item2);
|
||||
weapon.Value = _jobChangeState.ModelData.Weapon(EquipSlot.MainHand);
|
||||
}
|
||||
|
|
@ -98,7 +99,8 @@ public class AutoDesignApplier : IDisposable
|
|||
{
|
||||
if (_jobChangeOffhand.TryGetValue(current.Type, out var data))
|
||||
{
|
||||
Glamourer.Log.Verbose($"Changing Offhand from {_jobChangeState.ModelData.Weapon(EquipSlot.OffHand)} | {_jobChangeState.BaseData.Weapon(EquipSlot.OffHand)} to {data.Item1} for 0x{actor.Address:X}.");
|
||||
Glamourer.Log.Verbose(
|
||||
$"Changing Offhand from {_jobChangeState.ModelData.Weapon(EquipSlot.OffHand)} | {_jobChangeState.BaseData.Weapon(EquipSlot.OffHand)} to {data.Item1} for 0x{actor.Address:X}.");
|
||||
_state.ChangeItem(_jobChangeState, EquipSlot.OffHand, data.Item1, data.Item2);
|
||||
weapon.Value = _jobChangeState.ModelData.Weapon(EquipSlot.OffHand);
|
||||
}
|
||||
|
|
@ -277,8 +279,8 @@ public class AutoDesignApplier : IDisposable
|
|||
if (design.ApplicationType is 0)
|
||||
continue;
|
||||
|
||||
ref var data = ref design.GetDesignData(state);
|
||||
var source = design.Revert ? StateChanged.Source.Game : StateChanged.Source.Fixed;
|
||||
ref readonly var data = ref design.GetDesignData(state);
|
||||
var source = design.Revert ? StateChanged.Source.Game : StateChanged.Source.Fixed;
|
||||
|
||||
if (!data.IsHuman)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue