버그 수정
This commit is contained in:
@@ -6,10 +6,12 @@ use sammo\GameUnitConst;
|
||||
use sammo\General;
|
||||
|
||||
class ReqGeneralCrewMargin extends Constraint{
|
||||
|
||||
protected $crewType;
|
||||
const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_INT_ARG;
|
||||
|
||||
public function checkInputValues(bool $throwExeception=true){
|
||||
if(!parent::checkInputValues($throwExeception) && !$throwException){
|
||||
if(!parent::checkInputValues($throwExeception) && !$throwExeception){
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -25,22 +27,19 @@ class ReqGeneralCrewMargin extends Constraint{
|
||||
}
|
||||
}
|
||||
|
||||
$this->crewType = $this->arg;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function test():bool{
|
||||
$this->checkInputValues();
|
||||
$this->tested = true;
|
||||
|
||||
if($crewType != $this->general['crewtype']){
|
||||
return true;
|
||||
}
|
||||
$reqCrewType = GameUnitConst::byID($this->arg);
|
||||
|
||||
//XXX: 왜 General -> obj -> General 변환을 하고 있나?
|
||||
$generalObj = new General($this->general, null, null, null, false);
|
||||
|
||||
$reqCrewType = GameUnitConst::byID($this->arg);
|
||||
|
||||
if($reqCrewType->id != $generalObj->getCrewTypeObj()->id){
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user