diff --git a/hwe/sammo/GameUnitDetail.php b/hwe/sammo/GameUnitDetail.php index 9976b892..861b56c5 100644 --- a/hwe/sammo/GameUnitDetail.php +++ b/hwe/sammo/GameUnitDetail.php @@ -59,7 +59,12 @@ class GameUnitDetail implements iAction $this->reqConstraints = []; foreach($reqConstraints as $constraint){ $className = Util::getClassNameFromObj($constraint); - $this->reqConstraints[$className] = $constraint; + if(!key_exists($className, $this->reqConstraints)){ + $this->reqConstraints[$className] = $constraint; + } + else{ + $this->reqConstraints[] = $constraint; + } } $this->attackCoef = $attackCoef; $this->defenceCoef = $defenceCoef;