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

This commit is contained in:
Treeston
2018-07-24 21:15:06 +02:00
committed by Ovahlord
parent 5677d65eed
commit 77233dd073

View File

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