浏览代码

Clarify TryMoveHero netpack fields

Ivan Savenko 7 月之前
父节点
当前提交
0ead6a50b5
共有 1 个文件被更改,包括 11 次插入4 次删除
  1. 11 4
      lib/networkPacks/PacksForClient.h

+ 11 - 4
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<int3> fowRevealed; //revealed tiles
-	std::optional<int3> attackedFrom; // Set when stepping into endangered tile.
+	/// Tiles that were revealed by this move
+	std::unordered_set<int3> 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;