Read item skill requirements from the cache template

validForSkills, isShield, the guard attack rating and the NPC vendor skill
filter read getItemSkillReq. Offline parity (p15d.py, 7586 rows): 0
differences. No template lists "Cloth" in item_skill_req and none has more
than one entry, so file order vs HashMap order is moot.

Value changes: none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MagicBotandClaude Opus 5.5 committed 2026-10-19 14:28:32 -04:00
1 parent 5b3c511b55
commit 7abc63ffc3
3 files changed
+9 -9

No files matched your search

+5 -5
View File
@@ -71,12 +71,12 @@ public enum ItemManager {
CharacterSkill characterSkill;
if (item.template.item_skill_required.isEmpty())
if (item.template.cacheTemplate.getItemSkillReq().isEmpty())
return true;
for (String skillRequired : item.template.item_skill_required.keySet()) {
for (String skillRequired : item.template.cacheTemplate.getItemSkillReq().keySet()) {
int required_value = item.template.item_skill_required.get(skillRequired);
int required_value = item.template.cacheTemplate.getItemSkillReq().get(skillRequired);
characterSkill = skills.get(skillRequired);
if (characterSkill == null)
@@ -108,7 +108,7 @@ public enum ItemManager {
public static boolean isShield(Item item) {
if (item.template.item_skill_required.containsKey("Block"))
if (item.template.cacheTemplate.getItemSkillReq().containsKey("Block"))
return true;
return false;
@@ -116,7 +116,7 @@ public enum ItemManager {
public static boolean isShield(ItemTemplate template) {
if (template.item_skill_required.containsKey("Block"))
if (template.cacheTemplate.getItemSkillReq().containsKey("Block"))
return true;
return false;