Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef DISABLE_BONUS_LIMITER
- GetBonusLimit(type, val);
- #endif
- #ifndef DISABLE_BONUS_LIMITER
- void CHARACTER::GetBonusLimit(BYTE bType, int & iValue) const
- {
- struct {
- BYTE bBonusType;
- int iLimit;
- } limits[] = {
- { APPLY_ATTBONUS_SURA, 30 },
- };
- for (int i = 0; i < (sizeof(limits) / sizeof(limits[0])); ++i)
- {
- if (limits[i].bBonusType == bType)
- {
- iValue = (iValue > limits[i].iLimit ? limits[i].iLimit : iValue);
- return;
- }
- }
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement