From 608324c5004fcd82d1205a60f07cce7c5420bd6e Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 11 Feb 2024 08:15:31 -0500 Subject: [PATCH] Updated rs constructor to use new enumset system. --- src/engine/objects/ItemBase.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/engine/objects/ItemBase.java b/src/engine/objects/ItemBase.java index f1879217..269c073d 100644 --- a/src/engine/objects/ItemBase.java +++ b/src/engine/objects/ItemBase.java @@ -126,7 +126,12 @@ public class ItemBase { this.minDamage = rs.getShort("minDamage"); this.maxDamage = rs.getShort("maxDamage"); + // Item restrictions and requirements + this.requiredRaces = DbManager.parseEnumSet(rs.getString("race_required"), Enum.MonsterType.class); + this.restrictedRaces = DbManager.parseEnumSet(rs.getString("race_restricted"), Enum.MonsterType.class); + this.requiredClasses = DbManager.parseEnumSet(rs.getString("class_required"), Enum.ClassType.class); + this.requiredDiscs = DbManager.parseEnumSet(rs.getString("disc_required"), Enum.DisciplineType.class); this.mastery = rs.getString("mastery"); damageType = DamageType.valueOf(rs.getString("damageType"));