Jump to content
  • 0

Add limit at dyes


Question

Posted

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?

6 answers to this question

Recommended Posts

  • 0
Posted
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
Posted
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
Posted

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
Posted
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

Guest
This topic is now closed to further replies.


×
×
  • Create New...