Add free cloak-style auto-hunt pull for 3 10 or 20 monster groups

This commit is contained in:
shen
2026-09-30 17:07:24 -07:00
parent d1f8d3dddd
commit 8a6aeaedf0
18 changed files with 558 additions and 96 deletions
+11
View File
@@ -864,6 +864,17 @@ bool FakeLoginServer::ServeGame(Connection& c, int index)
return Fail(name + ": send GC_SAFEBOX_SET");
}
}
else if (text.rfind("/autohunt_pull ", 0) == 0) {
int groups = 0, radius = 0, bosses = 0;
unsigned request = 0;
if (sscanf(text.c_str() + 15, "%d %d %d %u", &groups, &radius, &bosses, &request) != 4)
return Fail(name + ": malformed autohunt pull");
for (const std::string& cmd : {"AutoHuntGather " + std::to_string(request) + " mob " + std::to_string(kMobVID),
"AutoHuntGather " + std::to_string(request) + " done 1"}) {
GCChatHead chat = {HDR_GC_CHAT, static_cast<std::uint16_t>(sizeof(GCChatHead) + cmd.size() + 1), 5, 0, 1};
if (!c.Send(chat) || !c.Send(cmd.c_str(), cmd.size() + 1)) return Fail(name + ": autohunt pull reply");
}
}
else if (text == "/safebox_close")
{
Event(name + ":safebox_close");