From 30851f71cf8c884cc47a5c50c39476d1448b7fe9 Mon Sep 17 00:00:00 2001 From: Bob <80072466+bob0005@users.noreply.github.com> Date: Tue, 24 Dec 2024 14:09:45 +0100 Subject: [PATCH] Fix missing arrival when sending lords & donkeys (#2594) (#2595) --- client/src/hooks/helpers/use-resource-arrivals.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/hooks/helpers/use-resource-arrivals.tsx b/client/src/hooks/helpers/use-resource-arrivals.tsx index 4530c7223..f967ccde8 100644 --- a/client/src/hooks/helpers/use-resource-arrivals.tsx +++ b/client/src/hooks/helpers/use-resource-arrivals.tsx @@ -8,6 +8,7 @@ import useNextBlockTimestamp from "../useNextBlockTimestamp"; const DONKEY_RESOURCE_TRACKER = 452312848583266388373324160190187140051835877600158453279131187530910662656n; const LORDS_RESOURCE_TRACKER = 7237005577332262213973186563042994240829374041602535252466099000494570602496n; +const LORDS_AND_DONKEY_RESOURCE_TRACKER = 7689318425915528602346510723233181380881209919202693705745230188025481265152n; export type ArrivalInfo = { entityId: ID; @@ -69,7 +70,9 @@ const usePlayerArrivals = () => { // Check if entity has special resource types that don't need weight check const hasSpecialResources = ownedResourceTracker?.resource_types === DONKEY_RESOURCE_TRACKER || - ownedResourceTracker?.resource_types === LORDS_RESOURCE_TRACKER; + ownedResourceTracker?.resource_types === LORDS_RESOURCE_TRACKER || + ownedResourceTracker?.resource_types === LORDS_AND_DONKEY_RESOURCE_TRACKER; + // Determine if entity meets weight requirements const meetsWeightRequirement = hasSpecialResources || hasMinWeight(id); @@ -82,7 +85,6 @@ const usePlayerArrivals = () => { // Check if entity has resources const hasResources = meetsWeightRequirement && !!ownedResourceTracker && ownedResourceTracker.resource_types !== 0n; - // Find matching player structure at position const playerStructurePosition = playerStructurePositions.find( (structurePosition) => structurePosition.x === position.x && structurePosition.y === position.y,