소스 검색

Stone Curse Animation + Speedup Timing Fix (#9077)

- Fixed Stone Curse Animation not shown when the skill is used by monsters and fails (fixes #9076)
- Fixed a small timing problem with NPC_SPEEDUP that occurs when the timers are not accurate
Playtester 3 달 전
부모
커밋
2b45592e25
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      src/map/skill.cpp

+ 5 - 3
src/map/skill.cpp

@@ -9531,9 +9531,11 @@ int32 skill_castend_nodamage_id (struct block_list *src, struct block_list *bl,
 			if (sd && sd->sc.getSCE(SC_PETROLOGY_OPTION))
 				brate = sd->sc.getSCE(SC_PETROLOGY_OPTION)->val3;
 
-			if (sc_start2(src, bl, type, (skill_lv * 4 + 20) + brate, skill_lv, src->id, skill_get_time2(skill_id, skill_lv), skill_get_time(skill_id, skill_lv)))
+			// Except for players, the skill animation shows even if the status change doesn't start
+			// Players get a skill has failed message instead
+			if (sc_start2(src, bl, type, (skill_lv * 4 + 20) + brate, skill_lv, src->id, skill_get_time2(skill_id, skill_lv), skill_get_time(skill_id, skill_lv)) || sd == nullptr)
 				clif_skill_nodamage(src, *bl, skill_id, skill_lv);
-			else if(sd) {
+			else {
 				clif_skill_fail( *sd, skill_id );
 				// Level 6-10 doesn't consume a red gem if it fails [celest]
 				if (skill_lv > 5)
@@ -10321,7 +10323,7 @@ int32 skill_castend_nodamage_id (struct block_list *src, struct block_list *bl,
 				status_calc_bl(&md->bl, { SCB_SPEED });
 				// We use skills only on each full cell, to fix the inaccuracy we do this on last move interval
 				if (DIFF_TICK(md->trickcasting, tick) < trickstop + MOB_SKILL_INTERVAL)
-					md->last_skillcheck = tick + 50;
+					md->last_skillcheck = tick + 100;
 			}
 			else {
 				// Synchronize skill usage