From be841fb3e1bd0c4f17924c405db416ee5720c8bf Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 21 Mar 2026 11:45:52 -0700 Subject: [PATCH] feat: fire AUTOFOLLOW_BEGIN and AUTOFOLLOW_END events Fire AUTOFOLLOW_BEGIN when the player starts following another unit via /follow. Fire AUTOFOLLOW_END when following is cancelled. Used by movement addons and AFK detection addons. --- src/game/game_handler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 73ae1727..114a55c2 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -14148,6 +14148,7 @@ void GameHandler::followTarget() { addSystemChatMessage("Now following " + targetName + "."); LOG_INFO("Following target: ", targetName, " (GUID: 0x", std::hex, targetGuid, std::dec, ")"); + if (addonEventCallback_) addonEventCallback_("AUTOFOLLOW_BEGIN", {}); } void GameHandler::cancelFollow() { @@ -14157,6 +14158,7 @@ void GameHandler::cancelFollow() { } followTargetGuid_ = 0; addSystemChatMessage("You stop following."); + if (addonEventCallback_) addonEventCallback_("AUTOFOLLOW_END", {}); } void GameHandler::assistTarget() {