Read item eq slots from the cache template
isTwoHanded, validForSlot, getSwingAnimation and the mob equipment set read getItemEqSlotsOr/And, which drop the exporter's NONE. Offline parity (p15c.py, 7586 rows): 0 differences once NONE is ignored. Value changes: - validForSlot: items whose only slot is NONE no longer pass for slot NONE. - getSwingAnimation: the 7 slotless weapons (Rock 19297, Arrow 25650, siege ammo 29000/29010/29020/29030/29350) return the default 75 instead of indexing their empty left-hand anim list. - MobBase equipment sets skip slotless items instead of keying them under NONE. No EQUIP booty entry references one (the 104 sets that do are ITEM booty sets). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
73947f3dc8
commit
5b3c511b55
3 files changed
+11
-7
No files matched your search
@@ -95,7 +95,7 @@ public enum ItemManager {
|
||||
if (!item.template.cacheTemplate.getItemType().equals(mbEnums.ItemType.WEAPON))
|
||||
return false;
|
||||
|
||||
return item.template.item_eq_slots_and.containsAll(EnumSet.of(mbEnums.EquipSlotType.LHELD, mbEnums.EquipSlotType.RHELD));
|
||||
return item.template.cacheTemplate.getItemEqSlotsAnd().containsAll(EnumSet.of(mbEnums.EquipSlotType.LHELD, mbEnums.EquipSlotType.RHELD));
|
||||
}
|
||||
|
||||
public static boolean isTwoHanded(ItemTemplate template) {
|
||||
@@ -103,7 +103,7 @@ public enum ItemManager {
|
||||
if (!template.cacheTemplate.getItemType().equals(mbEnums.ItemType.WEAPON))
|
||||
return false;
|
||||
|
||||
return template.item_eq_slots_and.containsAll(EnumSet.of(mbEnums.EquipSlotType.LHELD, mbEnums.EquipSlotType.RHELD));
|
||||
return template.cacheTemplate.getItemEqSlotsAnd().containsAll(EnumSet.of(mbEnums.EquipSlotType.LHELD, mbEnums.EquipSlotType.RHELD));
|
||||
}
|
||||
|
||||
public static boolean isShield(Item item) {
|
||||
@@ -130,7 +130,7 @@ public enum ItemManager {
|
||||
return false;
|
||||
//Item not valid for slot
|
||||
|
||||
if (item.template.item_eq_slots_or.contains(slot) == false)
|
||||
if (item.template.cacheTemplate.getItemEqSlotsOr().contains(slot) == false)
|
||||
return false;
|
||||
|
||||
// Slot is taken
|
||||
|
||||
Reference in new issue
Block a user