Re: Explanation of Extract_Char please

From: Patrick J. Dughi (dughi@IMAXX.NET)
Date: 03/14/98


i
On Sat, 14 Mar 1998, ;P wrote:

> >   /* pull the char from the list */
> >   REMOVE_FROM_LIST(ch, character_list, next);
>
> this removes the character from the global character list..you would want
> to remove this check since the player will not be leaving the game..
>
> >   if (ch->desc && ch->desc->original)
> >     do_return(ch, "", 0, 0);
>
> this is so that if an immortal switches into a mob, and the mob dies, the
> player will return to his real body..
>
> for the rest, you should just move them to their room..i would actually
> leave extract_char alone, and let mobiles use that, then make a new
> function for when a PC dies..
>
> void move_char_on_death(struct char_data *ch)
> {
>   char_from_room(ch);
>   char_to_room(ch, r_mortal_start_room[GET_HOME(ch)][(int)GET_CLASS(ch)]);
>
>   GET_HIT(ch) = 1;
>   GET_POS(ch) = POS_STANDING;
> }
>
> shrug..that's all you really need to do (look at some arena code)..and it
> looks like you don't reall need another function..just put those four
> lines where the extract_char should be..
>
> siv
>
>
>      +------------------------------------------------------------+
>      | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>      | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
>      +------------------------------------------------------------+
>


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST