From aa7f682aa93bf6c346237ba7731b3a258ea62002 Mon Sep 17 00:00:00 2001 From: Olion Date: Tue, 6 Oct 2015 11:54:39 +0300 Subject: [PATCH] Interrupt autoshot by deselecting target --- src/game/WorldHandlers/MiscHandler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game/WorldHandlers/MiscHandler.cpp b/src/game/WorldHandlers/MiscHandler.cpp index 7aae194e..d4291a32 100644 --- a/src/game/WorldHandlers/MiscHandler.cpp +++ b/src/game/WorldHandlers/MiscHandler.cpp @@ -430,6 +430,12 @@ void WorldSession::HandleSetSelectionOpcode(WorldPacket& recv_data) _player->SetSelectionGuid(guid); + if (guid.IsEmpty()) // TODO this is probably a wrong place for such action, so it's a "hacky" or "wrong" fix + { + _player->InterruptSpell(CURRENT_AUTOREPEAT_SPELL, false); + return; + } + // update reputation list if need Unit* unit = ObjectAccessor::GetUnit(*_player, guid); // can select group members at diff maps if (!unit)