negative exp and do_scan crash fix --Rumble

This commit is contained in:
Rumble 2010-11-01 05:03:19 +00:00
parent 692ade7277
commit 95b4f8267c
4 changed files with 13 additions and 8 deletions

View file

@ -35,6 +35,9 @@ export (QQ's a zone into a tarball)
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist) Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
(lots of major bugfixes too) (lots of major bugfixes too)
@ @
[Nov 01 2010] - Rumble
Fixed do_scan crash due to exits to NOWHERE. (thanks Rhade)
Changed do_score experience tnl to list only mortals since LVL_IMMORT showed negative EXP.
[Oct 30 2010] - Jamdog [Oct 30 2010] - Jamdog
Added ability for players to list/show their own ideas, bugs and typos (thanks Frenze) Added ability for players to list/show their own ideas, bugs and typos (thanks Frenze)
Added more details to header for idea/bug/typo show command (thanks Parna) Added more details to header for idea/bug/typo show command (thanks Parna)

View file

@ -800,7 +800,7 @@ ACMD(do_score)
send_to_char(ch, "You have %d exp, %d gold coins, and %d questpoints.\r\n", send_to_char(ch, "You have %d exp, %d gold coins, and %d questpoints.\r\n",
GET_EXP(ch), GET_GOLD(ch), GET_QUESTPOINTS(ch)); GET_EXP(ch), GET_GOLD(ch), GET_QUESTPOINTS(ch));
if (GET_LEVEL(ch) < LVL_IMMORT) if (GET_LEVEL(ch) < 30)
send_to_char(ch, "You need %d exp to reach your next level.\r\n", send_to_char(ch, "You need %d exp to reach your next level.\r\n",
level_exp(GET_CLASS(ch), GET_LEVEL(ch) + 1) - GET_EXP(ch)); level_exp(GET_CLASS(ch), GET_LEVEL(ch) + 1) - GET_EXP(ch));
@ -2596,7 +2596,7 @@ ACMD(do_scan)
for (door = 0; door < NUM_OF_DIRS; door++) { for (door = 0; door < NUM_OF_DIRS; door++) {
for (range = 1; range<= maxrange; range++) { for (range = 1; range<= maxrange; range++) {
if (world[scanned_room].dir_option[door] && if (world[scanned_room].dir_option[door] && world[scanned_room].dir_option[door]->to_room != NOWHERE &&
!IS_SET(world[scanned_room].dir_option[door]->exit_info, EX_CLOSED)) { !IS_SET(world[scanned_room].dir_option[door]->exit_info, EX_CLOSED)) {
scanned_room = world[scanned_room].dir_option[door]->to_room; scanned_room = world[scanned_room].dir_option[door]->to_room;
if (world[scanned_room].people) if (world[scanned_room].people)

View file

@ -77,7 +77,7 @@
/* #undef HAVE_STRICMP */ /* #undef HAVE_STRICMP */
/* Define if you have the strlcpy function. */ /* Define if you have the strlcpy function. */
#define HAVE_STRLCPY 1 /* #undef HAVE_STRLCPY */
/* Define if you have the strncasecmp function. */ /* Define if you have the strncasecmp function. */
#define HAVE_STRNCASECMP 1 #define HAVE_STRNCASECMP 1
@ -113,7 +113,7 @@
#define HAVE_LIMITS_H 1 #define HAVE_LIMITS_H 1
/* Define if you have the <mcheck.h> header file. */ /* Define if you have the <mcheck.h> header file. */
/* #undef HAVE_MCHECK_H */ #define HAVE_MCHECK_H 1
/* Define if you have the <memory.h> header file. */ /* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1 #define HAVE_MEMORY_H 1
@ -308,16 +308,16 @@
/* #undef NEED_STRERROR_PROTO */ /* #undef NEED_STRERROR_PROTO */
/* Check for a prototype to stricmp. */ /* Check for a prototype to stricmp. */
/* #undef NEED_STRICMP_PROTO */ #define NEED_STRICMP_PROTO
/* Check for a prototype to strlcpy. */ /* Check for a prototype to strlcpy. */
/* #undef NEED_STRLCPY_PROTO */ #define NEED_STRLCPY_PROTO
/* Check for a prototype to strncasecmp. */ /* Check for a prototype to strncasecmp. */
/* #undef NEED_STRNCASECMP_PROTO */ /* #undef NEED_STRNCASECMP_PROTO */
/* Check for a prototype to strnicmp. */ /* Check for a prototype to strnicmp. */
/* #undef NEED_STRNICMP_PROTO */ #define NEED_STRNICMP_PROTO
/* Check for a prototype to system. */ /* Check for a prototype to system. */
/* #undef NEED_SYSTEM_PROTO */ /* #undef NEED_SYSTEM_PROTO */

View file

@ -120,7 +120,6 @@ int perform_move(struct char_data *ch, int dir, int following);
int mana_gain(struct char_data *ch); int mana_gain(struct char_data *ch);
int hit_gain(struct char_data *ch); int hit_gain(struct char_data *ch);
int move_gain(struct char_data *ch); int move_gain(struct char_data *ch);
void advance_level(struct char_data *ch);
void set_title(struct char_data *ch, char *title); void set_title(struct char_data *ch, char *title);
void gain_exp(struct char_data *ch, int gain); void gain_exp(struct char_data *ch, int gain);
void gain_exp_regardless(struct char_data *ch, int gain); void gain_exp_regardless(struct char_data *ch, int gain);
@ -129,6 +128,9 @@ void point_update(void);
void update_pos(struct char_data *victim); void update_pos(struct char_data *victim);
void run_autowiz(void); void run_autowiz(void);
/* in class.c */
void advance_level(struct char_data *ch);
void char_from_furniture(struct char_data *ch); void char_from_furniture(struct char_data *ch);
/** What ch is currently sitting on. */ /** What ch is currently sitting on. */
#define SITTING(ch) ((ch)->char_specials.furniture) #define SITTING(ch) ((ch)->char_specials.furniture)