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.53 by root, Mon Oct 12 14:00:59 2009 UTC vs.
Revision 1.54 by root, Fri Oct 16 00:30:19 2009 UTC

641int 641int
642summon_golem (object *op, object *caster, int dir, object *spob) 642summon_golem (object *op, object *caster, int dir, object *spob)
643{ 643{
644 object *tmp, *god = NULL; 644 object *tmp, *god = NULL;
645 archetype *at; 645 archetype *at;
646 char buf[MAX_BUF];
647 646
648 /* Because there can be different golem spells, player may want to 647 /* Because there can be different golem spells, player may want to
649 * 'lose' their old golem. 648 * 'lose' their old golem.
650 */ 649 */
651 if (op->type == PLAYER && op->contr->golem) 650 if (op->type == PLAYER && op->contr->golem)
741 tmp->direction = dir; 740 tmp->direction = dir;
742 741
743 /* Holy spell - some additional tailoring */ 742 /* Holy spell - some additional tailoring */
744 if (god) 743 if (god)
745 { 744 {
746 object *tmp2;
747
748 sprintf (buf, "%s of %s", &spob->name, &god->name); 745 char *buf = format ("%s of %s", &spob->name, &god->name);
749 buf[0] = toupper (buf[0]); 746 buf[0] = toupper (buf[0]);
750 747
751 for (tmp2 = tmp; tmp2; tmp2 = tmp2->more) 748 for (object *tmp2 = tmp; tmp2; tmp2 = tmp2->more)
752 tmp2->name = buf; 749 tmp2->name = buf;
753 750
754 tmp->attacktype |= god->attacktype; 751 tmp->attacktype |= god->attacktype;
755 memcpy (tmp->resist, god->resist, sizeof (tmp->resist)); 752 memcpy (tmp->resist, god->resist, sizeof (tmp->resist));
756 tmp->race = god->race; 753 tmp->race = god->race;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines