fix: 병종 조건에서 같은 키가 여러개인 경우 대비
This commit is contained in:
@@ -59,7 +59,12 @@ class GameUnitDetail implements iAction
|
|||||||
$this->reqConstraints = [];
|
$this->reqConstraints = [];
|
||||||
foreach($reqConstraints as $constraint){
|
foreach($reqConstraints as $constraint){
|
||||||
$className = Util::getClassNameFromObj($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->attackCoef = $attackCoef;
|
||||||
$this->defenceCoef = $defenceCoef;
|
$this->defenceCoef = $defenceCoef;
|
||||||
|
|||||||
Reference in New Issue
Block a user