summaryrefslogtreecommitdiff
path: root/src/Model/Village.php
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-12-02 14:14:34 +0100
committerDaniel Weipert <code@drogueronin.de>2023-12-02 14:14:34 +0100
commite5a243a52b910e35b10b26c06aa8978356b86769 (patch)
tree74ddb82add2f3ea200e9fd11cfedb6c0cace09be /src/Model/Village.php
parentfa9096c0ab521aae45cab6c48a54290d14a221b9 (diff)
login and events
Diffstat (limited to 'src/Model/Village.php')
-rw-r--r--src/Model/Village.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Model/Village.php b/src/Model/Village.php
index 6c80ed0..c6709a6 100644
--- a/src/Model/Village.php
+++ b/src/Model/Village.php
@@ -176,6 +176,11 @@ class Village
});
}
}
+ else if ($returnFlag == Village::RETURN_UNIT_EXISTING) {
+ $units = array_filter($units, function (Unit $unit) {
+ return ! $unit->isTraveling;
+ });
+ }
return array_map(function (Unit $unit) {
return $unit->cast();