npcstats: add static getter for attack speed

This commit is contained in:
zeruth
2021-02-05 22:18:06 -05:00
parent a579bdb121
commit e08e16fa48

View File

@@ -207,6 +207,14 @@ public class NPCStats
}
};
public static int getAttackSpeed(int npcId)
{
if (statsMap != null)
if (statsMap.get(npcId) != null)
return statsMap.get(npcId).getAttackSpeed();
return -1;
}
public static void loadStats() throws IOException
{
try (JsonReader reader = new JsonReader(new InputStreamReader(NPCStats.class.getResourceAsStream("npc_stats.json"), StandardCharsets.UTF_8)))