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

Comparing deliantra/server/server/spell_effect.C (file contents):
Revision 1.99 by elmex, Tue Jan 13 13:29:57 2009 UTC vs.
Revision 1.100 by root, Mon Apr 27 01:38:49 2009 UTC

569perceive_self (object *op) 569perceive_self (object *op)
570{ 570{
571 const char *cp = describe_item (op, op); 571 const char *cp = describe_item (op, op);
572 archetype *at = archetype::find (ARCH_DEPLETION); 572 archetype *at = archetype::find (ARCH_DEPLETION);
573 573
574 dynbuf_text buf; 574 dynbuf_text &buf = msg_dynbuf; buf.clear ();
575 575
576 if (player *pl = op->contr) 576 if (!op->is_player ())
577 return 0;
578
577 if (object *race = archetype::find (op->race)) 579 if (object *race = archetype::find (op->race))
578 buf << " - You are a G<male|female> " << &race->name << ".\n"; 580 buf << " - You are a G<male|female> " << &race->name << ".\n";
579 581
580 if (object *god = find_god (determine_god (op))) 582 if (object *god = find_god (determine_god (op)))
581 buf << " - You worship " << &god->name << ".\n"; 583 buf << " - You worship " << &god->name << ".\n";
582 else 584 else
583 buf << " - You worship no god.\n"; 585 buf << " - You worship no god.\n";
609 611
610 break; 612 break;
611 } 613 }
612 } 614 }
613 615
614 buf << '\0'; // zero-terminate 616 op->contr->infobox (MSG_CHANNEL ("perceiveself"), buf);
615
616 new_draw_info (NDI_UNIQUE, 0, op, buf.linearise ());
617 617
618 return 1; 618 return 1;
619} 619}
620 620
621/* This creates magic walls. Really, it can create most any object, 621/* This creates magic walls. Really, it can create most any object,
1463 1463
1464/* Identifies objects in the players inventory/on the ground */ 1464/* Identifies objects in the players inventory/on the ground */
1465int 1465int
1466cast_identify (object *op, object *caster, object *spell) 1466cast_identify (object *op, object *caster, object *spell)
1467{ 1467{
1468 dynbuf_text buf;
1469 object *tmp; 1468 object *tmp;
1469 dynbuf_text &buf = msg_dynbuf; buf.clear ();
1470 1470
1471 int num_ident = spell->stats.dam + SP_level_dam_adjust (caster, spell); 1471 int num_ident = spell->stats.dam + SP_level_dam_adjust (caster, spell);
1472 1472
1473 if (num_ident < 1) 1473 if (num_ident < 1)
1474 num_ident = 1; 1474 num_ident = 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines