From 0ead6a50b5d860406c6218dc59a6ca161009f86b Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 28 Feb 2025 19:56:36 +0000 Subject: [PATCH] Clarify TryMoveHero netpack fields --- lib/networkPacks/PacksForClient.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/networkPacks/PacksForClient.h b/lib/networkPacks/PacksForClient.h index 9a0b20f45..e4f96fa48 100644 --- a/lib/networkPacks/PacksForClient.h +++ b/lib/networkPacks/PacksForClient.h @@ -640,13 +640,20 @@ struct DLL_LINKAGE TryMoveHero : public CPackForClient DISEMBARK }; + /// ID of moved hero ObjectInstanceID id; + /// Movement points that hero will have after movement ui32 movePoints = 0; - EResult result = FAILED; //uses EResult - int3 start; //h3m format + /// Result of movement attempt. FAILED should generally never happen unless client requested invalid operation + EResult result = FAILED; + /// Hero anchor position from which hero moves + int3 start; + /// Hero anchor position to which hero moves int3 end; - std::unordered_set fowRevealed; //revealed tiles - std::optional attackedFrom; // Set when stepping into endangered tile. + /// Tiles that were revealed by this move + std::unordered_set fowRevealed; + /// If hero moves on guarded tile, this field will be set to visitable pos of attacked wandering monster + int3 attackedFrom; void visitTyped(ICPackVisitor & visitor) override;