bonus bVariableCast and bonus2 bSkillVariableCast for Pre-renewal (#4268)

* `bonus bVariableCast,t;` now works in pre-renewal to increase casting time
* `bonus2 bSkillVariableCast,sk,t;` now works in pre-renewal to increase casting time by skill name
* Item bonus documentation update
This commit is contained in:
Cydh Ramdh
2019-11-04 08:03:15 +07:00
committed by GitHub
parent 930f52e31f
commit e6bf2d18f9
3 changed files with 28 additions and 20 deletions

View File

@@ -3415,6 +3415,10 @@ void pc_bonus(struct map_session_data *sd,int type,int val)
if(sd->state.lr_flag != 2)
sd->bonus.ematk += val;
break;
case SP_ADD_VARIABLECAST:
if (sd->state.lr_flag != 2)
sd->bonus.add_varcast += val;
break;
#ifdef RENEWAL_CAST
case SP_FIXCASTRATE:
if(sd->state.lr_flag != 2)
@@ -3429,14 +3433,9 @@ void pc_bonus(struct map_session_data *sd,int type,int val)
if(sd->state.lr_flag != 2)
sd->bonus.varcastrate -= val;
break;
case SP_ADD_VARIABLECAST:
if(sd->state.lr_flag != 2)
sd->bonus.add_varcast += val;
break;
#else
case SP_ADD_FIXEDCAST:
case SP_FIXCASTRATE:
case SP_ADD_VARIABLECAST:
//ShowWarning("pc_bonus: non-RENEWAL_CAST doesn't support this bonus %d.\n", type);
break;
case SP_VARCASTRATE:
@@ -3950,6 +3949,16 @@ void pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
pc_bonus_itembonus(sd->skillcooldown, type2, val, false);
break;
case SP_SKILL_VARIABLECAST: // bonus2 bSkillVariableCast,sk,t;
if (sd->state.lr_flag == 2)
break;
if (sd->skillvarcast.size() == MAX_PC_BONUS) {
ShowWarning("pc_bonus2: SP_SKILL_VARIABLECAST: Reached max (%d) number of skills per character, bonus skill %d (%d) lost.\n", MAX_PC_BONUS, type2, val);
break;
}
pc_bonus_itembonus(sd->skillvarcast, type2, val, false);
break;
#ifdef RENEWAL_CAST
case SP_SKILL_FIXEDCAST: // bonus2 bSkillFixedCast,sk,t;
if(sd->state.lr_flag == 2)
@@ -3961,16 +3970,6 @@ void pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
pc_bonus_itembonus(sd->skillfixcast, type2, val, false);
break;
case SP_SKILL_VARIABLECAST: // bonus2 bSkillVariableCast,sk,t;
if(sd->state.lr_flag == 2)
break;
if (sd->skillvarcast.size() == MAX_PC_BONUS) {
ShowWarning("pc_bonus2: SP_SKILL_VARIABLECAST: Reached max (%d) number of skills per character, bonus skill %d (%d) lost.\n", MAX_PC_BONUS, type2, val);
break;
}
pc_bonus_itembonus(sd->skillvarcast, type2, val, false);
break;
case SP_CASTRATE: // bonus2 bCastrate,sk,n;
case SP_VARCASTRATE: // bonus2 bVariableCastrate,sk,n;
if(sd->state.lr_flag == 2)
@@ -3994,7 +3993,6 @@ void pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
break;
#else
case SP_SKILL_FIXEDCAST: // bonus2 bSkillFixedCast,sk,t;
case SP_SKILL_VARIABLECAST: // bonus2 bSkillVariableCast,sk,t;
case SP_FIXCASTRATE: // bonus2 bFixedCastrate,sk,n;
//ShowWarning("pc_bonus2: Non-RENEWAL_CAST doesn't support this bonus %d.\n", type);
break;