mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-17 21:50:50 -04: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))
|
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
|
// Some traps do not have a spell but should be triggered
|
||||||
CastSpellExtraArgs args;
|
CastSpellExtraArgs args;
|
||||||
args.SetOriginalCaster(GetOwnerGUID());
|
args.SetOriginalCaster(GetOwnerGUID());
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class npc_pet_hunter_snake_trap : public CreatureScript
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Redefined for random target selection:
|
// Redefined for random target selection:
|
||||||
void MoveInLineOfSight(Unit* who) override { }
|
void MoveInLineOfSight(Unit* /*who*/) override { }
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user