Re: [CODE][NEWBIE]Prolly last question on obj table..

From: Thomas Arp (t_arp@stofanet.dk)
Date: 08/25/02


From: "Peter d" <death_comes_to_all@HOTMAIL.COM>
> GET_OBJ_LEVEL(OLC_OBJ(d)) = change_level_for_object(d);
> i don't know exactly where to put this to make it set after i edited
> values.. like num dam dice, and size dam dice..

Put it in oedit_disp_menu() or something. This way it'll recalculate
the level every time anyone accesses the menu.
<snip>
> and this is the third function, the combine function..
> int change_level_for_object(struct descriptor_data *d)
> {
>         int min_lev = 0;
>
>    if (change_level_for_stats(d) != 0)
>         min_lev += change_level_for_stats(d);
>
>    else if (change_level_for_types(d) != 0)
>         min_lev += change_level_for_types(d);
<snip>
Get rid of the 'else' in the above if sentence - you want it
to run regardless of the stats check.

Welcor

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT