16 std::map<uint32_t, Telegraph>
shown;
17 for (
const protocol::Monster& monster : world.monsters()) {
18 const auto kind = kinds_.find(monster.kind());
19 if (monster.motion() != protocol::MOTION_SKILL || kind == kinds_.end()) {
22 const auto skill = std::ranges::find(kind->second.skills(), monster.skill(),
23 &monsters::Skill::id);
24 if (skill == kind->second.skills().end()) {
27 const float left =
static_cast<float>(monster.lands_in()) / 1000.0f;
28 const auto before = shown_.find(monster.id());
29 if (before == shown_.end() || before->second.skill.id() != skill->id() ||
30 left > before->second.left +
kLate) {
31 shown[monster.id()] = {.skill = *skill,
32 .at = {.x = monster.x(), .z = monster.z()},
41 telegraph.
left = std::max(std::min(telegraph.
left - seconds, left), 0.0f);
42 shown[monster.id()] = std::move(telegraph);
44 shown_ = std::move(
shown);