[Oct 23 2009] - Rumble

Fixed bug in renumbering zone table after deleting mobiles. (thanks Drefs)
  Fixed bug in renumbering zone table after deleting objects. (thanks Drefs)
  Upgraded column_list to use player screenwidth to determine how many columns t
o create (use column arg of 0). (thanks Maclir)
[Oct 20 2009] - Rumble
  Corrected several PRF_FLAGGED checks that mobs were using.
  Removed l-desc from stat player and title from stat mob. (thanks Xiu)
[Oct 19 2009] - Rumble
  Added a note to spec_assign.c assign_mobiles that guildguard, snake, thief, ma
gic user, puff, fido, janitor, and cityguards are now implemented via triggers.
  Fixed a bug where empty drink containers and fountains would show half empty.
(thanks Parna)
This commit is contained in:
Rumble 2009-10-23 00:29:56 +00:00
parent 44722575ea
commit baf644d031
16 changed files with 90 additions and 107 deletions

View file

@ -954,6 +954,16 @@ void column_list(struct char_data *ch, int num_cols, const char **list, int list
int num_per_col, col_width,r,c,i, offset=0, len=0, temp_len, max_len=0;
char buf[MAX_STRING_LENGTH];
/* Work out the longest list item */
for (i=0; i<list_length; i++)
if (max_len < strlen(list[i]))
max_len = strlen(list[i]);
/* auto columns case */
if (num_cols == 0) {
num_cols = (IS_NPC(ch) ? 80 : GET_SCREEN_WIDTH(ch)) / (max_len + (show_nums ? 5 : 1));
}
/* Ensure that the number of columns is in the range 1-10 */
num_cols = MIN(MAX(num_cols,1), 10);