Sfoglia il codice sorgente

Added missing cap for default value for AttackDelay and AttackMotion (#6085)

Fixed #6082

Thanks to @Jefferycheng !
Atemo 3 anni fa
parent
commit
4b339f7f6e
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/map/mob.cpp

+ 2 - 2
src/map/mob.cpp

@@ -4712,7 +4712,7 @@ uint64 MobDatabase::parseBodyNode(const YAML::Node &node) {
 		mob->status.adelay = cap_value(speed, battle_config.monster_max_aspd * 2, 4000);
 	} else {
 		if (!exists)
-			mob->status.adelay = 0;
+			mob->status.adelay = cap_value(0, battle_config.monster_max_aspd * 2, 4000);
 	}
 	
 	if (this->nodeExists(node, "AttackMotion")) {
@@ -4724,7 +4724,7 @@ uint64 MobDatabase::parseBodyNode(const YAML::Node &node) {
 		mob->status.amotion = cap_value(speed, battle_config.monster_max_aspd, 2000);
 	} else {
 		if (!exists)
-			mob->status.amotion = 0;
+			mob->status.amotion = cap_value(0, battle_config.monster_max_aspd, 2000);
 	}
 
 	if (this->nodeExists(node, "DamageMotion")) {