Core/GameObject: Hunter traps now always put the Hunter in combat with the target when triggered. Closes #21847.

This commit is contained in:
Treeston authored and Ovahlord committed 2020-09-11 15:00:58 +02:00
1 parent 5677d65eed
commit 77233dd073
1 file changed
+4
@@ -693,6 +693,10 @@ void GameObject::Update(uint32 diff)
}
else if (Unit* target = ObjectAccessor::GetUnit(*this, m_lootStateUnitGUID))
{
// Set in combat with owner
if (Unit* owner = GetOwner())
target->EngageWithTarget(owner);
// Some traps do not have a spell but should be triggered
if (goInfo->trap.spellId)
CastSpell(target, goInfo->trap.spellId);