… | |
… | |
1450 | } |
1450 | } |
1451 | |
1451 | |
1452 | if (QUERY_FLAG (op, FLAG_FRIENDLY) && op->type != PLAYER) |
1452 | if (QUERY_FLAG (op, FLAG_FRIENDLY) && op->type != PLAYER) |
1453 | { |
1453 | { |
1454 | remove_friendly_object (op); |
1454 | remove_friendly_object (op); |
|
|
1455 | |
1455 | if (get_owner (op) && op->owner->type == PLAYER && op->owner->contr->ranges[range_golem] == op) |
1456 | if (get_owner (op) && op->owner->type == PLAYER && op->owner->contr->ranges[range_golem] == op) |
1456 | { |
|
|
1457 | op->owner->contr->ranges[range_golem] = 0; |
1457 | op->owner->contr->ranges[range_golem] = 0; |
1458 | op->owner->contr->golem_count = 0; |
|
|
1459 | } |
|
|
1460 | |
1458 | |
1461 | remove_ob (op); |
1459 | remove_ob (op); |
1462 | free_object (op); |
1460 | free_object (op); |
1463 | return maxdam; |
1461 | return maxdam; |
1464 | } |
1462 | } |
… | |
… | |
1612 | |
1610 | |
1613 | if (!settings.simple_exp) |
1611 | if (!settings.simple_exp) |
1614 | exp = exp / 2; |
1612 | exp = exp / 2; |
1615 | |
1613 | |
1616 | if (owner->type != PLAYER || owner->contr->party == NULL) |
1614 | if (owner->type != PLAYER || owner->contr->party == NULL) |
1617 | { |
|
|
1618 | change_exp (owner, exp, skill, 0); |
1615 | change_exp (owner, exp, skill, 0); |
1619 | } |
|
|
1620 | else |
1616 | else |
1621 | { |
1617 | { |
1622 | int shares = 0, count = 0; |
1618 | int shares = 0, count = 0; |
1623 | player *pl; |
1619 | player *pl; |
1624 | partylist *party = owner->contr->party; |
1620 | partylist *party = owner->contr->party; |
… | |
… | |
1631 | { |
1627 | { |
1632 | count++; |
1628 | count++; |
1633 | shares += (pl->ob->level + 4); |
1629 | shares += (pl->ob->level + 4); |
1634 | } |
1630 | } |
1635 | |
1631 | |
1636 | if (count == 1 || shares > exp) |
1632 | if (count == 1 || shares > exp || !shares) |
1637 | change_exp (owner, exp, skill, SK_EXP_TOTAL); |
1633 | change_exp (owner, exp, skill, SK_EXP_TOTAL); |
1638 | else |
1634 | else |
1639 | { |
1635 | { |
1640 | int share = exp / shares, given = 0, nexp; |
1636 | int share = exp / shares, given = 0, nexp; |
1641 | |
1637 | |
… | |
… | |
1675 | } |
1671 | } |
1676 | else |
1672 | else |
1677 | { |
1673 | { |
1678 | /* Player has been killed! */ |
1674 | /* Player has been killed! */ |
1679 | if (owner->type == PLAYER) |
1675 | if (owner->type == PLAYER) |
1680 | snprintf (op->contr->killer, BIG_NAME, "%s the %s", &owner->name, owner->contr->title); |
1676 | snprintf (op->contr->killer, sizeof (op->contr->killer), "%s the %s", &owner->name, owner->contr->title); |
1681 | else |
1677 | else |
1682 | assign (op->contr->killer, hitter->name); |
1678 | assign (op->contr->killer, hitter->name); |
1683 | } |
1679 | } |
1684 | |
1680 | |
1685 | /* This was return -1 - that doesn't seem correct - if we return -1, process |
1681 | /* This was return -1 - that doesn't seem correct - if we return -1, process |