Example #1
0
int32 Client::CalcWIS() {
	int32 val = m_pp.WIS + itembonuses.WIS + spellbonuses.WIS;

	int32 mod = aabonuses.WIS;

	WIS = val + mod;

	if(m_pp.intoxication)
	{
		int32 AlcWIS = WIS - (int32)((float)m_pp.intoxication / 200.0f * (float)WIS) - 1;

		if((AlcWIS < (int)(0.2 * WIS)))
			WIS = (int)(0.2f * (float)WIS);
		else
			WIS = AlcWIS;
	}

	if(WIS < 1)
		WIS = 1;

	int m = GetMaxWIS();
	if(WIS > m)
		WIS = m;

	return(WIS);
}
Example #2
0
int16 Client::CalcWIS() {
	int16 val = m_pp.WIS + itembonuses.WIS + spellbonuses.WIS;
	
	int16 mod = aabonuses.WIS;
	
	if(val>255 && GetLevel() <= 60)
		val = 255;
	WIS = val + mod;

	if(m_pp.intoxication)
	{
		int16 AlcWIS  = WIS - (int16)((float)m_pp.intoxication / 200.0f * (float)WIS) - 1;

		if((AlcWIS < (int)(0.2 * WIS)))
			WIS = (int)(0.2f * (float)WIS);
		else
			WIS = AlcWIS;
	}

	if(WIS < 1)
		WIS = 1;

	int m = GetMaxWIS();
	if(WIS > m)
		WIS = m;
	
	return(WIS);
}