From faa4035de7f217730a86eb3657c5c4008a84f18e Mon Sep 17 00:00:00 2001 From: IntelligentQuantum Date: Sun, 21 Nov 2021 15:51:21 +0330 Subject: [PATCH] fix(Core/Spells): Fix spellclick (#8232) --- src/server/game/Handlers/SpellHandler.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index c58307e05..7fbdef0a4 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -642,6 +642,11 @@ void WorldSession::HandleSpellClick(WorldPacket& recvData) if (!unit) return; + if (_player->IsHostileTo(unit)) + { + return; + } + // TODO: Unit::SetCharmedBy: 28782 is not in world but 0 is trying to charm it! -> crash if (!unit->IsInWorld()) return;