Fixed death counter not updating properly
Also fixes Super Novice bonus not being removed on death and a possible crash *Thanks to @aleos89
This commit is contained in:
parent
47ebf332ab
commit
929c30c414
@ -8277,7 +8277,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
||||
|
||||
clif_party_dead( sd );
|
||||
|
||||
pc_setglobalreg(sd, add_str(PCDIECOUNTER_VAR), sd->die_counter+1);
|
||||
pc_setparam(sd, SP_PCDIECOUNTER, sd->die_counter+1);
|
||||
pc_setparam(sd, SP_KILLERRID, src?src->id:0);
|
||||
|
||||
//Reset menu skills/item skills
|
||||
@ -8951,7 +8951,7 @@ bool pc_setparam(struct map_session_data *sd,int64 type,int64 val_tmp)
|
||||
if (sd->die_counter == val)
|
||||
return true;
|
||||
sd->die_counter = val;
|
||||
if (!sd->die_counter && (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE)
|
||||
if (!sd->state.connect_new && sd->die_counter == 1 && (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE)
|
||||
status_calc_pc(sd, SCO_NONE); // Lost the bonus.
|
||||
pc_setglobalreg(sd, add_str(PCDIECOUNTER_VAR), sd->die_counter);
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user