[Help]Class based caps

Basically I’ve long since known of the technique whereby you limit the dodge, parry etc caps by simply force setting them if they exceed a value.


if(value > 70)
value = 70;
SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value);

I’ve looked at this as a duct tape style of fix that really I would need to rectify in the future to make it more efficient, however my knowledge of the trinity core just isn’t up to scratch so here we are.

Basically, my thought process is rather than just saying “if dodge % > X then set dodge X” to instead say “if dodge % > & class = rogue” this way the forced cap could differ depending on the class.

Any help with the modification of StatSystem to implement this would be greatly appreciated, thank you.


Any help with this issue would be greatly appreciated.

if(value > 70 && getClass() == CLASS_ROGUE)
value = 70;
SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value);

You can check at the top what the function is called:

void Player::UpdateParryPercentage()
its a Player:: function, so it means that the player pointer is already initialized and you can call it with the getClass() or any function listed in player.h without having to do the usual player-> first.

hope it helps /emoticons/default_smile.png