Fiendish said:
Quote: Where would the variable be passed from to determine whether we are advancing and notifying, vs just advancing
After changing the advance_level function to take true/false-type argument, you'd then find every current invocation of advance_level and and every invocation of advance_level_quiet and set one one way and the other the other way.
I found where it calls for advance_level_quiet
apparently the advance command (do_advance) in act_wiz.c will drop a user to level 1, then work them back up to whatever level they are set to (if demoting level)
Quote: /*
* Lower level:
* Reset to level 1.
* Then raise again.
* Currently, an imp can lower another imp.
* -- Swiftest
*/
if ( level <= victim->level )
{
int temp_prac;
send_to_char( "Lowering a player's level!\n\r", ch );
send_to_char( "{R******** {GOOOOHHHHHHHHHH NNNNOOOO {R*******{x\n\r", victim );
sprintf(buf, "{R**** {WYou've been demoted to level %d {R****{x\n\r", level );
send_to_char(buf, victim);
if ((victim->level > HERO) || (level > HERO))
{
update_wizlist(victim, level);
}
temp_prac = victim->practice;
victim->level = 1;
victim->exp = exp_per_level(victim,victim->pcdata->points);
victim->max_hit = 100;
victim->max_mana = 100;
victim->max_move = 100;
victim->practice = 0;
victim->hit = victim->max_hit;
victim->mana = victim->max_mana;
victim->move = victim->max_move;
advance_level_quiet( victim );
victim->practice = temp_prac;
}
whereas for advancing up its
Quote: else
{
send_to_char( "Raising a player's level!\n\r", ch );
send_to_char( "{B******* {GOOOOHHHHHHHHHH YYYYEEEESSS {B******{x\n\r", victim );
sprintf(buf, "{B**** {WYou've been advanced to level %d {B****{x\n\r", level );
send_to_char(buf, victim);
if ((victim->level > HERO) || (level > HERO))
{
update_wizlist(victim, level);
}
}
then in both cases, the code is followed by
Quote: for ( iLevel = victim->level ; iLevel < level; iLevel++ )
{
victim->level += 1;
advance_level_quiet( victim );
}
victim->exp = exp_per_level(victim,victim->pcdata->points)
* UMAX( 1, victim->level );
victim->trust = 0;
save_char_obj(victim);
return;
So in theory, i should be able to create a variable that would only be true if the advance command is used, and when that variable is true, it would skip the output to the user for the individual levels (From 1 to whatever, since that would be spammy and the user doesn't need to know it works like that)
I'll report back when i get that coded in and tested! |