Fix exception when giving all materials

This commit is contained in:
Melledy committed 2026-01-02 03:32:50 -08:00
1 parent 9f8fd4464b
commit f949f3b619
3 files changed
+46 -44

No files matched your search

@@ -45,7 +45,7 @@ public class GiveAllCommand implements CommandHandler {
// Check sub type
for (ItemDef data : GameData.getItemDataTable()) {
if (!MATERIAL_ITEM_SUBTYPES.contains(data.getItemSubType())) {
if (data.getItemSubType() == null || !MATERIAL_ITEM_SUBTYPES.contains(data.getItemSubType())) {
continue;
}
@@ -5,36 +5,38 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import lombok.Getter;
public enum ItemSubType {
Res (1),
Item (2),
Char (3),
Energy (4),
WorldRankExp (5),
CharShard (6),
Disc (8),
TalentStrengthen (9),
DiscStrengthen (12),
DiscPromote (13),
TreasureBox (17),
GearTreasureBox (18),
SubNoteSkill (19),
SkillStrengthen (24),
CharacterLimitBreak (25),
MonthlyCard (30),
EnergyItem (31),
ComCYO (32),
OutfitCYO (33),
RandomPackage (34),
Equipment (35),
FateCard (37),
EquipmentExp (38),
DiscLimitBreak (40),
Potential (41),
SpecificPotential (42),
Honor (43),
CharacterYO (44),
PlayHead (45),
CharacterSkin (46);
Res (1),
Item (2),
Char (3),
Energy (4),
WorldRankExp (5),
CharShard (6),
Disc (8),
TalentStrengthen (9),
DiscStrengthen (12),
DiscPromote (13),
TreasureBox (17),
GearTreasureBox (18),
SubNoteSkill (19),
SkillStrengthen (24),
CharacterLimitBreak (25),
MonthlyCard (30),
EnergyItem (31),
ComCYO (32),
OutfitCYO (33),
RandomPackage (34),
Equipment (35),
FateCard (37),
EquipmentExp (38),
DiscLimitBreak (40),
Potential (41),
SpecificPotential (42),
Honor (43),
CharacterYO (44),
PlayHead (45),
CharacterSkin (46),
SouvenirEnergyItem (47),
Build (48);
@Getter
private final int value;
@@ -5,19 +5,19 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import lombok.Getter;
public enum ItemType {
Res (1),
Item (2),
Char (3),
Energy (4),
WorldRankExp (5),
RogueItem (6),
Disc (7),
Equipment (9),
CharacterSkin (10),
MonthlyCard (11),
Title (12),
Honor (13),
HeadItem (14);
Res (1),
Item (2),
Char (3),
Energy (4),
WorldRankExp (5),
RogueItem (6),
Disc (7),
Equipment (9),
CharacterSkin (10),
MonthlyCard (11),
Title (12),
Honor (13),
HeadItem (14);
@Getter
private final int value;