diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index d5b59d8827..cdd2a31034 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -863,13 +863,21 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (e.action.removeAura.spell) { + ObjectGuid casterGUID; + if (e.action.removeAura.onlyOwnedAuras) + { + if (!me) + break; + casterGUID = me->GetGUID(); + } + if (e.action.removeAura.charges) { - if (Aura* aur = target->ToUnit()->GetAura(e.action.removeAura.spell)) + if (Aura* aur = target->ToUnit()->GetAura(e.action.removeAura.spell, casterGUID)) aur->ModCharges(-static_cast(e.action.removeAura.charges), AURA_REMOVE_BY_EXPIRE); } else - target->ToUnit()->RemoveAurasDueToSpell(e.action.removeAura.spell); + target->ToUnit()->RemoveAurasDueToSpell(e.action.removeAura.spell, casterGUID); } else target->ToUnit()->RemoveAllAuras(); diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index f2e9d4b55d..729190e892 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -721,6 +721,7 @@ struct SmartAction { uint32 spell; uint32 charges; + uint32 onlyOwnedAuras; } removeAura; struct