From e5a243a52b910e35b10b26c06aa8978356b86769 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 2 Dec 2023 14:14:34 +0100 Subject: login and events --- src/Model/Village.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Model/Village.php') 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(); -- cgit v1.2.3