mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-22 05:50:48 +02:00
[Jan 05 2008] - Rumble
Fixed improper display of affections in stat player. (thanks Rhade) [Jan 04 2008] - Rumble Removed the unused npc_class_types. Fix to affect_update and affect_join. (thanks Kyle and Jamdog) [ 2007] - Rumble Removed the clsolc command. This option can still be set via "toggle clsolc." [Jan 03 2007] - Rumble PLR_NOWIZLIST actually used now to prevent run_autowiz. Several _FLAGGED checks that I fixed for 128 bit in the wrong SVN directory and failed to committ.
This commit is contained in:
parent
9336b21d40
commit
b8bf900585
15 changed files with 41 additions and 65 deletions
10
changelog
10
changelog
|
@ -5,6 +5,16 @@ The Builder Academy
|
|||
builderacademy.net 9091
|
||||
|
||||
tbaMUD 3.55
|
||||
[Jan 05 2008] - Rumble
|
||||
Fixed improper display of affections in stat player. (thanks Rhade)
|
||||
[Jan 04 2008] - Rumble
|
||||
Removed the unused npc_class_types.
|
||||
Fix to affect_update and affect_join. (thanks Kyle and Jamdog)
|
||||
[ 2007] - Rumble
|
||||
Removed the clsolc command. This option can still be set via "toggle clsolc."
|
||||
[Jan 03 2007] - Rumble
|
||||
PLR_NOWIZLIST actually used now to prevent run_autowiz.
|
||||
Several _FLAGGED checks that I fixed for 128 bit in the wrong SVN directory and failed to committ.
|
||||
[Dec 29 2007] - Rumble
|
||||
Fixed top_of_helpt bug being off by one. (thanks Jamdog)
|
||||
Fixed trigedit copy bug where it used real_room and not real_trigger. (thanks Jamdog)
|
||||
|
|
|
@ -4,11 +4,9 @@
|
|||
|
||||
Implementors
|
||||
~~~~~~~~~~~~
|
||||
Detta Rumble
|
||||
|
||||
Greater Gods
|
||||
~~~~~~~~~~~~
|
||||
Zizazat
|
||||
|
||||
Gods
|
||||
~~~~
|
||||
|
|
|
@ -1772,7 +1772,7 @@ ACMD(do_toggle)
|
|||
{
|
||||
char buf2[4], arg[MAX_INPUT_LENGTH], arg2[MAX_INPUT_LENGTH];
|
||||
int toggle, tp, wimp_lev, result = 0, len = 0;
|
||||
const char *types[] = { "off", "brief", "normal", "on", "\n" };
|
||||
const char *types[] = { "OFF", "BRIEF", "NORMAL", "ON", "\n" };
|
||||
|
||||
const struct {
|
||||
char *command;
|
||||
|
@ -1987,7 +1987,7 @@ ACMD(do_toggle)
|
|||
}
|
||||
|
||||
if (((tp = search_block(arg2, types, FALSE)) == -1)) {
|
||||
send_to_char(ch, "Usage: toggle color { Off | Normal | On }\r\n");
|
||||
send_to_char(ch, "Usage: toggle color { Off | Brief | Normal | On }\r\n");
|
||||
return;
|
||||
}
|
||||
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_COLOR_1);
|
||||
|
|
|
@ -810,9 +810,9 @@ void do_stat_character(struct char_data *ch, struct char_data *k)
|
|||
send_to_char(ch, "L-Des: %s", k->player.long_descr ? k->player.long_descr : "<None>\r\n");
|
||||
send_to_char(ch, "D-Des: %s", k->player.description ? k->player.description : "<None>\r\n");
|
||||
|
||||
sprinttype(k->player.chclass, IS_NPC(k) ? npc_class_types : pc_class_types, buf, sizeof(buf));
|
||||
send_to_char(ch, "%sClass: %s, Lev: [%s%2d%s], XP: [%s%7d%s], Align: [%4d]\r\n",
|
||||
IS_NPC(k) ? "Monster " : "", buf, CCYEL(ch, C_NRM), GET_LEVEL(k), CCNRM(ch, C_NRM),
|
||||
sprinttype(k->player.chclass, pc_class_types, buf, sizeof(buf));
|
||||
send_to_char(ch, "%s%s, Lev: [%s%2d%s], XP: [%s%7d%s], Align: [%4d]\r\n",
|
||||
IS_NPC(k) ? "Mobile" : "Class: ", IS_NPC(k) ? "" : buf, CCYEL(ch, C_NRM), GET_LEVEL(k), CCNRM(ch, C_NRM),
|
||||
CCYEL(ch, C_NRM), GET_EXP(k), CCNRM(ch, C_NRM), GET_ALIGNMENT(k));
|
||||
|
||||
if (!IS_NPC(k)) {
|
||||
|
@ -943,7 +943,7 @@ void do_stat_character(struct char_data *ch, struct char_data *k)
|
|||
if (aff->modifier)
|
||||
send_to_char(ch, ", ");
|
||||
|
||||
sprintbit(aff->bitvector, affected_bits, buf, sizeof(buf));
|
||||
strcpy(buf, affected_bits[aff->bitvector]);
|
||||
send_to_char(ch, "sets %s", buf);
|
||||
}
|
||||
send_to_char(ch, "\r\n");
|
||||
|
@ -1289,7 +1289,8 @@ ACMD(do_return)
|
|||
{
|
||||
if (!IS_NPC(ch) && !ch->desc->original) {
|
||||
do_cheat(ch);
|
||||
run_autowiz();
|
||||
if (!PLR_FLAGGED(ch, PLR_NOWIZLIST))
|
||||
run_autowiz();
|
||||
}
|
||||
|
||||
if (ch->desc && ch->desc->original) {
|
||||
|
@ -1556,7 +1557,8 @@ ACMD(do_advance)
|
|||
REMOVE_BIT_AR(PRF_FLAGS(victim), PRF_NOHASSLE);
|
||||
REMOVE_BIT_AR(PLR_FLAGS(victim), PRF_HOLYLIGHT);
|
||||
REMOVE_BIT_AR(PLR_FLAGS(victim), PRF_SHOWVNUMS);
|
||||
run_autowiz();
|
||||
if (!PLR_FLAGGED(victim, PLR_NOWIZLIST))
|
||||
run_autowiz();
|
||||
} else if (oldlevel < LVL_IMMORT && newlevel >= LVL_IMMORT) {
|
||||
SET_BIT_AR(PRF_FLAGS(victim), PRF_LOG2);
|
||||
SET_BIT_AR(PRF_FLAGS(victim), PRF_HOLYLIGHT);
|
||||
|
@ -1564,7 +1566,8 @@ ACMD(do_advance)
|
|||
SET_BIT_AR(PRF_FLAGS(victim), PRF_AUTOEXIT);
|
||||
for (i = 1; i <= MAX_SKILLS; i++)
|
||||
SET_SKILL(victim, i, 100);
|
||||
run_autowiz();
|
||||
if (!PLR_FLAGGED(victim, PLR_NOWIZLIST))
|
||||
run_autowiz();
|
||||
GET_OLC_ZONE(victim) = NOWHERE;
|
||||
}
|
||||
|
||||
|
@ -1615,7 +1618,7 @@ ACMD(do_restore)
|
|||
|
||||
void perform_immort_vis(struct char_data *ch)
|
||||
{
|
||||
if (GET_INVIS_LEV(ch) == 0 && !AFF_FLAGGED(ch, AFF_HIDE | AFF_INVISIBLE)) {
|
||||
if ((GET_INVIS_LEV(ch) == 0) && (!AFF_FLAGGED(ch, AFF_HIDE) || !AFF_FLAGGED(ch, AFF_INVISIBLE))) {
|
||||
send_to_char(ch, "You are already fully visible.\r\n");
|
||||
return;
|
||||
}
|
||||
|
@ -2304,7 +2307,7 @@ ACMD(do_wizutil)
|
|||
GET_DEX(vict), GET_CON(vict), GET_CHA(vict));
|
||||
break;
|
||||
case SCMD_PARDON:
|
||||
if (!PLR_FLAGGED(vict, PLR_THIEF | PLR_KILLER)) {
|
||||
if (!PLR_FLAGGED(vict, PLR_THIEF) || !PLR_FLAGGED(vict, PLR_KILLER)) {
|
||||
send_to_char(ch, "Your victim is not flagged.\r\n");
|
||||
return;
|
||||
}
|
||||
|
@ -3475,9 +3478,8 @@ ACMD (do_zcheck)
|
|||
len += snprintf(buf + len, sizeof(buf) - len,
|
||||
"- Needs to be fixed - %sAutogenerate!%s\r\n", CCYEL(ch, C_NRM), CCNRM(ch, C_NRM));
|
||||
|
||||
if (MOB_FLAGGED(mob, MOB_AGGRESSIVE) &&
|
||||
MOB_FLAGGED(mob, MOB_AGGR_GOOD | MOB_AGGR_EVIL | MOB_AGGR_NEUTRAL) && (found=1))
|
||||
len += snprintf(buf + len, sizeof(buf) - len,
|
||||
if (MOB_FLAGGED(mob, MOB_AGGRESSIVE) && (MOB_FLAGGED(mob, MOB_AGGR_GOOD) || MOB_FLAGGED(mob, MOB_AGGR_EVIL) || MOB_FLAGGED(mob, MOB_AGGR_NEUTRAL)) && (found=1))
|
||||
len += snprintf(buf + len, sizeof(buf) - len,
|
||||
"- Both aggresive and agressive to align.\r\n");
|
||||
|
||||
if ((GET_GOLD(mob) > MAX_GOLD_ALLOWED) && (found=1))
|
||||
|
@ -3490,8 +3492,8 @@ ACMD (do_zcheck)
|
|||
len += snprintf(buf + len, sizeof(buf) - len,
|
||||
"- Has %d experience (limit: %d)\r\n",
|
||||
GET_EXP(mob), MAX_EXP_ALLOWED);
|
||||
if (AFF_FLAGGED(mob, AFF_GROUP | AFF_CHARM | AFF_POISON) && (found = 1))
|
||||
len += snprintf(buf + len, sizeof(buf) - len,
|
||||
if ((AFF_FLAGGED(mob, AFF_GROUP) || AFF_FLAGGED(mob, AFF_CHARM) || AFF_FLAGGED(mob, AFF_POISON)) && (found = 1))
|
||||
len += snprintf(buf + len, sizeof(buf) - len,
|
||||
"- Has illegal affection bits set (%s %s %s)\r\n",
|
||||
AFF_FLAGGED(mob, AFF_GROUP) ? "GROUP" : "",
|
||||
AFF_FLAGGED(mob, AFF_CHARM) ? "CHARM" : "",
|
||||
|
|
|
@ -69,7 +69,7 @@ ACMD(do_oasis_aedit)
|
|||
|
||||
if (!str_cmp("save", arg)) {
|
||||
mudlog(CMP, MAX(LVL_BUILDER, GET_INVIS_LEV(ch)), TRUE, "OLC: %s saves socials.", GET_NAME(ch));
|
||||
send_to_char(ch, "Writing social file..\r\n");
|
||||
send_to_char(ch, "Writing social file.\r\n");
|
||||
aedit_save_to_disk(d);
|
||||
send_to_char(ch, "Done.\r\n");
|
||||
return;
|
||||
|
|
|
@ -684,12 +684,6 @@ cpp_extern const struct wis_app_type wis_app[] = {
|
|||
{7} /* wis = 25 */
|
||||
};
|
||||
|
||||
const char *npc_class_types[] = {
|
||||
"Normal",
|
||||
"Undead",
|
||||
"\n"
|
||||
};
|
||||
|
||||
int rev_dir[] =
|
||||
{
|
||||
2,
|
||||
|
|
|
@ -33,7 +33,6 @@ extern const char *drinks[];
|
|||
extern const char *drinknames[];
|
||||
extern const char *color_liquid[];
|
||||
extern const char *fullness[];
|
||||
extern const char *npc_class_types[];
|
||||
extern const char *weekdays[];
|
||||
extern const char *month_name[];
|
||||
extern const struct str_app_type str_app[];
|
||||
|
|
|
@ -871,31 +871,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
|||
snprintf(str, slen, "%d", (IN_ROOM(c)!= NOWHERE) ? world[IN_ROOM(c)].number : 0);
|
||||
#endif
|
||||
}
|
||||
#ifdef GET_RACE
|
||||
else if (!str_cmp(field, "race")) {
|
||||
if IS_NPC(c) {
|
||||
*str='\0';
|
||||
} else {
|
||||
sprinttype(GET_RACE(c), race_types, str, slen);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RIDING
|
||||
else if (!str_cmp(field, "riding")) {
|
||||
if (RIDING(c))
|
||||
snprintf(str, slen, "%c%ld", UID_CHAR, GET_ID(RIDING(c)));
|
||||
else *str = '\0';
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RIDDEN_BY
|
||||
else if (!str_cmp(field, "ridden_by")) {
|
||||
if (RIDDEN_BY(c))
|
||||
snprintf(str, slen, "%c%ld", UID_CHAR, GET_ID(RIDDEN_BY(c)));
|
||||
else *str = '\0';
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case 's':
|
||||
if (!str_cmp(field, "sex"))
|
||||
|
|
|
@ -711,7 +711,7 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty
|
|||
stop_follower(victim);
|
||||
|
||||
/* If the attacker is invisible, he becomes visible */
|
||||
if (AFF_FLAGGED(ch, AFF_INVISIBLE | AFF_HIDE))
|
||||
if (AFF_FLAGGED(ch, AFF_INVISIBLE) || AFF_FLAGGED(ch, AFF_HIDE))
|
||||
appear(ch);
|
||||
|
||||
/* Cut damage in half if victim has sanct, to a minimum 1 */
|
||||
|
|
|
@ -362,13 +362,12 @@ void affect_join(struct char_data *ch, struct affected_type *af,
|
|||
if ((hjp->type == af->type) && (hjp->location == af->location)) {
|
||||
if (add_dur)
|
||||
af->duration += hjp->duration;
|
||||
if (avg_dur)
|
||||
af->duration /= 2;
|
||||
|
||||
else if (avg_dur)
|
||||
af->duration = (af->duration+hjp->duration)/2;
|
||||
if (add_mod)
|
||||
af->modifier += hjp->modifier;
|
||||
if (avg_mod)
|
||||
af->modifier /= 2;
|
||||
else if (avg_mod)
|
||||
af->modifier = (af->modifier+hjp->modifier)/2;
|
||||
|
||||
affect_remove(ch, hjp);
|
||||
affect_to_char(ch, af);
|
||||
|
|
|
@ -276,7 +276,6 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "close" , "cl" , POS_SITTING , do_gen_door , 0, SCMD_CLOSE },
|
||||
{ "clear" , "cle" , POS_DEAD , do_gen_ps , 0, SCMD_CLEAR },
|
||||
{ "cls" , "cls" , POS_DEAD , do_gen_ps , 0, SCMD_CLEAR },
|
||||
{ "clsolc" , "clsolc" , POS_DEAD , do_gen_tog , LVL_BUILDER, SCMD_CLS },
|
||||
{ "consider" , "con" , POS_RESTING , do_consider , 0, 0 },
|
||||
{ "commands" , "com" , POS_DEAD , do_commands , 0, SCMD_COMMANDS },
|
||||
{ "compact" , "comp" , POS_DEAD , do_gen_tog , 0, SCMD_COMPACT },
|
||||
|
|
|
@ -252,7 +252,7 @@ void gain_exp(struct char_data *ch, int gain)
|
|||
else
|
||||
send_to_char(ch, "You rise %d levels!\r\n", num_levels);
|
||||
set_title(ch, NULL);
|
||||
if (GET_LEVEL(ch) >= LVL_IMMORT)
|
||||
if (GET_LEVEL(ch) >= LVL_IMMORT && !PLR_FLAGGED(ch, PLR_NOWIZLIST))
|
||||
run_autowiz();
|
||||
}
|
||||
} else if (gain < 0) {
|
||||
|
@ -289,7 +289,7 @@ void gain_exp_regardless(struct char_data *ch, int gain)
|
|||
else
|
||||
send_to_char(ch, "You rise %d levels!\r\n", num_levels);
|
||||
set_title(ch, NULL);
|
||||
if (GET_LEVEL(ch) >= LVL_IMMORT)
|
||||
if (GET_LEVEL(ch) >= LVL_IMMORT && !PLR_FLAGGED(ch, PLR_NOWIZLIST))
|
||||
run_autowiz();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ void affect_update(void)
|
|||
if (af->duration >= 1)
|
||||
af->duration--;
|
||||
else if (af->duration == -1) /* No action */
|
||||
af->duration = -1; /* GODs only! unlimited */
|
||||
;
|
||||
else {
|
||||
if ((af->type > 0) && (af->type <= MAX_SPELLS))
|
||||
if (!af->next || (af->next->type != af->type) ||
|
||||
|
|
|
@ -32,8 +32,6 @@ void mobile_activity(void);
|
|||
void clearMemory(struct char_data *ch);
|
||||
bool aggressive_mob_on_a_leash(struct char_data *slave, struct char_data *master, struct char_data *attack);
|
||||
|
||||
#define MOB_AGGR_TO_ALIGN (MOB_AGGR_EVIL | MOB_AGGR_NEUTRAL | MOB_AGGR_GOOD)
|
||||
|
||||
void mobile_activity(void)
|
||||
{
|
||||
struct char_data *ch, *next_ch, *vict;
|
||||
|
@ -95,7 +93,7 @@ void mobile_activity(void)
|
|||
}
|
||||
|
||||
/* Aggressive Mobs */
|
||||
if (MOB_FLAGGED(ch, MOB_AGGRESSIVE | MOB_AGGR_TO_ALIGN)) {
|
||||
if (MOB_FLAGGED(ch, MOB_HELPER) && (!AFF_FLAGGED(ch, AFF_BLIND) || !AFF_FLAGGED(ch, AFF_CHARM))) {
|
||||
found = FALSE;
|
||||
for (vict = world[IN_ROOM(ch)].people; vict && !found; vict = vict->next_in_room) {
|
||||
if (IS_NPC(vict) || !CAN_SEE(ch, vict) || PRF_FLAGGED(vict, PRF_NOHASSLE))
|
||||
|
|
|
@ -208,6 +208,7 @@
|
|||
#define PRF_AUTOSPLIT 28 /* Split gold with group */
|
||||
#define PRF_AUTOSAC 29 /* Sacrifice a corpse */
|
||||
#define PRF_AUTOASSIST 30 /* Auto-assist toggle */
|
||||
#define NUM_PRF_FLAGS 31
|
||||
|
||||
/* Affect bits: used in char_data.char_specials.saved.affected_by */
|
||||
/* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */
|
||||
|
@ -431,7 +432,7 @@
|
|||
/* 128 Bits */
|
||||
#define RF_ARRAY_MAX 4
|
||||
#define PM_ARRAY_MAX 4
|
||||
#define PR_ARRAY_MAX 4
|
||||
#define PR_ARRAY_MAX NUM_PRF_FLAGS / 32 + 1
|
||||
#define AF_ARRAY_MAX 4
|
||||
#define TW_ARRAY_MAX 4
|
||||
#define EF_ARRAY_MAX 4
|
||||
|
@ -767,7 +768,7 @@ struct player_special_data_saved {
|
|||
byte freeze_level; /* Level of god who froze char, if any */
|
||||
sh_int invis_level; /* level of invisibility */
|
||||
room_vnum load_room; /* Which room to place char in */
|
||||
int pref[PR_ARRAY_MAX]; /* preference flags for players */
|
||||
int pref[NUM_PRF_FLAGS /32 + 1]; /* preference flags for players */
|
||||
ubyte bad_pws; /* number of bad password attemps */
|
||||
sbyte conditions[3]; /* Drunk, hunger, thirst */
|
||||
struct txt_block *comm_hist[NUM_HIST]; /* Player's comms history */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue