瀏覽代碼

Corrected battle config default_fixed_castrate (#4341)

* When default_fixed_castrate is set to 0, it should not replace the value of the databases' fixed value when greater than 0.
Thanks to @SeravySensei!
Aleos 5 年之前
父節點
當前提交
fb6dbc306a
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/map/skill.cpp

+ 2 - 1
src/map/skill.cpp

@@ -16648,12 +16648,13 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16
 	if (bl->type == BL_MOB || bl->type == BL_NPC)
 		return (int)time;
 
-	if (fixed < 0 || !battle_config.default_fixed_castrate) // no fixed cast 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
 	}
+	// Else, use fixed cast time from database (when default_fixed_castrate is set to 0)
 
 	// Additive Variable Cast bonus adjustments by items
 	if (sd && !(flag&4)) {