|
@@ -6666,6 +6666,25 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
|
int i=0,j=0,k=0;
|
|
int i=0,j=0,k=0;
|
|
unsigned int tick = gettick();
|
|
unsigned int tick = gettick();
|
|
|
|
|
|
|
|
+ // Activate Steel body if a super novice dies at 99+% exp [celest]
|
|
|
|
+ // Super Novices have no kill or die functions attached when saved by their angel
|
|
|
|
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && !sd->state.snovice_dead_flag) {
|
|
|
|
+ unsigned int next = pc_nextbaseexp(sd);
|
|
|
|
+ if( next == 0 ) next = pc_thisbaseexp(sd);
|
|
|
|
+ if( get_percentage(sd->status.base_exp,next) >= 99 ) {
|
|
|
|
+ sd->state.snovice_dead_flag = 1;
|
|
|
|
+ pc_setrestartvalue(sd,1);
|
|
|
|
+ status_percent_heal(&sd->bl, 100, 100);
|
|
|
|
+ clif_resurrection(&sd->bl, 1);
|
|
|
|
+ if(battle_config.pc_invincible_time)
|
|
|
|
+ pc_setinvincibletimer(sd, battle_config.pc_invincible_time);
|
|
|
|
+ sc_start(&sd->bl,&sd->bl,status_skill2sc(MO_STEELBODY),100,5,skill_get_time(MO_STEELBODY,5));
|
|
|
|
+ if(map_flag_gvg(sd->bl.m))
|
|
|
|
+ pc_respawn_timer(INVALID_TIMER, gettick(), sd->bl.id, 0);
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
for(k = 0; k < 5; k++)
|
|
for(k = 0; k < 5; k++)
|
|
if (sd->devotion[k]){
|
|
if (sd->devotion[k]){
|
|
struct map_session_data *devsd = map_id2sd(sd->devotion[k]);
|
|
struct map_session_data *devsd = map_id2sd(sd->devotion[k]);
|
|
@@ -6721,14 +6740,6 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
|
pc_setglobalreg(sd,"PC_DIE_COUNTER",sd->die_counter+1);
|
|
pc_setglobalreg(sd,"PC_DIE_COUNTER",sd->die_counter+1);
|
|
pc_setparam(sd, SP_KILLERRID, src?src->id:0);
|
|
pc_setparam(sd, SP_KILLERRID, src?src->id:0);
|
|
|
|
|
|
- if( sd->bg_id ) {
|
|
|
|
- struct battleground_data *bg;
|
|
|
|
- if( (bg = bg_team_search(sd->bg_id)) != NULL && bg->die_event[0] )
|
|
|
|
- npc_event(sd, bg->die_event, 0);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- npc_script_event(sd,NPCE_DIE);
|
|
|
|
-
|
|
|
|
//Reset menu skills/item skills
|
|
//Reset menu skills/item skills
|
|
if (sd->skillitem)
|
|
if (sd->skillitem)
|
|
sd->skillitem = sd->skillitemlv = 0;
|
|
sd->skillitem = sd->skillitemlv = 0;
|
|
@@ -6823,25 +6834,6 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
|
map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
|
|
map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
|
|
}
|
|
}
|
|
|
|
|
|
- // activate Steel body if a super novice dies at 99+% exp [celest]
|
|
|
|
- if ((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && !sd->state.snovice_dead_flag) {
|
|
|
|
- unsigned int next = pc_nextbaseexp(sd);
|
|
|
|
- if( next == 0 ) next = pc_thisbaseexp(sd);
|
|
|
|
- if( get_percentage(sd->status.base_exp,next) >= 99 ) {
|
|
|
|
- sd->state.snovice_dead_flag = 1;
|
|
|
|
- pc_setstand(sd);
|
|
|
|
- pc_setrestartvalue(sd,1);
|
|
|
|
- status_percent_heal(&sd->bl, 100, 100);
|
|
|
|
- clif_resurrection(&sd->bl, 1);
|
|
|
|
- if(battle_config.pc_invincible_time)
|
|
|
|
- pc_setinvincibletimer(sd, battle_config.pc_invincible_time);
|
|
|
|
- sc_start(&sd->bl,&sd->bl,status_skill2sc(MO_STEELBODY),100,1,skill_get_time(MO_STEELBODY,1));
|
|
|
|
- if(map_flag_gvg(sd->bl.m))
|
|
|
|
- pc_respawn_timer(INVALID_TIMER, gettick(), sd->bl.id, 0);
|
|
|
|
- return 0;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
// changed penalty options, added death by player if pk_mode [Valaris]
|
|
// changed penalty options, added death by player if pk_mode [Valaris]
|
|
if(battle_config.death_penalty_type
|
|
if(battle_config.death_penalty_type
|
|
&& (sd->class_&MAPID_UPPERMASK) != MAPID_NOVICE // only novices will receive no penalty
|
|
&& (sd->class_&MAPID_UPPERMASK) != MAPID_NOVICE // only novices will receive no penalty
|