mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-23 10:40:13 +01:00
Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc() strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back.
This commit is contained in:
parent
af18bd91b6
commit
70f648c85b
3 changed files with 6 additions and 8 deletions
|
|
@ -1534,7 +1534,7 @@ ACMD(do_advance)
|
||||||
act("$n makes some strange gestures. A strange feeling comes upon you,\r\n"
|
act("$n makes some strange gestures. A strange feeling comes upon you,\r\n"
|
||||||
"Like a giant hand, light comes down from above, grabbing your body,\r\n"
|
"Like a giant hand, light comes down from above, grabbing your body,\r\n"
|
||||||
"that begins to pulse with colored lights from inside.\r\n\r\n"
|
"that begins to pulse with colored lights from inside.\r\n\r\n"
|
||||||
"Your head seems to be filled with demons from another plane as your\r\n"
|
"Your head seems to be filled with demons from another plane as\r\n"
|
||||||
"your body dissolves to the elements of time and space itself.\r\n"
|
"your body dissolves to the elements of time and space itself.\r\n"
|
||||||
"Suddenly a silent explosion of light snaps you back to reality.\r\n\r\n"
|
"Suddenly a silent explosion of light snaps you back to reality.\r\n\r\n"
|
||||||
"You feel slightly different.", FALSE, ch, 0, victim, TO_VICT);
|
"You feel slightly different.", FALSE, ch, 0, victim, TO_VICT);
|
||||||
|
|
@ -1565,13 +1565,10 @@ ACMD(do_advance)
|
||||||
SET_BIT_AR(PRF_FLAGS(victim), PRF_AUTOEXIT);
|
SET_BIT_AR(PRF_FLAGS(victim), PRF_AUTOEXIT);
|
||||||
for (i = 1; i <= MAX_SKILLS; i++)
|
for (i = 1; i <= MAX_SKILLS; i++)
|
||||||
SET_SKILL(victim, i, 100);
|
SET_SKILL(victim, i, 100);
|
||||||
if (!PLR_FLAGGED(victim, PLR_NOWIZLIST))
|
|
||||||
run_autowiz();
|
|
||||||
GET_OLC_ZONE(victim) = NOWHERE;
|
GET_OLC_ZONE(victim) = NOWHERE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gain_exp_regardless(victim,
|
gain_exp_regardless(victim, level_exp(GET_CLASS(victim), newlevel) - GET_EXP(victim));
|
||||||
level_exp(GET_CLASS(victim), newlevel) - GET_EXP(victim));
|
|
||||||
save_char(victim);
|
save_char(victim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1455,7 +1455,6 @@ void do_start(struct char_data *ch)
|
||||||
}
|
}
|
||||||
|
|
||||||
advance_level(ch);
|
advance_level(ch);
|
||||||
mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s advanced to level %d", GET_NAME(ch), GET_LEVEL(ch));
|
|
||||||
|
|
||||||
GET_HIT(ch) = GET_MAX_HIT(ch);
|
GET_HIT(ch) = GET_MAX_HIT(ch);
|
||||||
GET_MANA(ch) = GET_MAX_MANA(ch);
|
GET_MANA(ch) = GET_MAX_MANA(ch);
|
||||||
|
|
|
||||||
|
|
@ -261,6 +261,8 @@ void gain_exp(struct char_data *ch, int gain)
|
||||||
if (GET_EXP(ch) < 0)
|
if (GET_EXP(ch) < 0)
|
||||||
GET_EXP(ch) = 0;
|
GET_EXP(ch) = 0;
|
||||||
}
|
}
|
||||||
|
if (GET_LEVEL(ch) >= LVL_IMMORT && !PLR_FLAGGED(ch, PLR_NOWIZLIST))
|
||||||
|
run_autowiz();
|
||||||
}
|
}
|
||||||
|
|
||||||
void gain_exp_regardless(struct char_data *ch, int gain)
|
void gain_exp_regardless(struct char_data *ch, int gain)
|
||||||
|
|
@ -289,10 +291,10 @@ void gain_exp_regardless(struct char_data *ch, int gain)
|
||||||
else
|
else
|
||||||
send_to_char(ch, "You rise %d levels!\r\n", num_levels);
|
send_to_char(ch, "You rise %d levels!\r\n", num_levels);
|
||||||
set_title(ch, NULL);
|
set_title(ch, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (GET_LEVEL(ch) >= LVL_IMMORT && !PLR_FLAGGED(ch, PLR_NOWIZLIST))
|
if (GET_LEVEL(ch) >= LVL_IMMORT && !PLR_FLAGGED(ch, PLR_NOWIZLIST))
|
||||||
run_autowiz();
|
run_autowiz();
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void gain_condition(struct char_data *ch, int condition, int value)
|
void gain_condition(struct char_data *ch, int condition, int value)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue