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

Comparing deliantra/server/server/player.C (file contents):
Revision 1.202 by root, Fri Aug 29 02:07:09 2008 UTC vs.
Revision 1.207 by root, Mon Sep 29 10:32:50 2008 UTC

219 /* make sure he's a player -- needed because of class change. */ 219 /* make sure he's a player -- needed because of class change. */
220 ob->type = PLAYER; // we are paranoid 220 ob->type = PLAYER; // we are paranoid
221 ob->race = ob->arch->race; 221 ob->race = ob->arch->race;
222 222
223 ob->update_weight (); 223 ob->update_weight ();
224 link_player_skills (ob); 224 link_skills ();
225 225
226 CLEAR_FLAG (ob, FLAG_NO_FIX_PLAYER); 226 CLEAR_FLAG (ob, FLAG_NO_FIX_PLAYER);
227 227
228 assign (title, ob->arch->object::name); 228 assign (title, ob->arch->object::name);
229 229
728 else /* lock all 'normal items by default */ 728 else /* lock all 'normal items by default */
729 SET_FLAG (op, FLAG_INV_LOCKED); 729 SET_FLAG (op, FLAG_INV_LOCKED);
730 } /* for loop of objects in player inv */ 730 } /* for loop of objects in player inv */
731 731
732 /* Need to set up the skill pointers */ 732 /* Need to set up the skill pointers */
733 link_player_skills (pl); 733 pl->contr->link_skills ();
734} 734}
735 735
736void 736void
737get_party_password (object *op, partylist *party) 737get_party_password (object *op, partylist *party)
738{ 738{
870 ob->msg = 0; 870 ob->msg = 0;
871 871
872 start_info (ob); 872 start_info (ob);
873 CLEAR_FLAG (ob, FLAG_WIZ); 873 CLEAR_FLAG (ob, FLAG_WIZ);
874 give_initial_items (ob, ob->randomitems); 874 give_initial_items (ob, ob->randomitems);
875 link_player_skills (ob);
876 esrv_send_inventory (ob, ob); 875 esrv_send_inventory (ob, ob);
877 ob->update_stats (); 876 ob->update_stats ();
878 877
879 /* This moves the player to a different start map, if there 878 /* This moves the player to a different start map, if there
880 * is one for this race 879 * is one for this race
1579 } 1578 }
1580 1579
1581 /* this should not happen, but sometimes does */ 1580 /* this should not happen, but sometimes does */
1582 if (arrow->nrof == 0) 1581 if (arrow->nrof == 0)
1583 { 1582 {
1583 LOG (llevError | logBacktrace, "arrow (%s) has nrof 0\n", arrow->debug_desc ());
1584 arrow->destroy (); 1584 arrow->destroy ();
1585 return 0; 1585 return 0;
1586 } 1586 }
1587 1587
1588 left = arrow; /* these are arrows left to the player */ 1588 left = arrow; /* these are arrows left to the player */
2312const char * 2312const char *
2313gravestone_text (object *op) 2313gravestone_text (object *op)
2314{ 2314{
2315 static dynbuf_text buf; 2315 static dynbuf_text buf;
2316 2316
2317 buf << "---- R.I.P. ----\n\n"; 2317 buf << "---- R.I.P. ----\n\n"
2318 op->name; 2318 << op->name;
2319 2319
2320 if (op->type == PLAYER) 2320 if (op->type == PLAYER)
2321 buf << " the " << op->contr->title; 2321 buf << " the " << op->contr->title;
2322 2322
2323 buf << "\n\n"; 2323 buf << "\n\n";
2792 * exp loss on the stone. 2792 * exp loss on the stone.
2793 */ 2793 */
2794 tmp = arch_to_object (archetype::find ("gravestone")); 2794 tmp = arch_to_object (archetype::find ("gravestone"));
2795 tmp->name = format ("%s's gravestone", &op->name); 2795 tmp->name = format ("%s's gravestone", &op->name);
2796 tmp->name_pl = format ("%s's gravestones", &op->name); 2796 tmp->name_pl = format ("%s's gravestones", &op->name);
2797 tmp->msg = format ("RIP\nHere rests the hero %s the %s,\nwho was killed\nby %s.\n", &op->name, op->contr->title, op->contr->killer_name ()); 2797 tmp->msg = format ("T<RIP>\n\nHere rests the hero %s the %s,\rwho was killed\rby %s.\n",
2798 &op->name, op->contr->title, op->contr->killer_name ());
2798 tmp->x = op->x, tmp->y = op->y; 2799 tmp->x = op->x, tmp->y = op->y;
2799 insert_ob_in_map (tmp, op->map, NULL, 0); 2800 insert_ob_in_map (tmp, op->map, NULL, 0);
2800 2801
2801 /**************************************/ 2802 /**************************************/
2802 /* */ 2803 /* */
2890 if (will_kill_again & (1 << at)) 2891 if (will_kill_again & (1 << at))
2891 force->resist[at] = 100; 2892 force->resist[at] = 100;
2892 2893
2893 insert_ob_in_ob (force, op); 2894 insert_ob_in_ob (force, op);
2894 op->update_stats (); 2895 op->update_stats ();
2895
2896 } 2896 }
2897 2897
2898 new_draw_info (NDI_UNIQUE, 0, op, "YOU HAVE DIED."); 2898 new_draw_info (NDI_UNIQUE, 0, op, "YOU HAVE DIED.");
2899} 2899}
2900 2900

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines