mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-18 13:37:44 +01:00
Fix issues with shared weapon types.
This commit is contained in:
parent
b44a147fdd
commit
525f65e70a
6 changed files with 13 additions and 11 deletions
|
|
@ -24,11 +24,12 @@ public sealed class JobChangeState : IService
|
|||
public ActorIdentifier Identifier
|
||||
=> State?.Identifier ?? ActorIdentifier.Invalid;
|
||||
|
||||
public bool TryGetValue(FullEquipType slot, JobId jobId, out (EquipItem, StateSource) data)
|
||||
=> _weaponList.TryGet(slot, jobId, out data);
|
||||
public bool TryGetValue(FullEquipType slot, JobId jobId, bool gameStateAllowed, out (EquipItem, StateSource) data)
|
||||
=> _weaponList.TryGet(slot, jobId, gameStateAllowed, out data);
|
||||
|
||||
public void Set(ActorState state, IEnumerable<(EquipItem, StateSource, JobFlag)> items)
|
||||
{
|
||||
Reset();
|
||||
foreach (var (item, source, flags) in items.Where(p => p.Item1.Valid))
|
||||
_weaponList.TryAdd(item.Type, item, source, flags);
|
||||
State = state;
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ public class StateEditor(
|
|||
}
|
||||
|
||||
var currentType = state.BaseData.Item(weaponSlot).Type;
|
||||
if (mergedDesign.Weapons.TryGet(currentType, state.LastJob, out var weapon))
|
||||
if (mergedDesign.Weapons.TryGet(currentType, state.LastJob, true, out var weapon))
|
||||
{
|
||||
var source = settings.UseSingleSource ? settings.Source :
|
||||
weapon.Item2 is StateSource.Game ? StateSource.Game : settings.Source;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue