From 09caff2b2a06d1f8ac8203567035a21c612165f9 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Thu, 11 Jan 2024 13:15:02 +0100 Subject: send resources --- src/EventRunner.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'src/EventRunner.php') diff --git a/src/EventRunner.php b/src/EventRunner.php index 2f2fd8b..e4bdb40 100644 --- a/src/EventRunner.php +++ b/src/EventRunner.php @@ -9,6 +9,8 @@ use App\Model\Building\IronMine; use App\Model\Building\ResourceGenerator; use App\Model\Building\Storage; use App\Model\Building\WoodCutter; +use App\Model\Event\SendResources; +use App\Model\Event\SendResourcesCarriers; use App\Model\Event\SendUnits; use App\Model\Event\TrainUnits; use App\Model\Event\UpgradeBuilding; @@ -71,6 +73,40 @@ class EventRunner $event->dbDelete(); } + # Send Resources + + $results = DB::query(<<fetchAll(); + + foreach ($results as $row) { + /**@var SendResources $event*/ + $event = DB::convertToModel(SendResources::class, $row); + $event(); + + $event->dbDelete(); + } + + # Send Resources Carriers + + $results = DB::query(<<fetchAll(); + + foreach ($results as $row) { + /**@var SendResourcesCarriers $event*/ + $event = DB::convertToModel(SendResourcesCarriers::class, $row); + $event(); + + $event->dbDelete(); + } + // Resources -- cgit v1.2.3