mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 20:02:25 +01:00
Core/GameObject: Hunter traps now always put the Hunter in combat with the target when triggered. Closes #21847.
This commit is contained in:
@@ -692,6 +692,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
|
||||
CastSpellExtraArgs args;
|
||||
args.SetOriginalCaster(GetOwnerGUID());
|
||||
|
||||
@@ -78,7 +78,7 @@ class npc_pet_hunter_snake_trap : public CreatureScript
|
||||
}
|
||||
|
||||
// Redefined for random target selection:
|
||||
void MoveInLineOfSight(Unit* who) override { }
|
||||
void MoveInLineOfSight(Unit* /*who*/) override { }
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user