From 11d75ebaae614e082055aaf7e6075e7c27bf9368 Mon Sep 17 00:00:00 2001 From: "Hello=)" Date: Fri, 17 May 2024 13:21:10 +0300 Subject: Mages Quality Of Life, part 2: This commit lands fix for infamous AFK-kill summons exploit. Its what essentially caused summoner spells in cities to be disabled. This is not free lunch: it comes at expense of little fun where mob would bite bad master hitting it. But its been minor fun or cosmetics while spells restriction in cities and so on is annoying setback for mages. So if choosing between evil and even more evil, guess... Technically, server's bug is: it too eager to reattach some things to wrong RID or something like this. Its what causes aggroed mob to lock on really wrong random targets and AFK-kill them. --- src/map/script-fun.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index 6e32264..1efa006 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -3188,8 +3188,8 @@ void builtin_summon(ScriptState *st) } mob->mode |= - MobMode::SUMMONED | MobMode::TURNS_AGAINST_BAD_MASTER; - + MobMode::SUMMONED; // | MobMode::TURNS_AGAINST_BAD_MASTER; <- its fun but bugged. + // This flag identified to be source of AFK PK city exploits, etc. mob->deletetimer = Timer(gettick() + lifespan, std::bind(mob_timer_delete, ph::_1, ph::_2, mob_id)); -- cgit v1.2.3-70-g09d2