Interrupt autoshot by deselecting target

This commit is contained in:
Olion 2015-10-06 11:54:39 +03:00 committed by Antz
parent 8d7be47e39
commit aa7f682aa9

View File

@ -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)