GsL Posted November 12, 2021 Posted November 12, 2021 Hello guys i need some help for limit at dyes for Classic Quote /** * Calculate Henna modifiers of this PlayerInstance. */ private void recalcHennaStats() { _hennaBaseStats.clear(); _hennaINT = 0; _hennaSTR = 0; _hennaCON = 0; _hennaMEN = 0; _hennaWIT = 0; _hennaDEX = 0; // _hennaLUC = 0; // _hennaCHA = 0; for (Henna henna : _henna) { if (henna == null) { continue; } _hennaINT += ((_hennaINT + henna.getStatINT()) > 5) ? 5 - _hennaINT : henna.getStatINT(); _hennaSTR += ((_hennaSTR + henna.getStatSTR()) > 5) ? 5 - _hennaSTR : henna.getStatSTR(); _hennaMEN += ((_hennaMEN + henna.getStatMEN()) > 5) ? 5 - _hennaMEN : henna.getStatMEN(); _hennaCON += ((_hennaCON + henna.getStatCON()) > 5) ? 5 - _hennaCON : henna.getStatCON(); _hennaWIT += ((_hennaWIT + henna.getStatWIT()) > 5) ? 5 - _hennaWIT : henna.getStatWIT(); _hennaDEX += ((_hennaDEX + henna.getStatDEX()) > 5) ? 5 - _hennaDEX : henna.getStatDEX(); // _hennaLUC += ((_hennaLUC + henna.getStatLUC()) > 5) ? 5 - _hennaLUC : henna.getStatLUC(); // _hennaCHA += ((_hennaCHA + henna.getStatCHA()) > 5) ? 5 - _hennaCHA : henna.getStatCHA(); for (Entry<BaseStats, Integer> entry : henna.getBaseStats().entrySet()) { _hennaBaseStats.merge(entry.getKey(), entry.getValue(), Integer::sum); } } } added this but dint work .. any idea?
0 GsL Posted November 12, 2021 Author Posted November 12, 2021 46 minutes ago, melron said: Whats the limit? Currently at classic there is no limit You can add wit +12 even with this code I wanna make it like c6 max +5
0 Zake Posted November 12, 2021 Posted November 12, 2021 9 minutes ago, GsL said: Currently at classic there is no limit You can add wit +12 even with this code I wanna make it like c6 max +5 Which classic pack is this? Is there any free source so that we can check this part of the code?
0 melron Posted November 12, 2021 Posted November 12, 2021 Check out how aCis is calculating hennas with Math.min private static final int MAX_HENNA_STAT_VALUE = 5; private void recalculateStats() { for (int i = 0; i < _stats.length; i++) _stats[i] = 0; for (Henna henna : _hennas) { if (henna != null) { _stats[0] += henna.getINT(); _stats[1] += henna.getSTR(); _stats[2] += henna.getCON(); _stats[3] += henna.getMEN(); _stats[4] += henna.getDEX(); _stats[5] += henna.getWIT(); } } for (int i = 0; i < _stats.length; i++) _stats[i] = Math.min(_stats[i], MAX_HENNA_STAT_VALUE); }
0 GsL Posted November 12, 2021 Author Posted November 12, 2021 4 minutes ago, Zake said: Which classic pack is this? Is there any free source so that we can check this part of the code? It's mobius I use etinas fate but it uses the same source of classic , isay classic in order to understand how it works Source mobius etinas fate I try to adapt from mobius hi 5 but dint work 4 minutes ago, melron said: Check out how aCis is calculating hennas with Math.min private static final int MAX_HENNA_STAT_VALUE = 5; private void recalculateStats() { for (int i = 0; i < _stats.length; i++) _stats[i] = 0; for (Henna henna : _hennas) { if (henna != null) { _stats[0] += henna.getINT(); _stats[1] += henna.getSTR(); _stats[2] += henna.getCON(); _stats[3] += henna.getMEN(); _stats[4] += henna.getDEX(); _stats[5] += henna.getWIT(); } } for (int i = 0; i < _stats.length; i++) _stats[i] = Math.min(_stats[i], MAX_HENNA_STAT_VALUE); } Won't work either They have change a lot the dye system at this protocol i fix it , thank for your time guys
0 Zake Posted November 16, 2021 Posted November 16, 2021 On 11/12/2021 at 4:16 PM, GsL said: i fix it , thank for your time guys Ok, topic locked.
Question
GsL
Hello guys i need some help for limit at dyes for Classic
added this but dint work .. any idea?
6 answers to this question
Recommended Posts