… | |
… | |
1612 | |
1612 | |
1613 | if (!settings.simple_exp) |
1613 | if (!settings.simple_exp) |
1614 | exp = exp / 2; |
1614 | exp = exp / 2; |
1615 | |
1615 | |
1616 | if (owner->type != PLAYER || owner->contr->party == NULL) |
1616 | if (owner->type != PLAYER || owner->contr->party == NULL) |
1617 | { |
|
|
1618 | change_exp (owner, exp, skill, 0); |
1617 | change_exp (owner, exp, skill, 0); |
1619 | } |
|
|
1620 | else |
1618 | else |
1621 | { |
1619 | { |
1622 | int shares = 0, count = 0; |
1620 | int shares = 0, count = 0; |
1623 | player *pl; |
1621 | player *pl; |
1624 | partylist *party = owner->contr->party; |
1622 | partylist *party = owner->contr->party; |
… | |
… | |
1631 | { |
1629 | { |
1632 | count++; |
1630 | count++; |
1633 | shares += (pl->ob->level + 4); |
1631 | shares += (pl->ob->level + 4); |
1634 | } |
1632 | } |
1635 | |
1633 | |
1636 | if (count == 1 || shares > exp) |
1634 | if (count == 1 || shares > exp || !shares) |
1637 | change_exp (owner, exp, skill, SK_EXP_TOTAL); |
1635 | change_exp (owner, exp, skill, SK_EXP_TOTAL); |
1638 | else |
1636 | else |
1639 | { |
1637 | { |
1640 | int share = exp / shares, given = 0, nexp; |
1638 | int share = exp / shares, given = 0, nexp; |
1641 | |
1639 | |