전투 추가 구현
This commit is contained in:
@@ -51,4 +51,18 @@ class WarUnitCity extends WarUnit{
|
||||
return true;
|
||||
}
|
||||
|
||||
function applyDB($db):bool{
|
||||
$updateVals = [];
|
||||
foreach(array_keys($this->updatedVar) as $key){
|
||||
$updateVals[$key] = $this->raw[$key];
|
||||
}
|
||||
|
||||
if(!$updateVals){
|
||||
return false;
|
||||
}
|
||||
|
||||
$db->update('city', $updateVals, 'city=%i', $this->raw['city']);
|
||||
return $db->affectedRows() > 0;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user