diff --git a/src/act.h b/src/act.h index c3529ac..de28379 100644 --- a/src/act.h +++ b/src/act.h @@ -90,7 +90,6 @@ ACMD(do_gold); ACMD(do_help); ACMD(do_history); ACMD(do_inventory); -ACMD(do_levels); ACMD(do_scan); ACMD(do_score); ACMD(do_time); @@ -239,7 +238,6 @@ ACMD(do_sneak); ACMD(do_perception); ACMD(do_split); ACMD(do_steal); -ACMD(do_title); ACMD(do_visible); @@ -298,11 +296,10 @@ ACMD(do_shutdown); ACMD(do_wizutil); #define SCMD_REROLL 0 #define SCMD_PARDON 1 -#define SCMD_NOTITLE 2 -#define SCMD_MUTE 3 -#define SCMD_FREEZE 4 -#define SCMD_THAW 5 -#define SCMD_UNAFFECT 6 +#define SCMD_MUTE 2 +#define SCMD_FREEZE 3 +#define SCMD_THAW 4 +#define SCMD_UNAFFECT 5 /* Functions without subcommands */ ACMD(do_acaudit); ACMD(do_advance); diff --git a/src/act.informative.c b/src/act.informative.c index 8f09844..49b48d3 100644 --- a/src/act.informative.c +++ b/src/act.informative.c @@ -411,7 +411,7 @@ static void list_one_char(struct char_data *i, struct char_data *ch) if (IS_NPC(i)) send_to_char(ch, "%c%s", UPPER(*i->player.short_descr), i->player.short_descr + 1); else - send_to_char(ch, "%s%s%s", i->player.name, *GET_TITLE(i) ? " " : "", GET_TITLE(i)); + send_to_char(ch, "%s", i->player.name); if (AFF_FLAGGED(i, AFF_INVISIBLE)) send_to_char(ch, " (invisible)"); @@ -1241,7 +1241,7 @@ ACMD(do_who) int i, num_can_see = 0; char name_search[MAX_INPUT_LENGTH], buf[MAX_INPUT_LENGTH]; char mode; - int low = 0, high = LVL_IMPL, localwho = 0, questwho = 0; + int low = 0, high = LVL_IMPL + 1, localwho = 0, questwho = 0; int showclass = 0, short_list = 0, outlaws = 0; int who_room = 0, showgroup = 0, showleader = 0; @@ -1249,10 +1249,10 @@ ACMD(do_who) char *disp; int min_level; int max_level; - int count; /* must always start as 0 */ + int count; } rank[] = { - { "Immortals\r\n---------\r\n", LVL_IMMORT, LVL_IMPL, 0}, - { "Mortals\r\n-------\r\n", 1, LVL_IMMORT - 1, 0 }, + { "Immortals\r\n---------\r\n", LVL_IMMORT, LVL_IMPL, 0 }, /* 2–5 */ + { "Mortals\r\n-------\r\n", 1, LVL_IMMORT - 1, 0 }, /* 1 */ { "\n", 0, 0, 0 } }; @@ -1322,8 +1322,7 @@ ACMD(do_who) continue; if (CAN_SEE(ch, tch) && IS_PLAYING(d)) { - if (*name_search && str_cmp(GET_NAME(tch), name_search) && - !strstr(GET_TITLE(tch), name_search)) + if (*name_search && str_cmp(GET_NAME(tch), name_search)) continue; if (!CAN_SEE(ch, tch) || GET_LEVEL(tch) < low || GET_LEVEL(tch) > high) continue; @@ -1362,12 +1361,14 @@ ACMD(do_who) else if (!(tch = d->character)) continue; + log("WHO: tch=%s lvl=%d checking rank[%d]: min=%d max=%d", + GET_NAME(tch), GET_LEVEL(tch), i, rank[i].min_level, rank[i].max_level); + if ((GET_LEVEL(tch) < rank[i].min_level || GET_LEVEL(tch) > rank[i].max_level) && !short_list) continue; if (!IS_PLAYING(d)) continue; - if (*name_search && str_cmp(GET_NAME(tch), name_search) && - !strstr(GET_TITLE(tch), name_search)) + if (*name_search && str_cmp(GET_NAME(tch), name_search)) continue; if (!CAN_SEE(ch, tch) || GET_LEVEL(tch) < low || GET_LEVEL(tch) > high) continue; @@ -1393,11 +1394,10 @@ ACMD(do_who) CCNRM(ch, C_SPR), ((!(++num_can_see % 4)) ? "\r\n" : "")); } else { num_can_see++; - send_to_char(ch, "%s[%2d %s] %s%s%s%s", + send_to_char(ch, "%s[%2d %s] %s%s", (GET_LEVEL(tch) >= LVL_IMMORT ? CCYEL(ch, C_SPR) : ""), GET_LEVEL(tch), CLASS_ABBR(tch), - GET_NAME(tch), (*GET_TITLE(tch) ? " " : ""), GET_TITLE(tch), - CCNRM(ch, C_SPR)); + GET_NAME(tch), CCNRM(ch, C_SPR)); if (GET_INVIS_LEV(tch)) send_to_char(ch, " (i%d)", GET_INVIS_LEV(tch)); @@ -1863,79 +1863,6 @@ ACMD(do_where) perform_mortal_where(ch, arg); } -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=LVL_IMMORT, val; - - if (IS_NPC(ch)) { - send_to_char(ch, "You ain't nothin' but a hound-dog.\r\n"); - return; - } - one_argument(argument, arg); - - if (*arg) { - if (isdigit(*arg)) { - ret = sscanf(arg, "%d-%d", &min_lev, &max_lev); - if (ret == 0) { - /* No valid args found */ - min_lev = 1; - max_lev = LVL_IMMORT; - } - else if (ret == 1) { - /* One arg = range is (num) either side of current level */ - val = min_lev; - max_lev = MIN(GET_LEVEL(ch) + val, LVL_IMMORT); - min_lev = MAX(GET_LEVEL(ch) - val, 1); - } - else if (ret == 2) { - /* Two args = min-max range limit - just do sanity checks */ - min_lev = MAX(min_lev, 1); - max_lev = MIN(max_lev + 1, LVL_IMMORT); - } - } - else - { - send_to_char(ch, "Usage: %slevels [- | ]%s\r\n\r\n", QYEL, QNRM); - 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, (LVL_IMMORT-1)); - 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); - return; - } - } - - for (i = min_lev; i < max_lev; i++) { - 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); - if (len + nlen >= sizeof(buf)) - break; - len += nlen; - - switch (GET_SEX(ch)) { - case SEX_MALE: - case SEX_NEUTRAL: - nlen = snprintf(buf + len, sizeof(buf) - len, "%s\r\n", title_male(GET_CLASS(ch), i)); - break; - case SEX_FEMALE: - nlen = snprintf(buf + len, sizeof(buf) - len, "%s\r\n", title_female(GET_CLASS(ch), i)); - break; - default: - nlen = snprintf(buf + len, sizeof(buf) - len, "Oh dear. You seem to be sexless.\r\n"); - break; - } - if (len + nlen >= sizeof(buf)) - break; - len += nlen; - } - - if (len < sizeof(buf) && max_lev == LVL_IMMORT) - snprintf(buf + len, sizeof(buf) - len, "[%2d] %8d : Immortality\r\n", - LVL_IMMORT, level_exp(GET_CLASS(ch), LVL_IMMORT)); - page_string(ch->desc, buf, TRUE); -} - ACMD(do_consider) { char buf[MAX_INPUT_LENGTH]; @@ -2541,8 +2468,7 @@ ACMD(do_whois) /* We either have our victim from file or he's playing or function has returned. */ sprinttype(GET_SEX(victim), genders, buf, sizeof(buf)); - send_to_char(ch, "Name: %s %s\r\nSex: %s\r\n", GET_NAME(victim), - (victim->player.title ? victim->player.title : ""), buf); + send_to_char(ch, "Name: %s\r\nSex: %s\r\n", GET_NAME(victim), buf); sprinttype (victim->player.chclass, pc_class_types, buf, sizeof(buf)); send_to_char(ch, "Class: %s\r\n", buf); diff --git a/src/act.other.c b/src/act.other.c index f96545c..c4d5060 100644 --- a/src/act.other.c +++ b/src/act.other.c @@ -543,26 +543,6 @@ ACMD(do_visible) send_to_char(ch, "You are already visible.\r\n"); } -ACMD(do_title) -{ - skip_spaces(&argument); - delete_doubledollar(argument); - parse_at(argument); - - if (IS_NPC(ch)) - send_to_char(ch, "Your title is fine... go away.\r\n"); - else if (PLR_FLAGGED(ch, PLR_NOTITLE)) - send_to_char(ch, "You can't title yourself -- you shouldn't have abused it!\r\n"); - else if (strstr(argument, "(") || strstr(argument, ")")) - send_to_char(ch, "Titles can't contain the ( or ) characters.\r\n"); - else if (strlen(argument) > MAX_TITLE_LENGTH) - send_to_char(ch, "Sorry, titles can't be longer than %d characters.\r\n", MAX_TITLE_LENGTH); - else { - set_title(ch, argument); - send_to_char(ch, "Okay, you're now %s%s%s.\r\n", GET_NAME(ch), *GET_TITLE(ch) ? " " : "", GET_TITLE(ch)); - } -} - static void print_group(struct char_data *ch) { struct char_data * k; diff --git a/src/act.wizard.c b/src/act.wizard.c index 7aed859..79f472e 100644 --- a/src/act.wizard.c +++ b/src/act.wizard.c @@ -2774,12 +2774,6 @@ ACMD(do_wizutil) send_to_char(vict, "You have been pardoned by the Gods!\r\n"); mudlog(BRF, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s pardoned by %s", GET_NAME(vict), GET_NAME(ch)); break; - case SCMD_NOTITLE: - result = PLR_TOG_CHK(vict, PLR_NOTITLE); - mudlog(NRM, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "(GC) Notitle %s for %s by %s.", - ONOFF(result), GET_NAME(vict), GET_NAME(ch)); - send_to_char(ch, "(GC) Notitle %s for %s by %s.\r\n", ONOFF(result), GET_NAME(vict), GET_NAME(ch)); - break; case SCMD_MUTE: result = PLR_TOG_CHK(vict, PLR_NOSHOUT); mudlog(BRF, MAX(LVL_GOD, GET_INVIS_LEV(ch)), TRUE, "(GC) Mute %s for %s by %s.", @@ -3289,12 +3283,11 @@ static struct set_struct { { "str", LVL_BUILDER, BOTH, NUMBER }, { "thief", LVL_GOD, PC, BINARY }, { "thirst", LVL_BUILDER, BOTH, MISC }, /* 50 */ - { "title", LVL_GOD, PC, MISC }, { "variable", LVL_GRGOD, PC, MISC }, { "weight", LVL_BUILDER, BOTH, NUMBER }, { "wis", LVL_BUILDER, BOTH, NUMBER }, - { "questpoints", LVL_GOD, PC, NUMBER }, /* 55 */ - { "questhistory", LVL_GOD, PC, NUMBER }, + { "questpoints", LVL_GOD, PC, NUMBER }, + { "questhistory", LVL_GOD, PC, NUMBER }, /* 55 */ { "\n", 0, BOTH, MISC } }; @@ -3737,17 +3730,13 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c return (0); } break; - case 49: /* title */ - set_title(vict, val_arg); - send_to_char(ch, "%s's title is now: %s\r\n", GET_NAME(vict), GET_TITLE(vict)); - break; - case 50: /* variable */ + case 49: /* variable */ return perform_set_dg_var(ch, vict, val_arg); - case 51: /* weight */ + case 50: /* weight */ GET_WEIGHT(vict) = value; affect_total(vict); break; - case 52: /* wis */ + case 51: /* wis */ if (IS_NPC(vict) || GET_LEVEL(vict) >= LVL_GRGOD) RANGE(3, 25); else @@ -3755,10 +3744,10 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c vict->real_abils.wis = value; affect_total(vict); break; - case 53: /* questpoints */ + case 52: /* questpoints */ GET_QUESTPOINTS(vict) = RANGE(0, 100000000); break; - case 54: /* questhistory */ + case 53: /* questhistory */ qvnum = atoi(val_arg); if (real_quest(qvnum) == NOTHING) { send_to_char(ch, "That quest doesn't exist.\r\n"); diff --git a/src/class.c b/src/class.c index 3a3d593..39cc3a1 100644 --- a/src/class.c +++ b/src/class.c @@ -274,7 +274,6 @@ void do_start(struct char_data *ch) GET_LEVEL(ch) = 1; GET_EXP(ch) = 1; - set_title(ch, NULL); roll_real_abils(ch); GET_MAX_HIT(ch) = 90; @@ -787,177 +786,3 @@ int level_exp(int chclass, int level) return 123456; } -/* Default titles of male characters. */ -const char *title_male(int chclass, int level) -{ - if (level <= 0 || level > LVL_IMPL) - return "the Man"; - if (level == LVL_IMPL) - return "the Implementor"; - - switch (chclass) { - - case CLASS_SORCEROR: - switch (level) { - case 1: return "the Apprentice of Magic"; - case LVL_IMMORT: return "the Immortal Warlock"; - case LVL_GOD: return "the Avatar of Magic"; - case LVL_GRGOD: return "the God of Magic"; - default: return "the Sorceror"; - } - - case CLASS_CLERIC: - switch (level) { - case 1: return "the Believer"; - case LVL_IMMORT: return "the Immortal Cardinal"; - case LVL_GOD: return "the Inquisitor"; - case LVL_GRGOD: return "the God of Good and Evil"; - default: return "the Cleric"; - } - - case CLASS_ROGUE: - switch (level) { - case 1: return "the Pilferer"; - case LVL_IMMORT: return "the Immortal Assassin"; - case LVL_GOD: return "the Demi God of Thieves"; - case LVL_GRGOD: return "the God of Thieves and Tradesmen"; - default: return "the Rogue"; - } - - case CLASS_FIGHTER: - switch(level) { - case 1: return "the Swordpupil"; - case LVL_IMMORT: return "the Immortal Warlord"; - case LVL_GOD: return "the Extirpator"; - case LVL_GRGOD: return "the God of War"; - default: return "the Fighter"; - } - - case CLASS_BARBARIAN: - switch(level) { - case 1: return "the Savage"; - case LVL_IMMORT: return "the Immortal Conquerer"; - case LVL_GOD: return "the Primal"; - case LVL_GRGOD: return "the God of Blood and Thunder"; - default: return "the Barbarian"; - } - - case CLASS_RANGER: - switch(level) { - case 1: return "the Pathfinder"; - case LVL_IMMORT: return "the Immortal Trapmaster"; - case LVL_GOD: return "the Wanderer"; - case LVL_GRGOD: return "the God of the Hunt"; - default: return "the Ranger"; - } - - case CLASS_BARD: - switch(level) { - case 1: return "the Singer"; - case LVL_IMMORT: return "the Immortal Songwriter"; - case LVL_GOD: return "the Musician"; - case LVL_GRGOD: return "the God of Ballads"; - default: return "the Bard"; - } - - case CLASS_DRUID: - switch(level) { - case 1: return "the Communer"; - case LVL_IMMORT: return "the Immortal Augur"; - case LVL_GOD: return "the Naturophile"; - case LVL_GRGOD: return "the God of Nature"; - default: return "the Druid"; - } - } - - /* Default title for classes which do not have titles defined */ - return "the Classless"; -} - -/* Default titles of female characters. */ -const char *title_female(int chclass, int level) -{ - if (level <= 0 || level > LVL_IMPL) - return "the Woman"; - if (level == LVL_IMPL) - return "the Implementress"; - - switch (chclass) { - - case CLASS_SORCEROR: - switch (level) { - case 1: return "the Apprentice of Magic"; - case LVL_IMMORT: return "the Immortal Enchantress"; - case LVL_GOD: return "the Empress of Magic"; - case LVL_GRGOD: return "the Goddess of Magic"; - default: return "the Witch"; - } - - case CLASS_CLERIC: - switch (level) { - case 1: return "the Believer"; - case LVL_IMMORT: return "the Immortal Priestess"; - case LVL_GOD: return "the Inquisitress"; - case LVL_GRGOD: return "the Goddess of Good and Evil"; - default: return "the Cleric"; - } - - case CLASS_ROGUE: - switch (level) { - case 1: return "the Pilferess"; - case LVL_IMMORT: return "the Immortal Assassin"; - case LVL_GOD: return "the Demi Goddess of Thieves"; - case LVL_GRGOD: return "the Goddess of Thieves and Tradesmen"; - default: return "the Rogue"; - } - - case CLASS_FIGHTER: - switch(level) { - case 1: return "the Swordpupil"; - case LVL_IMMORT: return "the Immortal Lady of War"; - case LVL_GOD: return "the Queen of Destruction"; - case LVL_GRGOD: return "the Goddess of War"; - default: return "the Fighter"; - } - - case CLASS_BARBARIAN: - switch(level) { - case 1: return "the Savage"; - case LVL_IMMORT: return "the Immortal Conquerer"; - case LVL_GOD: return "the Primal"; - case LVL_GRGOD: return "the Goddess of Blood and Thunder"; - default: return "the Barbarian"; - } - - case CLASS_RANGER: - switch(level) { - case 1: return "the Pathfinder"; - case LVL_IMMORT: return "the Immortal Trapmaster"; - case LVL_GOD: return "the Wanderer"; - case LVL_GRGOD: return "the Goddess of the Hunt"; - default: return "the Ranger"; - } - - case CLASS_BARD: - switch(level) { - case 1: return "the Singer"; - case LVL_IMMORT: return "the Immortal Songwriter"; - case LVL_GOD: return "the Musician"; - case LVL_GRGOD: return "the Goddess of Ballads"; - default: return "the Bard"; - } - - case CLASS_DRUID: - switch(level) { - case 1: return "the Communer"; - case LVL_IMMORT: return "the Immortal Augur"; - case LVL_GOD: return "the Naturophile"; - case LVL_GRGOD: return "the Goddess of Nature"; - default: return "the Druid"; - } - } - - /* Default title for classes which do not have titles defined */ - return "the Classless"; -} - diff --git a/src/class.h b/src/class.h index ef12fd4..35152ec 100644 --- a/src/class.h +++ b/src/class.h @@ -21,8 +21,6 @@ int invalid_class(struct char_data *ch, struct obj_data *obj); int level_exp(int chclass, int level); int parse_class(char arg); void roll_real_abils(struct char_data *ch); -const char *title_female(int chclass, int level); -const char *title_male(int chclass, int level); /* Global variables */ diff --git a/src/constants.c b/src/constants.c index 9657d92..2164c80 100644 --- a/src/constants.c +++ b/src/constants.c @@ -198,7 +198,6 @@ const char *player_bits[] = { "CSH", "SITEOK", "NOSHOUT", - "NOTITLE", "DELETED", "LOADRM", "NO_WIZL", diff --git a/src/db.c b/src/db.c index 5286d80..4154177 100644 --- a/src/db.c +++ b/src/db.c @@ -587,8 +587,6 @@ void destroy_db(void) for (cnt = 0; cnt <= top_of_mobt; cnt++) { if (mob_proto[cnt].player.name) free(mob_proto[cnt].player.name); - if (mob_proto[cnt].player.title) - free(mob_proto[cnt].player.title); if (mob_proto[cnt].player.short_descr) free(mob_proto[cnt].player.short_descr); if (mob_proto[cnt].player.long_descr) @@ -1778,7 +1776,6 @@ void parse_mobile(FILE *mob_f, int nr) *tmpptr = LOWER(*tmpptr); mob_proto[i].player.long_descr = fread_string(mob_f, buf2); mob_proto[i].player.description = fread_string(mob_f, buf2); - GET_TITLE(mob_proto + i) = NULL; /* Numeric data */ if (!get_line(mob_f, line)) { @@ -3390,8 +3387,6 @@ void free_char(struct char_data *ch) /* if this is a player, or a non-prototyped non-player, free all */ if (GET_NAME(ch)) free(GET_NAME(ch)); - if (ch->player.title) - free(ch->player.title); if (ch->player.short_descr) free(ch->player.short_descr); if (ch->player.long_descr) @@ -3412,8 +3407,6 @@ void free_char(struct char_data *ch) /* otherwise, free strings only if the string is not pointing at proto */ if (ch->player.name && ch->player.name != mob_proto[i].player.name) free(ch->player.name); - if (ch->player.title && ch->player.title != mob_proto[i].player.title) - free(ch->player.title); if (ch->player.short_descr && ch->player.short_descr != mob_proto[i].player.short_descr) free(ch->player.short_descr); if (ch->player.long_descr && ch->player.long_descr != mob_proto[i].player.long_descr) @@ -3659,7 +3652,6 @@ void init_char(struct char_data *ch) GET_MOVE(ch) = GET_MAX_MOVE(ch); } - set_title(ch, NULL); ch->player.short_descr = NULL; ch->player.long_descr = NULL; ch->player.description = NULL; diff --git a/src/dg_mobcmd.c b/src/dg_mobcmd.c index 5503046..ba5e25d 100644 --- a/src/dg_mobcmd.c +++ b/src/dg_mobcmd.c @@ -942,8 +942,6 @@ ACMD(do_mtransform) the strings so we don't end up free'ing the prototypes later */ if(m->player.name) tmpmob.player.name = strdup(m->player.name); - if(m->player.title) - tmpmob.player.title = strdup(m->player.title); if(m->player.short_descr) tmpmob.player.short_descr = strdup(m->player.short_descr); if(m->player.long_descr) diff --git a/src/dg_variables.c b/src/dg_variables.c index 54984db..cb1a075 100644 --- a/src/dg_variables.c +++ b/src/dg_variables.c @@ -1041,13 +1041,6 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig, } snprintf(str, slen, "%d", GET_COND(c, THIRST)); } - else if (!str_cmp(field, "title")) { - if (!IS_NPC(c) && subfield && *subfield && valid_dg_target(c, DG_ALLOW_GODS)) { - if (GET_TITLE(c)) free(GET_TITLE(c)); - GET_TITLE(c) = strdup(subfield); - } - snprintf(str, slen, "%s", IS_NPC(c) ? "" : GET_TITLE(c)); - } break; case 'v': if (!str_cmp(field, "varexists")) { diff --git a/src/genmob.c b/src/genmob.c index b986b68..b02d531 100644 --- a/src/genmob.c +++ b/src/genmob.c @@ -112,10 +112,6 @@ static void extract_mobile_all(mob_vnum vnum) free(ch->player.name); ch->player.name = NULL; - if (ch->player.title && ch->player.title != mob_proto[i].player.title) - free(ch->player.title); - ch->player.title = NULL; - if (ch->player.short_descr && ch->player.short_descr != mob_proto[i].player.short_descr) free(ch->player.short_descr); ch->player.short_descr = NULL; @@ -199,8 +195,6 @@ int copy_mobile_strings(struct char_data *t, struct char_data *f) { if (f->player.name) t->player.name = strdup(f->player.name); - if (f->player.title) - t->player.title = strdup(f->player.title); if (f->player.short_descr) t->player.short_descr = strdup(f->player.short_descr); if (f->player.long_descr) @@ -214,8 +208,6 @@ int update_mobile_strings(struct char_data *t, struct char_data *f) { if (f->player.name) t->player.name = f->player.name; - if (f->player.title) - t->player.title = f->player.title; if (f->player.short_descr) t->player.short_descr = f->player.short_descr; if (f->player.long_descr) @@ -229,8 +221,6 @@ int free_mobile_strings(struct char_data *mob) { if (mob->player.name) free(mob->player.name); - if (mob->player.title) - free(mob->player.title); if (mob->player.short_descr) free(mob->player.short_descr); if (mob->player.long_descr) @@ -257,8 +247,6 @@ int free_mobile(struct char_data *mob) } else { /* Prototyped mobile. */ if (mob->player.name && mob->player.name != mob_proto[i].player.name) free(mob->player.name); - if (mob->player.title && mob->player.title != mob_proto[i].player.title) - free(mob->player.title); if (mob->player.short_descr && mob->player.short_descr != mob_proto[i].player.short_descr) free(mob->player.short_descr); if (mob->player.long_descr && mob->player.long_descr != mob_proto[i].player.long_descr) diff --git a/src/interpreter.c b/src/interpreter.c index bffa33e..3c4793f 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -209,7 +209,6 @@ cpp_extern const struct command_info cmd_info[] = { { "noshout" , "noshout" , POS_SLEEPING, do_gen_tog , 1, SCMD_NOSHOUT }, { "nosummon" , "nosummon", POS_DEAD , do_gen_tog , 1, SCMD_NOSUMMON }, { "notell" , "notell" , POS_DEAD , do_gen_tog , 1, SCMD_NOTELL }, - { "notitle" , "notitle" , POS_DEAD , do_wizutil , LVL_IMMORT, SCMD_NOTITLE }, { "nowiz" , "nowiz" , POS_DEAD , do_gen_tog , LVL_IMMORT, SCMD_NOWIZ }, { "open" , "o" , POS_SITTING , do_gen_door , 0, SCMD_OPEN }, @@ -298,7 +297,6 @@ cpp_extern const struct command_info cmd_info[] = { { "tedit" , "tedit" , POS_DEAD , do_tedit , LVL_GOD, 0 }, /* XXX: Oasisify */ { "thaw" , "thaw" , POS_DEAD , do_wizutil , LVL_GRGOD, SCMD_THAW }, { "think" , "thin" , POS_RESTING , do_think , 0, 0 }, - { "title" , "title" , POS_DEAD , do_title , LVL_IMMORT, 0 }, { "time" , "time" , POS_DEAD , do_time , 0, 0 }, { "toggle" , "toggle" , POS_DEAD , do_toggle , 0, 0 }, { "track" , "track" , POS_STANDING, do_track , 0, 0 }, diff --git a/src/limits.c b/src/limits.c index 1d4d8a9..15c1e4f 100644 --- a/src/limits.c +++ b/src/limits.c @@ -178,23 +178,6 @@ int move_gain(struct char_data *ch) return (gain); } -void set_title(struct char_data *ch, char *title) -{ - if (GET_TITLE(ch) != NULL) - free(GET_TITLE(ch)); - - if (title == NULL) { - GET_TITLE(ch) = strdup(GET_SEX(ch) == SEX_FEMALE ? - title_female(GET_CLASS(ch), GET_LEVEL(ch)) : - title_male(GET_CLASS(ch), GET_LEVEL(ch))); - } else { - if (strlen(title) > MAX_TITLE_LENGTH) - title[MAX_TITLE_LENGTH] = '\0'; - - GET_TITLE(ch) = strdup(title); - } -} - void run_autowiz(void) { #if defined(CIRCLE_UNIX) || defined(CIRCLE_WINDOWS) @@ -317,7 +300,6 @@ void gain_exp(struct char_data *ch, int gain) send_to_char(ch, "You rise a level!\r\n"); else send_to_char(ch, "You rise %d levels!\r\n", num_levels); - set_title(ch, NULL); if (GET_LEVEL(ch) >= LVL_IMMORT && !PLR_FLAGGED(ch, PLR_NOWIZLIST)) run_autowiz(); } @@ -356,7 +338,6 @@ void gain_exp_regardless(struct char_data *ch, int gain) send_to_char(ch, "You rise a level!\r\n"); else send_to_char(ch, "You rise %d levels!\r\n", num_levels); - set_title(ch, NULL); } } if (GET_LEVEL(ch) >= LVL_IMMORT && !PLR_FLAGGED(ch, PLR_NOWIZLIST)) diff --git a/src/modify.c b/src/modify.c index 34ad29c..8b270bc 100644 --- a/src/modify.c +++ b/src/modify.c @@ -42,7 +42,6 @@ static const char *string_fields[] = "short", "long", "description", - "title", "delete-description", "\n" }; diff --git a/src/players.c b/src/players.c index a554b00..e81f85c 100644 --- a/src/players.c +++ b/src/players.c @@ -450,7 +450,6 @@ int load_char(const char *name, struct char_data *ch) else if (!strcmp(tag, "Thr3")) GET_SAVE(ch, 2) = atoi(line); else if (!strcmp(tag, "Thr4")) GET_SAVE(ch, 3) = atoi(line); else if (!strcmp(tag, "Thr5")) GET_SAVE(ch, 4) = atoi(line); - else if (!strcmp(tag, "Titl")) GET_TITLE(ch) = strdup(line); else if (!strcmp(tag, "Trig") && CONFIG_SCRIPT_PLAYERS) { if ((t_rnum = real_trigger(atoi(line))) != NOTHING) { t = read_trigger(t_rnum); @@ -572,7 +571,6 @@ void save_char(struct char_data * ch) if (GET_NAME(ch)) fprintf(fl, "Name: %s\n", GET_NAME(ch)); if (GET_PASSWD(ch)) fprintf(fl, "Pass: %s\n", GET_PASSWD(ch)); - if (GET_TITLE(ch)) fprintf(fl, "Titl: %s\n", GET_TITLE(ch)); if (ch->player.description && *ch->player.description) { strcpy(buf, ch->player.description); strip_cr(buf); diff --git a/src/structs.h b/src/structs.h index c18882f..2219602 100644 --- a/src/structs.h +++ b/src/structs.h @@ -202,18 +202,17 @@ #define PLR_CRASH 6 /**< Player needs to be crash-saved */ #define PLR_SITEOK 7 /**< Player has been site-cleared */ #define PLR_NOSHOUT 8 /**< Player not allowed to shout */ -#define PLR_NOTITLE 9 /**< Player not allowed to set title */ -#define PLR_DELETED 10 /**< Player deleted - space reusable */ -#define PLR_LOADROOM 11 /**< Player uses nonstandard loadroom */ -#define PLR_NOWIZLIST 12 /**< Player shouldn't be on wizlist */ -#define PLR_NODELETE 13 /**< Player shouldn't be deleted */ -#define PLR_INVSTART 14 /**< Player should enter game wizinvis */ -#define PLR_CRYO 15 /**< Player is cryo-saved (purge prog) */ -#define PLR_NOTDEADYET 16 /**< (R) Player being extracted */ -#define PLR_BUG 17 /**< Player is writing a bug */ -#define PLR_IDEA 18 /**< Player is writing an idea */ -#define PLR_TYPO 19 /**< Player is writing a typo */ -#define PLR_QUITING 20 /**< Player is quitting cleanly */ +#define PLR_DELETED 9 /**< Player deleted - space reusable */ +#define PLR_LOADROOM 10 /**< Player uses nonstandard loadroom */ +#define PLR_NOWIZLIST 11 /**< Player shouldn't be on wizlist */ +#define PLR_NODELETE 12 /**< Player shouldn't be deleted */ +#define PLR_INVSTART 13 /**< Player should enter game wizinvis */ +#define PLR_CRYO 14 /**< Player is cryo-saved (purge prog) */ +#define PLR_NOTDEADYET 15 /**< (R) Player being extracted */ +#define PLR_BUG 16 /**< Player is writing a bug */ +#define PLR_IDEA 17 /**< Player is writing an idea */ +#define PLR_TYPO 18 /**< Player is writing a typo */ +#define PLR_QUITING 19 /**< Player is quitting cleanly */ /* Mobile flags: used by char_data.char_specials.act */ #define MOB_SPEC 0 /**< Mob has a callable spec-proc */ @@ -616,7 +615,6 @@ #define MAX_MESSAGES 60 /**< Max Different attack message types */ #define MAX_NAME_LENGTH 20 /**< Max PC/NPC name length */ #define MAX_PWD_LENGTH 30 /**< Max PC password length */ -#define MAX_TITLE_LENGTH 80 /**< Max PC title length */ #define HOST_LENGTH 40 /**< Max hostname resolution length */ #define PLR_DESC_LENGTH 4096 /**< Max length for PC description */ #define MAX_SKILLS 200 /**< Max number of skills/spells */ @@ -881,7 +879,6 @@ struct char_player_data char *short_descr; /**< NPC 'actions' */ char *long_descr; /**< PC / NPC look description */ char *description; /**< NPC Extra descriptions */ - char *title; /**< PC / NPC title */ byte sex; /**< PC / NPC sex */ byte chclass; /**< PC / NPC class */ byte level; /**< PC / NPC level */ diff --git a/src/util/plrtoascii.c b/src/util/plrtoascii.c index 251c026..87c1cae 100755 --- a/src/util/plrtoascii.c +++ b/src/util/plrtoascii.c @@ -17,7 +17,6 @@ #define MAX_NAME_LENGTH 20 /* Used in char_file_u *DO*NOT*CHANGE* */ #define MAX_PWD_LENGTH 30 /* Used in char_file_u *DO*NOT*CHANGE* */ -#define MAX_TITLE_LENGTH 80 /* Used in char_file_u *DO*NOT*CHANGE* */ #define HOST_LENGTH 40 /* Used in char_file_u *DO*NOT*CHANGE* */ #define MAX_TONGUE 3 /* Used in char_file_u *DO*NOT*CHANGE* */ #define MAX_SKILLS 200 /* Used in char_file_u *DO*NOT*CHANGE* */ @@ -124,7 +123,6 @@ struct char_file_u_plrtoascii { /* char_player_data */ char name[MAX_NAME_LENGTH+1]; char description[PLR_DESC_LENGTH]; - char title[MAX_TITLE_LENGTH+1]; byte sex; byte chclass; byte level; @@ -195,7 +193,6 @@ void convert(char *filename) /* char_file_u */ fprintf(outfile, "Name: %s\n", player.name); fprintf(outfile, "Pass: %s\n", player.pwd); - fprintf(outfile, "Titl: %s\n", player.title); if (*player.description) fprintf(outfile, "Desc:\n%s~\n", player.description); if (player.sex != PFDEF_SEX) diff --git a/src/util/wld2html.c b/src/util/wld2html.c index 410d0bc..f5926af 100755 --- a/src/util/wld2html.c +++ b/src/util/wld2html.c @@ -220,7 +220,6 @@ void write_output(void) perror("opening output file"); exit(1); } - fprintf(fl, " %s \n", world[i].name); fprintf(fl, "

%s

\n", world[i].name); fprintf(fl, "
\n");
     fputs(world[i].description, fl);
diff --git a/src/utils.h b/src/utils.h
index 056ed01..f2b650f 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -166,7 +166,6 @@ int	perform_move(struct char_data *ch, int dir, int following);
 int	mana_gain(struct char_data *ch);
 int	hit_gain(struct char_data *ch);
 int	move_gain(struct char_data *ch);
-void	set_title(struct char_data *ch, char *title);
 void	gain_exp(struct char_data *ch, int gain);
 void	gain_exp_regardless(struct char_data *ch, int gain);
 void	gain_condition(struct char_data *ch, int condition, int value);
@@ -528,8 +527,6 @@ do                                                              \
 #define IS_NAME_MATCH(str, ch) \
   (isname((str), IS_NPC(ch) ? GET_KEYWORDS(ch) : GET_NAME(ch)))
 
-/** Title of PC */
-#define GET_TITLE(ch)   ((ch)->player.title)
 /** Level of PC or NPC. */
 #define GET_LEVEL(ch)   ((ch)->player.level)
 /** Password of PC. */