--- deliantra/server/server/player.C 2009/01/01 16:05:13 1.224 +++ deliantra/server/server/player.C 2009/01/01 18:35:48 1.225 @@ -2524,7 +2524,6 @@ kill_player (object *op) { int x, y; - char buf[MAX_BUF]; maptile *map; /* this is for resurrection */ int will_kill_again; archetype *at; @@ -2533,19 +2532,21 @@ if (save_life (op)) return; + dynbuf_text deathtab; + /* restore player */ at = archetype::find ("poisoning"); if (object *tmp = present_arch_in_ob (at, op)) { tmp->destroy (); - new_draw_info (NDI_UNIQUE, 0, op, "Your body feels cleansed"); + deathtab << "Your body feels cleansed...\r"; } at = archetype::find ("confusion"); if (object *tmp = present_arch_in_ob (at, op)) { tmp->destroy (); - new_draw_info (NDI_UNIQUE, 0, tmp, "Your mind feels clearer"); + deathtab << "Your mind feels clearer...\r"; } cure_disease (op, 0, 0); /* remove any disease */ @@ -2575,8 +2576,7 @@ */ if (op_on_battleground (op, &x, &y)) { - new_draw_info (NDI_UNIQUE | NDI_NAVY, 0, op, "You have been defeated in combat!"); - new_draw_info (NDI_UNIQUE | NDI_NAVY, 0, op, "Local medics have saved your life..."); + deathtab << "You almost died in combat, but local medics have saved your life...\r"; /* create a bodypart-trophy to make the winner happy */ if (object *tmp = arch_to_object (archetype::find ("finger"))) @@ -2597,9 +2597,14 @@ /* teleport defeated player to new destination */ transfer_ob (op, x, y, 0, NULL); op->contr->braced = 0; + + op->contr->infobox (MSG_CHANNEL ("death"), deathtab); return; } + deathtab << "You were killed by " << op->contr->killer_name () << ".\n\n"; + deathtab << "T\n\n"; + INVOKE_PLAYER (DEATH, op->contr); command_kill_pets (op, 0); @@ -2730,12 +2735,12 @@ shstr_tmp god = determine_god (op); if (god != shstr_none) - new_draw_info_format (NDI_UNIQUE, 0, op, "For a brief moment you feel the holy presence of %s protecting" " you.", &god); + deathtab << "For a brief moment you feel the holy presence of " << god << " protecting you.\r"; else - new_draw_info (NDI_UNIQUE, 0, op, "For a brief moment you feel a holy presence protecting you."); + deathtab << "For a brief moment you feel a holy presence protecting you.\r"; } #else - new_draw_info (NDI_UNIQUE, 0, op, "For a brief moment you feel a holy presence protecting you from losing yourself completely."); + deathtab << "For a brief moment you feel a holy presence protecting you from losing yourself completely."; #endif /* Put a gravestone up where the character 'almost' died. List the @@ -2803,7 +2808,7 @@ op->update_stats (); } - new_draw_info (NDI_UNIQUE, 0, op, "YOU HAVE DIED."); + op->contr->infobox (MSG_CHANNEL ("death"), deathtab); } void