hello I have a doubt I'm creating a configuration to limit casting speed for each class but if the value of a class is different from the other I have the value of the last configuration.
I created a loop to map all configuration:
int val = (int) calcStat(Stats.MAGIC_ATTACK_SPEED, base, null, null);
for (String className : Config.LIMIT_CASTING_SPEED.keySet())
{
if (Config.LIMIT_CASTING_SPEED.containsKey(_actor.getClassId().toString()) && val > Config.LIMIT_CASTING_SPEED.get(className))
val = Config.LIMIT_CASTING_SPEED.get(className);
}
Cardinal-1000;Arcana Lord-1300
let's say if the value is like this I get 1300 for all.
Question
DzStunk
hello I have a doubt I'm creating a configuration to limit casting speed for each class but if the value of a class is different from the other I have the value of the last configuration.
I created a loop to map all configuration:
int val = (int) calcStat(Stats.MAGIC_ATTACK_SPEED, base, null, null); for (String className : Config.LIMIT_CASTING_SPEED.keySet()) { if (Config.LIMIT_CASTING_SPEED.containsKey(_actor.getClassId().toString()) && val > Config.LIMIT_CASTING_SPEED.get(className)) val = Config.LIMIT_CASTING_SPEED.get(className); }Cardinal-1000;Arcana Lord-1300
let's say if the value is like this I get 1300 for all.
Fixed I used the java 17 documentation to understand a little about Maps Map (Java SE 17 & JDK 17) (oracle.com)
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now