Advertisement
Guest User

Untitled

a guest
Aug 7th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. void Player::ApplyRatingMod(CombatRating cr, int32 value, bool apply)
  2. {
  3. m_baseRatingValue[cr]+=(apply ? value : -value);
  4.  
  5. // explicit affected values
  6. switch (cr)
  7. {
  8. case CR_HASTE_MELEE:
  9. {
  10. float RatingChange = 2000 * GetRatingMultiplier(cr);
  11. ApplyAttackTimePercentMod(BASE_ATTACK, RatingChange, apply);
  12. ApplyAttackTimePercentMod(OFF_ATTACK, RatingChange, apply);
  13. break;
  14. }
  15. case CR_HASTE_RANGED:
  16. {
  17. float RatingChange = 2000 * GetRatingMultiplier(cr);
  18. ApplyAttackTimePercentMod(RANGED_ATTACK, RatingChange, apply);
  19. break;
  20. }
  21. case CR_HASTE_SPELL:
  22. {
  23. float RatingChange = 2000 * GetRatingMultiplier(cr);
  24. ApplyCastTimePercentMod(RatingChange, apply);
  25. break;
  26. }
  27. default:
  28. break;
  29. }
  30.  
  31. UpdateRating(cr);
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement