-Fix bugreport:7522 shadow form not ending correctly on target dead.
-Fix SC_LIGHT_OF_REGENE not ending status before revive player. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17277 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
ac3e46de84
commit
a74e22453d
20
src/map/pc.c
20
src/map/pc.c
@ -1249,7 +1249,7 @@ int pc_reg_received(struct map_session_data *sd)
|
||||
}
|
||||
|
||||
clif_changeoption( &sd->bl );
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -6582,6 +6582,10 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
||||
status_change_end(&devsd->bl, SC_DEVOTION, INVALID_TIMER);
|
||||
sd->devotion[k] = 0;
|
||||
}
|
||||
if(sd->shadowform_id){ //if we were target of shadowform
|
||||
status_change_end(map_id2bl(sd->shadowform_id), SC__SHADOWFORM, INVALID_TIMER);
|
||||
sd->shadowform_id = 0; //should be remove on status end anyway
|
||||
}
|
||||
|
||||
if(sd->status.pet_id > 0 && sd->pd) {
|
||||
struct pet_data *pd = sd->pd;
|
||||
@ -6596,8 +6600,8 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
||||
}
|
||||
|
||||
if (sd->status.hom_id > 0){
|
||||
if(battle_config.homunculus_auto_vapor && sd->hd && !sd->hd->sc.data[SC_LIGHT_OF_REGENE])
|
||||
merc_hom_vaporize(sd, HOM_ST_ACTIVE);
|
||||
if(battle_config.homunculus_auto_vapor && sd->hd && !sd->hd->sc.data[SC_LIGHT_OF_REGENE])
|
||||
merc_hom_vaporize(sd, HOM_ST_ACTIVE);
|
||||
}
|
||||
|
||||
if( sd->md )
|
||||
@ -6749,7 +6753,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
||||
|
||||
// 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 ) {
|
||||
@ -6783,14 +6787,14 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
||||
break;
|
||||
}
|
||||
if(base_penalty) {
|
||||
if (battle_config.pk_mode && src && src->type==BL_PC)
|
||||
if (battle_config.pk_mode && src && src->type==BL_PC)
|
||||
base_penalty*=2;
|
||||
sd->status.base_exp -= min(sd->status.base_exp, base_penalty);
|
||||
clif_updatestatus(sd,SP_BASEEXP);
|
||||
}
|
||||
}
|
||||
if(battle_config.death_penalty_job > 0)
|
||||
{
|
||||
{
|
||||
base_penalty = 0;
|
||||
switch (battle_config.death_penalty_type) {
|
||||
case 1:
|
||||
@ -6801,14 +6805,14 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
||||
break;
|
||||
}
|
||||
if(base_penalty) {
|
||||
if (battle_config.pk_mode && src && src->type==BL_PC)
|
||||
if (battle_config.pk_mode && src && src->type==BL_PC)
|
||||
base_penalty*=2;
|
||||
sd->status.job_exp -= min(sd->status.job_exp, base_penalty);
|
||||
clif_updatestatus(sd,SP_JOBEXP);
|
||||
}
|
||||
}
|
||||
if(battle_config.zeny_penalty > 0 && !map[sd->bl.m].flag.nozenypenalty)
|
||||
{
|
||||
{
|
||||
base_penalty = (unsigned int)((double)sd->status.zeny * (double)battle_config.zeny_penalty / 10000.);
|
||||
if(base_penalty)
|
||||
pc_payzeny(sd, base_penalty, LOG_TYPE_PICKDROP_PLAYER, NULL);
|
||||
|
@ -1256,7 +1256,7 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s
|
||||
}
|
||||
|
||||
if( status->hp || (flag&8) )
|
||||
{ //Still lives or has been dead before this damage.
|
||||
{ //Still lives or has been dead before this damage.
|
||||
if (walkdelay)
|
||||
unit_set_walkdelay(target, gettick(), walkdelay, 0);
|
||||
return hp+sp;
|
||||
@ -1321,6 +1321,7 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s
|
||||
TBL_PC *sd = BL_CAST(BL_PC,target);
|
||||
TBL_HOM *hd = sd->hd;
|
||||
if(hd && hd->sc.data[SC_LIGHT_OF_REGENE]){
|
||||
status_change_clear(target,0);
|
||||
clif_skillcasting(&hd->bl, hd->bl.id, target->id, 0,0, MH_LIGHT_OF_REGENE, skill_get_ele(MH_LIGHT_OF_REGENE, 1), 10); //just to display usage
|
||||
clif_skill_nodamage(&sd->bl, target, ALL_RESURRECTION, 1, status_revive(&sd->bl,hd->sc.data[SC_LIGHT_OF_REGENE]->val2,0));
|
||||
status_change_end(&sd->hd->bl,SC_LIGHT_OF_REGENE,INVALID_TIMER);
|
||||
@ -9156,7 +9157,7 @@ int status_change_clear(struct block_list* bl, int type) {
|
||||
|
||||
for(i = 0; i < SC_MAX; i++) {
|
||||
if(!sc->data[i])
|
||||
continue;
|
||||
continue;
|
||||
|
||||
if(type == 0)
|
||||
switch (i) { //Type 0: PC killed -> Place here statuses that do not dispel on death.
|
||||
@ -9645,9 +9646,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
|
||||
break;
|
||||
case SC__SHADOWFORM: {
|
||||
struct map_session_data *s_sd = map_id2sd(sce->val2);
|
||||
if( !s_sd )
|
||||
break;
|
||||
s_sd->shadowform_id = 0;
|
||||
if(s_sd ) s_sd->shadowform_id = 0;
|
||||
}
|
||||
break;
|
||||
case SC_SITDOWN_FORCE:
|
||||
@ -10864,9 +10863,9 @@ int status_change_clear_buffs (struct block_list* bl, int type)
|
||||
if (!sc || !sc->count)
|
||||
return 0;
|
||||
|
||||
if (type&6) //Debuffs
|
||||
for (i = SC_COMMON_MIN; i <= SC_COMMON_MAX; i++)
|
||||
status_change_end(bl, (sc_type)i, INVALID_TIMER);
|
||||
if (type&6) //Debuffs
|
||||
for (i = SC_COMMON_MIN; i <= SC_COMMON_MAX; i++)
|
||||
status_change_end(bl, (sc_type)i, INVALID_TIMER);
|
||||
|
||||
for( i = SC_COMMON_MAX+1; i < SC_MAX; i++ )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user