mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Merge pull request #16193 from Goatform/3.3.5
Core/GameObjects: Fixed an issue where traps were not redirected to Grounding Totem
(cherry picked from commit 2a50ea5cf1)
This commit is contained in:
@@ -1854,6 +1854,8 @@ void GameObject::CastSpell(Unit* target, uint32 spellId, bool triggered /*= true
|
||||
if (Unit* owner = GetOwner())
|
||||
{
|
||||
trigger->setFaction(owner->getFaction());
|
||||
if (owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE))
|
||||
trigger->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||
// needed for GO casts for proper target validation checks
|
||||
trigger->SetOwnerGUID(owner->GetGUID());
|
||||
trigger->CastSpell(target ? target : trigger, spellInfo, triggered, nullptr, nullptr, owner->GetGUID());
|
||||
|
||||
Reference in New Issue
Block a user