Преглед изворни кода

Attacking While Casting Crash Fix (#8322)

- Fixed a server crash that occurs when a unit did a normal attack while casting a spell (e.g. Free Cast)
- Follow-up to ffe40de
- Fixes #8319
Playtester пре 1 година
родитељ
комит
04117614cb
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      src/map/unit.cpp

+ 4 - 1
src/map/unit.cpp

@@ -2855,7 +2855,10 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, t_tick tick)
 			return 1;
 
 		ud->attackabletime = tick + sstatus->adelay;
-		ud->skill_id = 0;
+
+		// Only reset skill_id here if no skilltimer is currently ongoing
+		if (ud->skilltimer == INVALID_TIMER)
+			ud->skill_id = 0;
 
 		// You can't move if you can't attack neither.
 		if (src->type&battle_config.attack_walk_delay)