버그 수정

This commit is contained in:
2019-04-21 11:43:23 +09:00
parent 03510ee1e7
commit 1a0e84e6d7
56 changed files with 77 additions and 73 deletions
@@ -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;
}