瀏覽代碼

Parry delay should be based on adelay (#5325)

* Removes hard coded 1 second delay.
* The delay should scale based on the player's ASPD.
Thanks to @mrjnumber1 and @Daegaladh!
Aleos 4 年之前
父節點
當前提交
ca27c6d89d
共有 3 個文件被更改,包括 5 次插入5 次删除
  1. 0 1
      db/pre-re/skill_db.yml
  2. 0 1
      db/re/skill_db.yml
  3. 5 3
      src/map/battle.cpp

+ 0 - 1
db/pre-re/skill_db.yml

@@ -9404,7 +9404,6 @@ Body:
         Time: 55000
       - Level: 10
         Time: 60000
-    Duration2: 1000
     Requires:
       SpCost: 50
       Weapon:

+ 0 - 1
db/re/skill_db.yml

@@ -9711,7 +9711,6 @@ Body:
         Time: 55000
       - Level: 10
         Time: 60000
-    Duration2: 1000
     Requires:
       SpCost: 50
       Weapon:

+ 5 - 3
src/map/battle.cpp

@@ -1283,10 +1283,12 @@ bool battle_status_block_damage(struct block_list *src, struct block_list *targe
 	if ((sce = sc->data[SC_PARRYING]) && flag&BF_WEAPON && skill_id != WS_CARTTERMINATION && rnd() % 100 < sce->val2) {
 		clif_skill_nodamage(target, target, LK_PARRYING, sce->val1, 1);
 
-		unit_data *ud = unit_bl2ud(target);
+		if (skill_id == LK_PARRYING) {
+			unit_data *ud = unit_bl2ud(target);
 
-		if (ud) // Delay the next attack
-			ud->attackabletime = gettick() + skill_get_time2(LK_PARRYING, sce->val1);
+			if (ud != nullptr) // Delay the next attack
+				ud->attackabletime = gettick() + status_get_adelay(target);
+		}
 		return false;
 	}