From d568dd3d4293063c31dd9c3127dadf242831f5b8 Mon Sep 17 00:00:00 2001 From: Rumble Date: Sun, 3 Aug 2008 21:42:02 +0000 Subject: [PATCH] [Aug 03 2008] - Rumble You can now see your own communications while sleeping for gos, auc, gra, etc. (thanks Drefs) changed str_and_map to use target_room instead of IN_ROOM(ch). (thanks Vatiken ) [Aug 02 2008] - Welcor Fixed a one-line bug in act.movement.c - caused crashes when moving into FLIGH T rooms. [Jul 26 2008] - Rumble Fixed autosplit to properly award gold to the person delivering the killing bl ow and then split it with the group. (thanks Maclir) Added checks to qedit for questmaster not being set. (thanks Jamdog) --- changelog | 8 ++++++++ src/act.comm.c | 2 +- src/act.informative.c | 5 +++-- src/asciimap.c | 6 +++--- src/asciimap.h | 2 +- src/fight.c | 10 +++------- src/quest.c | 5 ++--- 7 files changed, 21 insertions(+), 17 deletions(-) diff --git a/changelog b/changelog index 880746d..1a275ce 100644 --- a/changelog +++ b/changelog @@ -3,6 +3,14 @@ help, find any bugs, or have ideas for improvement please stop by TBA at telnet://tbamud.com:9091 or email rumble@tbamud.com --Rumble tbaMUD 3.56 +[Aug 03 2008] - Rumble + You can now see your own communications while sleeping for gos, auc, gra, etc. (thanks Drefs) + changed str_and_map to use target_room instead of IN_ROOM(ch). (thanks Vatiken) +[Aug 02 2008] - Welcor + Fixed a one-line bug in act.movement.c - caused crashes when moving into FLIGHT rooms. +[Jul 26 2008] - Rumble + Fixed autosplit to properly award gold to the person delivering the killing blow and then split it with the group. (thanks Maclir) + Added checks to qedit for questmaster not being set. (thanks Jamdog) [Jul 08 2008] - Rumble Removed duplicate questpoints listing in stat char. (thanks Mirad) Fix to qedit for deleting all quests. (thanks Jamdog) diff --git a/src/act.comm.c b/src/act.comm.c index 594ad7b..99a374b 100644 --- a/src/act.comm.c +++ b/src/act.comm.c @@ -486,7 +486,7 @@ ACMD(do_gen_comm) snprintf(buf1, sizeof(buf1), "%sYou %s, '%s%s'%s", COLOR_LEV(ch) >= C_CMP ? color_on : "", com_msgs[subcmd][1], argument, COLOR_LEV(ch) >= C_CMP ? color_on : "", CCNRM(ch, C_CMP)); - msg = act(buf1, FALSE, ch, 0, 0, TO_CHAR); + msg = act(buf1, FALSE, ch, 0, 0, TO_CHAR | TO_SLEEP); add_history(ch, msg, hist_type[subcmd]); } if (!emoting) diff --git a/src/act.informative.c b/src/act.informative.c index 4016221..e3624b6 100644 --- a/src/act.informative.c +++ b/src/act.informative.c @@ -461,7 +461,8 @@ void look_at_room(struct char_data *ch, int ignore_brief) { trig_data *t; struct room_data *rm = &world[IN_ROOM(ch)]; - + room_vnum target_room; + if (!ch->desc) return; @@ -496,7 +497,7 @@ void look_at_room(struct char_data *ch, int ignore_brief) { if(!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AUTOMAP) && can_see_map(ch)) { - str_and_map(world[IN_ROOM(ch)].description, ch); + str_and_map(world[target_room].description, ch, target_room); } else { diff --git a/src/asciimap.c b/src/asciimap.c index f25cb2c..87cacd0 100644 --- a/src/asciimap.c +++ b/src/asciimap.c @@ -486,7 +486,7 @@ static void perform_map( struct char_data *ch, char *argument, bool worldmap ) } /* Display a string with the map beside it */ -void str_and_map(char *str, struct char_data *ch ) { +void str_and_map(char *str, struct char_data *ch, room_vnum target_room ) { int size, centre, x, y, min, max, char_size; int ew_size=0, ns_size=0; bool worldmap; @@ -497,7 +497,7 @@ void str_and_map(char *str, struct char_data *ch ) { return; } - worldmap = ROOM_FLAGGED(IN_ROOM(ch), ROOM_WORLDMAP) ? TRUE : FALSE ; + worldmap = ROOM_FLAGGED(target_room, ROOM_WORLDMAP) ? TRUE : FALSE ; if(!PRF_FLAGGED(ch, PRF_AUTOMAP)) { send_to_char(ch, strfrmt(str, GET_SCREEN_WIDTH(ch), 1, FALSE, FALSE, FALSE)); @@ -514,7 +514,7 @@ void str_and_map(char *str, struct char_data *ch ) { map[x][y]= (!(y%2) && !worldmap) ? DOOR_NONE : SECT_EMPTY; /* starts the mapping with the center room */ - MapArea(IN_ROOM(ch), ch, centre, centre, min, max, ns_size/2, ew_size/2, worldmap ); +MapArea(target_room, ch, centre, centre, min, max, ns_size/2, ew_size/2, worldmap ); map[centre][centre] = SECT_HERE; /* char_size = rooms + doors + padding */ diff --git a/src/asciimap.h b/src/asciimap.h index 240c465..241f5be 100644 --- a/src/asciimap.h +++ b/src/asciimap.h @@ -17,7 +17,7 @@ /* Exported function prototypes */ bool can_see_map(struct char_data *ch); -void str_and_map(char *str, struct char_data *ch ); +void str_and_map(char *str, struct char_data *ch, room_vnum target_room ); ACMD(do_map); #endif /* ASCIIMAP_H_*/ diff --git a/src/fight.c b/src/fight.c index 6f1525b..90b9414 100644 --- a/src/fight.c +++ b/src/fight.c @@ -662,7 +662,7 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty long local_gold = 0; char local_buf[256]; struct char_data *tmp_char; - struct obj_data *corpse_obj, *coin_obj, *next_obj; + struct obj_data *corpse_obj; if (GET_POS(victim) <= POS_DEAD) { /* This is "normal"-ish now with delayed extraction. -gg 3/15/2001 */ @@ -828,12 +828,8 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty if (IS_AFFECTED(ch, AFF_GROUP) && (local_gold > 0) && PRF_FLAGGED(ch, PRF_AUTOSPLIT) ) { generic_find("corpse", FIND_OBJ_ROOM, ch, &tmp_char, &corpse_obj); if (corpse_obj) { - for (coin_obj = corpse_obj->contains; coin_obj; coin_obj = next_obj) { - next_obj = coin_obj->next_content; - if (CAN_SEE_OBJ(ch, coin_obj) && isname("coin", coin_obj->name)) - extract_obj(coin_obj); - } - do_split(ch,local_buf,0,0); + do_get(ch, "all.coin corpse", 0, 0); + do_split(ch, local_buf, 0, 0); } /* need to remove the gold from the corpse */ } else if (!IS_NPC(ch) && (ch != victim) && PRF_FLAGGED(ch, PRF_AUTOGOLD)) { diff --git a/src/quest.c b/src/quest.c index e2c54a0..1e95519 100644 --- a/src/quest.c +++ b/src/quest.c @@ -440,9 +440,8 @@ void list_quests(struct char_data *ch, zone_rnum zone, qst_vnum vmin, qst_vnum v for (rnum = 0; rnum < total_quests ; rnum++) if (QST_NUM(rnum) >= bottom && QST_NUM(rnum) <= top) send_to_char(ch, "@g%4d@n) [@g%-5d@n] @c%-44.44s@n @y[%5d]@n\r\n", - ++counter, - QST_NUM(rnum), QST_NAME(rnum), - mob_index[QST_MASTER(rnum)].vnum); + ++counter, QST_NUM(rnum), QST_NAME(rnum), + QST_MASTER(rnum) == NOBODY ? 0 : mob_index[QST_MASTER(rnum)].vnum); if (!counter) send_to_char(ch, "None found.\r\n"); }