Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #ifndef DISABLE_BONUS_LIMITER
  2. GetBonusLimit(type, val);
  3. #endif
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10. #ifndef DISABLE_BONUS_LIMITER
  11. void CHARACTER::GetBonusLimit(BYTE bType, int & iValue) const
  12. {
  13. struct {
  14. BYTE bBonusType;
  15. int iLimit;
  16. } limits[] = {
  17.  
  18. { APPLY_ATTBONUS_SURA, 30 },
  19. };
  20.  
  21. for (int i = 0; i < (sizeof(limits) / sizeof(limits[0])); ++i)
  22. {
  23. if (limits[i].bBonusType == bType)
  24. {
  25. iValue = (iValue > limits[i].iLimit ? limits[i].iLimit : iValue);
  26. return;
  27. }
  28. }
  29. }
  30. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement