version 1.30 | | version 1.31 |
---|
| | |
/* | | /* |
* static char *rcsid_pets_c = | | * static char *rcsid_pets_c = |
* "$Id: pets.c,v 1.30 2005/07/28 07:23:19 qal21 Exp $"; | | * "$Id: pets.c,v 1.31 2005/07/29 16:45:09 qal21 Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
is found */ | | is found */ |
object *get_real_owner(object *ob) { | | object *get_real_owner(object *ob) { |
object *realowner = ob; | | object *realowner = ob; |
| | |
| | if (realowner == 0) return 0; |
| | |
while(realowner->owner != 0) | | while(realowner->owner != 0) |
{ | | { |
realowner = realowner->owner; | | realowner = realowner->owner; |
| | |
int should_arena_attack(object *pet,object *owner,object *target) { | | int should_arena_attack(object *pet,object *owner,object *target) { |
object *rowner, *towner; | | object *rowner, *towner; |
| | |
| | /* exit if the target, pet, or owner is null. */ |
| | if ((target == 0) || (pet == 0) || (owner ==0)) return 0; |
| | |
/* get the owners of itself and the target, this is to deal with pets of | | /* get the owners of itself and the target, this is to deal with pets of |
pets */ | | pets */ |
rowner = get_real_owner(owner); | | rowner = get_real_owner(owner); |