View Single Post
  #13  
Old 10-15-2008, 01:05 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Shouldn't the "/ 100.0f" be dividing the total bonus by 100 already?

Code:
	ProcBonus += float(itembonuses.ProcChance + (spellbonuses.ProcChance / 10) + AABonus) / 100.0f;
So, if you get 35 from items, 102 from the spell bonus, and 25 from AAs, it should be 162, then divide by 100 and ProcBonus should be 1.62 which means that the spell bonus part of that should only be 1.02.

LOL, after looking at it again, I think I see what went wrong. It should have been this instead:

Code:
	ProcBonus += float(itembonuses.ProcChance + (spellbonuses.ProcChance / 10) + AABonus) / 100.0f;
	
	ProcChance = 0.05f + float(mydex) / 9000.0f;
	ProcBonus = (ProcChance * ProcBonus);
	ProcChance += ProcBonus;
	mlog(COMBAT__PROCS, "Proc chance %.2f (%.2f from bonuses)", ProcChance, ProcBonus);
	return ProcChance;

I had accidentally left the += in here instead of changing it to just = so it will make ProcBonus a percentage of ProcChance to add to ProcChance:
Code:
ProcBonus += (ProcChance * ProcBonus);
By using the +=, anything greater than a 100% ProcBonus would make ProcChance 100%, which is bad! It is supposed to just make it do 100% more damage, or basically the same as multiplying ProcChance by 200%. I will try this out and see how it goes.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 10-15-2008 at 09:08 AM..
Reply With Quote