mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-21 23:17:43 +01:00
Fix some NPC item stuff and add new version of design base64, backward and forward compatible.
This commit is contained in:
parent
795e3b6845
commit
a40b710d25
7 changed files with 162 additions and 80 deletions
|
|
@ -75,7 +75,7 @@ public class ItemManager : IDisposable
|
|||
return SmallClothesItem(slot);
|
||||
|
||||
if (!ItemService.AwaitedService.TryGetValue(itemId, slot, out var item))
|
||||
return new EquipItem(string.Intern($"Unknown #{itemId}"), itemId, 0, 0, 0, 0, 0);
|
||||
return EquipItem.FromId(itemId);
|
||||
|
||||
if (item.Type.ToSlot() != slot)
|
||||
return new EquipItem(string.Intern($"Invalid #{itemId}"), itemId, item.IconId, item.ModelId, item.WeaponType, item.Variant, 0);
|
||||
|
|
@ -89,7 +89,7 @@ public class ItemManager : IDisposable
|
|||
return NothingItem(type);
|
||||
|
||||
if (!ItemService.AwaitedService.TryGetValue(itemId, type is FullEquipType.Shield ? EquipSlot.MainHand : EquipSlot.OffHand, out var item))
|
||||
return new EquipItem(string.Intern($"Unknown #{itemId}"), itemId, 0, 0, 0, 0, 0);
|
||||
return EquipItem.FromId(itemId);
|
||||
|
||||
if (item.Type != type)
|
||||
return new EquipItem(string.Intern($"Invalid #{itemId}"), itemId, item.IconId, item.ModelId, item.WeaponType, item.Variant, 0);
|
||||
|
|
@ -111,7 +111,7 @@ public class ItemManager : IDisposable
|
|||
var item = IdentifierService.AwaitedService.Identify(id, variant, slot).FirstOrDefault();
|
||||
return item.Valid
|
||||
? item
|
||||
: new EquipItem($"Unknown ({id.Value}-{variant})", 0, 0, id, 0, variant, slot.ToEquipType());
|
||||
: EquipItem.FromIds(0, 0, id, 0, variant, slot.ToEquipType());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue