… | |
… | |
590 | { |
590 | { |
591 | // This should not happen, but if it does, just merge the two. |
591 | // This should not happen, but if it does, just merge the two. |
592 | if (coin_objs [i]) |
592 | if (coin_objs [i]) |
593 | { |
593 | { |
594 | LOG (llevError, "%s has two money entries of (%s)\n", &pouch->name, coins[NUM_COINS - 1 - i]); |
594 | LOG (llevError, "%s has two money entries of (%s)\n", &pouch->name, coins[NUM_COINS - 1 - i]); |
595 | remove_ob (tmp); |
595 | tmp->remove (); |
596 | coin_objs[i]->nrof += tmp->nrof; |
596 | coin_objs[i]->nrof += tmp->nrof; |
597 | esrv_del_item (pl->contr, tmp->count); |
597 | esrv_del_item (pl->contr, tmp->count); |
598 | free_object (tmp); |
598 | tmp->destroy (0); |
599 | } |
599 | } |
600 | else |
600 | else |
601 | { |
601 | { |
602 | remove_ob (tmp); |
602 | tmp->remove (); |
603 | |
603 | |
604 | if (pouch->type == PLAYER) |
604 | if (pouch->type == PLAYER) |
605 | esrv_del_item (pl->contr, tmp->count); |
605 | esrv_del_item (pl->contr, tmp->count); |
606 | |
606 | |
607 | coin_objs[i] = tmp; |
607 | coin_objs[i] = tmp; |
… | |
… | |
666 | |
666 | |
667 | if (pl->type != PLAYER) |
667 | if (pl->type != PLAYER) |
668 | esrv_send_item (pl, pl); |
668 | esrv_send_item (pl, pl); |
669 | } |
669 | } |
670 | else |
670 | else |
671 | free_object (coin_objs[i]); |
671 | coin_objs[i]->destroy (0); |
672 | } |
672 | } |
673 | } |
673 | } |
674 | |
674 | |
675 | /* Checks all unpaid items in op's inventory, adds up all the money they |
675 | /* Checks all unpaid items in op's inventory, adds up all the money they |
676 | * have, and checks that they can actually afford what they want to buy. |
676 | * have, and checks that they can actually afford what they want to buy. |