1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Allow sending requests to move across multiple tiles at once

This commit is contained in:
Ivan Savenko
2024-04-18 15:13:16 +03:00
parent 7d93206786
commit d5a2ad1be8
8 changed files with 55 additions and 21 deletions

View File

@@ -59,22 +59,23 @@ struct DLL_LINKAGE DismissHero : public CPackForServer
struct DLL_LINKAGE MoveHero : public CPackForServer
{
MoveHero() = default;
MoveHero(const int3 & Dest, const ObjectInstanceID & HID, bool Transit)
: dest(Dest)
MoveHero(const std::vector<int3> & path, const ObjectInstanceID & HID, bool Transit)
: path(path)
, hid(HID)
, transit(Transit)
{
}
int3 dest;
std::vector<int3> path;
ObjectInstanceID hid;
bool transit = false;
void visitTyped(ICPackVisitor & visitor) override;
template <typename Handler> void serialize(Handler & h)
template<typename Handler>
void serialize(Handler & h)
{
h & static_cast<CPackForServer &>(*this);
h & dest;
h & path;
h & hid;
h & transit;
}