|
@@ -17275,11 +17275,6 @@ int skill_castfix_sc(struct block_list *bl, double time, uint8 flag)
|
|
*/
|
|
*/
|
|
int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv)
|
|
int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv)
|
|
{
|
|
{
|
|
- struct status_change *sc = status_get_sc(bl);
|
|
|
|
- struct map_session_data *sd = BL_CAST(BL_PC,bl);
|
|
|
|
- int fixed = skill_get_fixed_cast(skill_id, skill_lv), fixcast_r = 0, varcast_r = 0, reduce_cast_rate = 0;
|
|
|
|
- uint8 flag = skill_get_castnodex(skill_id);
|
|
|
|
-
|
|
|
|
nullpo_ret(bl);
|
|
nullpo_ret(bl);
|
|
|
|
|
|
if (time < 0)
|
|
if (time < 0)
|
|
@@ -17288,13 +17283,18 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16
|
|
if (bl->type == BL_MOB || bl->type == BL_NPC)
|
|
if (bl->type == BL_MOB || bl->type == BL_NPC)
|
|
return (int)time;
|
|
return (int)time;
|
|
|
|
|
|
- if (fixed < 0) // no fixed cast time
|
|
|
|
- fixed = 0;
|
|
|
|
- else if (fixed == 0) {
|
|
|
|
- fixed = (int)time * battle_config.default_fixed_castrate / 100; // fixed time
|
|
|
|
- time = time * (100 - battle_config.default_fixed_castrate) / 100; // variable time
|
|
|
|
|
|
+ status_change *sc = status_get_sc(bl);
|
|
|
|
+ map_session_data *sd = BL_CAST(BL_PC, bl);
|
|
|
|
+ int fixed = skill_get_fixed_cast(skill_id, skill_lv), fixcast_r = 0, varcast_r = 0, reduce_cast_rate = 0;
|
|
|
|
+ uint8 flag = skill_get_castnodex(skill_id);
|
|
|
|
+
|
|
|
|
+ if (fixed < 0) {
|
|
|
|
+ if (battle_config.default_fixed_castrate > 0) {
|
|
|
|
+ fixed = (int)time * battle_config.default_fixed_castrate / 100; // fixed time
|
|
|
|
+ time = time * (100 - battle_config.default_fixed_castrate) / 100; // variable time
|
|
|
|
+ } else
|
|
|
|
+ fixed = 0;
|
|
}
|
|
}
|
|
- // Else, use fixed cast time from database (when default_fixed_castrate is set to 0)
|
|
|
|
|
|
|
|
// Additive Variable Cast bonus adjustments by items
|
|
// Additive Variable Cast bonus adjustments by items
|
|
if (sd && !(flag&4)) {
|
|
if (sd && !(flag&4)) {
|