From aad04182609d238e1a4a3d5805f1b385adc84e63 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 4 Apr 2024 15:18:43 -0400 Subject: [PATCH] Faster if bitvector is 0. --- src/engine/objects/ItemTemplate.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 84bbdb33..580e0b52 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -496,10 +496,14 @@ public class ItemTemplate { rune_fx_txt = (String) jsonObject.get("rune_fx_txt"); int group_tactics_bitvector = ((Long) jsonObject.get("rune_group_tactics")).intValue(); - rune_group_tactics.addAll(Enum.fromLong(group_tactics_bitvector, Enum.MobBehaviourType.class)); + + if (group_tactics_bitvector != 0) + rune_group_tactics.addAll(Enum.fromLong(group_tactics_bitvector, Enum.MobBehaviourType.class)); int group_role_bitvector = ((Long) jsonObject.get("rune_group_role_set")).intValue(); - rune_group_role_set.addAll(Enum.fromLong(group_role_bitvector, Enum.MobBehaviourType.class)); + + if (group_role_bitvector != 0) + rune_group_role_set.addAll(Enum.fromLong(group_role_bitvector, Enum.MobBehaviourType.class)); JSONArray enemy_types_json = (JSONArray) jsonObject.get("rune_enemy_monster_types");