ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/pets.C
(Generate patch)

Comparing deliantra/server/server/pets.C (file contents):
Revision 1.36 by root, Mon Jun 4 13:04:00 2007 UTC vs.
Revision 1.37 by root, Tue Jun 5 13:05:02 2007 UTC

437 * is_golem is to note that this is a golem spell. 437 * is_golem is to note that this is a golem spell.
438 */ 438 */
439object * 439object *
440fix_summon_pet (archetype *at, object *op, int dir, int is_golem) 440fix_summon_pet (archetype *at, object *op, int dir, int is_golem)
441{ 441{
442 archetype *atmp;
443 object *tmp = NULL, *prev = NULL, *head = NULL; 442 object *tmp = NULL, *prev = NULL, *head = NULL;
444 443
445 for (atmp = at; atmp; atmp = atmp->more) 444 for (archetype *atmp = at; atmp; atmp = (archetype *)atmp->more)
446 { 445 {
447 tmp = arch_to_object (atmp); 446 tmp = arch_to_object (atmp);
448 447
449 if (atmp == at) 448 if (atmp == at)
450 { 449 {
451 if (!is_golem) 450 if (!is_golem)
452 SET_FLAG (tmp, FLAG_MONSTER); 451 SET_FLAG (tmp, FLAG_MONSTER);
453 452
454 tmp->set_owner (op); 453 tmp->set_owner (op);
454
455 if (op->type == PLAYER) 455 if (op->type == PLAYER)
456 { 456 {
457 tmp->stats.exp = 0; 457 tmp->stats.exp = 0;
458 add_friendly_object (tmp); 458 add_friendly_object (tmp);
459 if (is_golem) 459 if (is_golem)
983 return 0; 983 return 0;
984 } 984 }
985 985
986 for (i = 1; i <= nrof; i++) 986 for (i = 1; i <= nrof; i++)
987 { 987 {
988 archetype *atmp;
989 object *prev = NULL, *head = NULL, *tmp; 988 object *prev = NULL, *head = NULL, *tmp;
990 989
991 if (dir) 990 if (dir)
992 { 991 {
993 ndir = dir; 992 ndir = dir;
1009 new_draw_info (NDI_UNIQUE, 0, op, "No more pets for this casting."); 1008 new_draw_info (NDI_UNIQUE, 0, op, "No more pets for this casting.");
1010 1009
1011 return nrof > 1; 1010 return nrof > 1;
1012 } 1011 }
1013 1012
1014 for (atmp = summon_arch; atmp != NULL; atmp = atmp->more) 1013 for (archetype *atmp = summon_arch; atmp != NULL; atmp = (archetype *)atmp->more)
1015 { 1014 {
1016 tmp = arch_to_object (atmp); 1015 tmp = arch_to_object (atmp);
1017 if (atmp == summon_arch) 1016 if (atmp == summon_arch)
1018 { 1017 {
1019 if (QUERY_FLAG (tmp, FLAG_MONSTER)) 1018 if (QUERY_FLAG (tmp, FLAG_MONSTER))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines