… | |
… | |
593 | command_kill_pets (object *op, char *params) |
593 | command_kill_pets (object *op, char *params) |
594 | { |
594 | { |
595 | objectlink *obl, *next; |
595 | objectlink *obl, *next; |
596 | int counter = 0, removecount = 0; |
596 | int counter = 0, removecount = 0; |
597 | |
597 | |
598 | if (params == NULL) |
598 | if (!params) |
599 | { |
599 | { |
600 | terminate_all_pets (op); |
600 | terminate_all_pets (op); |
601 | new_draw_info (NDI_UNIQUE, 0, op, "Your pets have been killed."); |
601 | new_draw_info (NDI_UNIQUE, 0, op, "Your pets have been killed."); |
602 | } |
602 | } |
603 | else |
603 | else |
604 | { |
604 | { |
605 | int target = atoi (params); |
605 | int target = atoi (params); |
606 | |
606 | |
607 | for (obl = first_friendly_object; obl != NULL; obl = next) |
607 | for (obl = first_friendly_object; obl; obl = next) |
608 | { |
608 | { |
609 | object *ob = obl->ob; |
609 | object *ob = obl->ob; |
610 | |
610 | |
611 | next = obl->next; |
611 | next = obl->next; |
612 | |
612 | |