전투 추가 구현
This commit is contained in:
1 parent
fb8d3a038d
commit
dd5b1dbdd8
6 files changed
+65
-25
No files matched your search
@@ -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