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.19 by root, Wed Jan 3 20:32:13 2007 UTC vs.
Revision 1.22 by root, Mon Jan 8 01:19:04 2007 UTC

1/* 1/*
2 CrossFire, A Multiplayer game for X-windows 2 CrossFire, A Multiplayer game for X-windows
3 3
4 Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
4 Copyright (C) 2002 Mark Wedel & Crossfire Development Team 5 Copyright (C) 2002 Mark Wedel & Crossfire Development Team
5 Copyright (C) 1992 Frank Tore Johansen 6 Copyright (C) 1992 Frank Tore Johansen
6 7
7 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
468 tmp->set_owner (op); 469 tmp->set_owner (op);
469 if (op->type == PLAYER) 470 if (op->type == PLAYER)
470 { 471 {
471 tmp->stats.exp = 0; 472 tmp->stats.exp = 0;
472 add_friendly_object (tmp); 473 add_friendly_object (tmp);
473 SET_FLAG (tmp, FLAG_FRIENDLY);
474 if (is_golem) 474 if (is_golem)
475 CLEAR_FLAG (tmp, FLAG_MONSTER); 475 CLEAR_FLAG (tmp, FLAG_MONSTER);
476 } 476 }
477 else 477 else
478 { 478 {
483 if (owner) 483 if (owner)
484 { /* For now, we transfer ownership */ 484 { /* For now, we transfer ownership */
485 tmp->set_owner (owner); 485 tmp->set_owner (owner);
486 tmp->attack_movement = PETMOVE; 486 tmp->attack_movement = PETMOVE;
487 add_friendly_object (tmp); 487 add_friendly_object (tmp);
488 SET_FLAG (tmp, FLAG_FRIENDLY);
489 } 488 }
490 } 489 }
491 } 490 }
492 491
493 if (op->type != PLAYER || !is_golem) 492 if (op->type != PLAYER || !is_golem)
732 if (owner) 731 if (owner)
733 { /* For now, we transfer ownership */ 732 { /* For now, we transfer ownership */
734 tmp->set_owner (owner); 733 tmp->set_owner (owner);
735 tmp->attack_movement = PETMOVE; 734 tmp->attack_movement = PETMOVE;
736 add_friendly_object (tmp); 735 add_friendly_object (tmp);
737 SET_FLAG (tmp, FLAG_FRIENDLY);
738 } 736 }
739 } 737 }
740 738
741 SET_FLAG (tmp, FLAG_MONSTER); 739 SET_FLAG (tmp, FLAG_MONSTER);
742 } 740 }
1048 if (op->type == PLAYER || QUERY_FLAG (op, FLAG_FRIENDLY)) 1046 if (op->type == PLAYER || QUERY_FLAG (op, FLAG_FRIENDLY))
1049 { 1047 {
1050 /* If this is not set, we make it friendly */ 1048 /* If this is not set, we make it friendly */
1051 if (!QUERY_FLAG (spell_ob, FLAG_MONSTER)) 1049 if (!QUERY_FLAG (spell_ob, FLAG_MONSTER))
1052 { 1050 {
1053 SET_FLAG (tmp, FLAG_FRIENDLY);
1054 add_friendly_object (tmp); 1051 add_friendly_object (tmp);
1055 tmp->stats.exp = 0; 1052 tmp->stats.exp = 0;
1056 1053
1057 if (spell_ob->attack_movement) 1054 if (spell_ob->attack_movement)
1058 tmp->attack_movement = spell_ob->attack_movement; 1055 tmp->attack_movement = spell_ob->attack_movement;
1088 if (head && head->randomitems) 1085 if (head && head->randomitems)
1089 { 1086 {
1090 create_treasure (head->randomitems, head, GT_APPLY | GT_STARTEQUIP, 6, 0); 1087 create_treasure (head->randomitems, head, GT_APPLY | GT_STARTEQUIP, 6, 0);
1091 1088
1092 for (object *tmp = head->inv; tmp; tmp = tmp->below) 1089 for (object *tmp = head->inv; tmp; tmp = tmp->below)
1093 SET_FLAG (tmp, FLAG_NO_DROP); 1090 SET_FLAG (tmp, FLAG_DESTROY_ON_DEATH);
1094 } 1091 }
1095 } /* for i < nrof */ 1092 } /* for i < nrof */
1096 1093
1097 return 1; 1094 return 1;
1098} 1095}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines