Follow up to dc74119

This commit is contained in:
Jittapan Pluemsumran 2016-05-07 10:29:24 +07:00
parent 6620c3dcec
commit 7ec06ca1a8
No known key found for this signature in database
GPG Key ID: CE430096446F41D9
3 changed files with 6 additions and 6 deletions

View File

@ -273,7 +273,7 @@ bonus2 bIgnoreDefRaceRate,r,n; Disregard n% of the target's DEF if the target
bonus bIgnoreDefClass,c; Disregard DEF against enemies of class c
bonus bIgnoreMDefRace,r; Disregard MDEF against enemies of race r
bonus2 bIgnoreMdefRaceRate,r,n; Disregard n% of the target's MDEF if the target belongs to race r
bonus2 bIgnoreMdefRace2Rate,r,n; Disregard n% of the target's MDEF if the target belongs to race2 r
bonus2 bIgnoreMdefRace2Rate,mr,n; Disregard n% of the target's MDEF if the target belongs to monster race mr
bonus bIgnoreMDefEle,e; Disregard MDEF against enemies of element e
bonus2 bIgnoreMdefClassRate,c,n; Disregard n% of the target's MDEF if the target belongs to class c

View File

@ -5525,7 +5525,6 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
int skill_damage = 0;
#endif
short s_ele = 0;
enum e_race2 t_race2;
TBL_PC *sd;
TBL_PC *tsd;
@ -5560,7 +5559,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
tsd = BL_CAST(BL_PC, target);
sc = status_get_sc(src);
tsc = status_get_sc(target);
t_race2 = status_get_race2(target);
//Initialize variables that will be used afterwards
s_ele = skill_get_ele(skill_id, skill_lv);
@ -6124,8 +6123,9 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
mdef <<= 1; // only eMDEF is doubled
#endif
if(sd) {
i = sd->ignore_mdef_by_race[tstatus->race] + sd->ignore_mdef_by_race2[t_race2] + sd->ignore_mdef_by_race[RC_ALL];
i = sd->ignore_mdef_by_race[tstatus->race] + sd->ignore_mdef_by_race[RC_ALL];
i += sd->ignore_mdef_by_class[tstatus->class_] + sd->ignore_mdef_by_class[CLASS_ALL];
i += sd->ignore_mdef_by_race2[status_get_race2(target)];
if (i)
{
if (i > 100) i = 100;

View File

@ -3673,12 +3673,12 @@ void pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
sd->coma_race[type2] += val;
sd->special_state.bonus_coma = 1;
break;
case SP_MAGIC_ADDRACE2: // bonus2 bMagicAddRace2,r,n;
case SP_MAGIC_ADDRACE2: // bonus2 bMagicAddRace2,mr,n;
PC_BONUS_CHK_RACE2(type2, SP_MAGIC_ADDRACE2);
if(sd->state.lr_flag != 2)
sd->magic_addrace2[type2] += val;
break;
case SP_IGNORE_MDEF_RACE2_RATE: //bonus2 bIgnoreMdefRace2Rate,r,n;
case SP_IGNORE_MDEF_RACE2_RATE: //bonus2 bIgnoreMdefRace2Rate,mr,n;
PC_BONUS_CHK_RACE2(type2, SP_IGNORE_MDEF_RACE2);
if (sd->state.lr_flag != 2)
sd->ignore_mdef_by_race2[type2] += val;