This commit is contained in:
Ottermandias 2023-07-26 13:32:45 +02:00
parent a40b710d25
commit 89f2e78690
7 changed files with 43 additions and 24 deletions

View file

@ -122,6 +122,11 @@ public class StateEditor
if (!state.CanUnlock(key))
return false;
// Can not change weapon type from expected type in state.
if (slot is EquipSlot.MainHand && item.Type != state.BaseData.MainhandType
|| slot is EquipSlot.OffHand && item.Type != state.BaseData.MainhandType.ValidOffhand())
return false;
state.ModelData.SetItem(slot, item);
state[slot, false] = source;
return true;