mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-22 05:50:48 +02:00
Bug fixes for new house system and levels command
This commit is contained in:
parent
e068bfd5c0
commit
b06cf00639
6 changed files with 82 additions and 63 deletions
|
@ -35,8 +35,12 @@ export (QQ's a zone into a tarball)
|
|||
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
|
||||
(lots of major bugfixes too)
|
||||
@
|
||||
[Dec 06 2010] - Jamdog
|
||||
Fixed erroneous SYSERR report and incorrect contant in new house system (thanks Vatiken)
|
||||
[Dec 06 2010] - Jamdog
|
||||
Added new mail system, with inbox OLC, index rebuilder and first mail (to ID 1)
|
||||
Bug-Fix: levels command wasn't showing max level, or validating high/low levels
|
||||
score <mob> now shows stats for the mobile (same as 'stat <mob>')
|
||||
[Dec 05 2010] - Jamdog
|
||||
Bug-Fix: 'Did you mean' now only shows commands you have access to (thanks Welcor)
|
||||
Bug-Fix: Fixed crash bug introduced by new house system when saving house contents
|
||||
|
|
|
@ -292,6 +292,7 @@ bool change_player_name(struct char_data *ch, struct char_data *vict, char *new_
|
|||
bool AddRecentPlayer(char *chname, char *chhost, bool newplr, bool cpyplr);
|
||||
void set_default_admin_privs(struct char_data *ch, bool keep_old);
|
||||
int get_admin_level_by_string(char *lv);
|
||||
void do_stat_character(struct char_data *ch, struct char_data *k);
|
||||
/* Functions with subcommands */
|
||||
/* do_date */
|
||||
ACMD(do_date);
|
||||
|
|
|
@ -801,8 +801,11 @@ ACMD(do_score)
|
|||
}
|
||||
}
|
||||
|
||||
if (IS_NPC(vict))
|
||||
if (IS_NPC(vict)) {
|
||||
send_to_char(ch, "Stats for: %s\r\n", GET_NAME(vict));
|
||||
do_stat_character(ch, vict);
|
||||
return;
|
||||
}
|
||||
if (ch != vict)
|
||||
send_to_char(ch, "Score for: %s %s (level %d)\r\n", GET_NAME(vict), GET_TITLE(vict), GET_LEVEL(vict));
|
||||
|
||||
|
@ -1723,7 +1726,7 @@ ACMD(do_levels)
|
|||
{
|
||||
char buf[MAX_STRING_LENGTH], arg[MAX_STRING_LENGTH];
|
||||
size_t len = 0, nlen;
|
||||
int i, ret, min_lev=1, max_lev=CONFIG_MAX_LEVEL, val;
|
||||
int i, ret, min_lev=1, max_lev=CONFIG_MAX_LEVEL, val, tmp;
|
||||
|
||||
if (IS_NPC(ch)) {
|
||||
send_to_char(ch, "You ain't nothin' but a hound-dog.\r\n");
|
||||
|
@ -1757,14 +1760,25 @@ ACMD(do_levels)
|
|||
send_to_char(ch, "Displays exp required for levels.\r\n");
|
||||
send_to_char(ch, "%slevels %s- shows all levels (1-%d)\r\n", QCYN, QNRM, CONFIG_MAX_LEVEL);
|
||||
send_to_char(ch, "%slevels 5 %s- shows 5 levels either side of your current level\r\n", QCYN, QNRM);
|
||||
send_to_char(ch, "%slevels 10-40 %s- shows level 10 to level 40\r\n",QCYN, QNRM);
|
||||
send_to_char(ch, "%slevels 10-20 %s- shows level 10 to level 20\r\n",QCYN, QNRM);
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* If max and min are wrong way round, swap them */
|
||||
if (max_lev > min_lev) {
|
||||
tmp = min_lev;
|
||||
min_lev = max_lev;
|
||||
max_lev = tmp;
|
||||
}
|
||||
|
||||
for (i = min_lev; i < max_lev; i++) {
|
||||
for (i = min_lev; i <= max_lev; i++) {
|
||||
if (i < CONFIG_MAX_LEVEL) {
|
||||
nlen = snprintf(buf + len, sizeof(buf) - len, "[%2d] %8d-%-8d : ", (int)i,
|
||||
level_exp(GET_CLASS(ch), i), level_exp(GET_CLASS(ch), i + 1) - 1);
|
||||
} else {
|
||||
nlen = snprintf(buf + len, sizeof(buf) - len, "[%2d] %8d : ", (int)i,
|
||||
level_exp(GET_CLASS(ch), i));
|
||||
}
|
||||
if (len + nlen >= sizeof(buf))
|
||||
break;
|
||||
len += nlen;
|
||||
|
|
|
@ -40,7 +40,6 @@ static void perform_immort_invis(struct char_data *ch, int level);
|
|||
static void list_zone_commands_room(struct char_data *ch, room_vnum rvnum);
|
||||
static void do_stat_room(struct char_data *ch, struct room_data *rm);
|
||||
static void do_stat_object(struct char_data *ch, struct obj_data *j);
|
||||
static void do_stat_character(struct char_data *ch, struct char_data *k);
|
||||
static void stop_snooping(struct char_data *ch);
|
||||
static size_t print_zone_to_buf(char *bufptr, size_t left, zone_rnum zone, int listall);
|
||||
static struct char_data *is_in_game(long idnum);
|
||||
|
@ -747,7 +746,7 @@ static void do_stat_object(struct char_data *ch, struct obj_data *j)
|
|||
do_sstat_object(ch, j);
|
||||
}
|
||||
|
||||
static void do_stat_character(struct char_data *ch, struct char_data *k)
|
||||
void do_stat_character(struct char_data *ch, struct char_data *k)
|
||||
{
|
||||
char buf[MAX_STRING_LENGTH];
|
||||
int i, i2, column, found = FALSE;
|
||||
|
|
|
@ -590,7 +590,7 @@ const char *house_bits[] = {
|
|||
const char *house_types[] = {
|
||||
"PLAYER_OWNED",
|
||||
"IMM_OWNED",
|
||||
"CLAN_OWNED",
|
||||
"PLAYER_SHOP",
|
||||
"\n"
|
||||
};
|
||||
|
||||
|
|
|
@ -647,7 +647,7 @@ void House_boot(void)
|
|||
/* We didn't reach the end of the file, so start a new house */
|
||||
clear_house_control_data(&temp_house);
|
||||
temp_house.vnum = atoi(line+1);
|
||||
}
|
||||
} else {
|
||||
tag_argument(line, tag);
|
||||
|
||||
switch (*tag) {
|
||||
|
@ -703,6 +703,7 @@ void House_boot(void)
|
|||
log("SYSERR: Unknown tag %s in house control file %s", tag, HCONTROL_FILE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* End of file incorrectly reached, warn, tidy up, and get out */
|
||||
log("SYSERR: End of house control file reached before '$'");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue