Core/SAI: Allow dropping a specific amount of aura charges using SMART_ACTION_REMOVEAURASFROMSPELL (action_param2).
(cherry picked from commit ed4feec276bd395715c23c58b74a6dae4198039b)
This commit is contained in:
1 parent
11e192cb81
commit
b61098a2d4
2 files changed
+11
-2
No files matched your search
@@ -776,7 +776,15 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
continue;
|
||||
|
||||
if (e.action.removeAura.spell)
|
||||
(*itr)->ToUnit()->RemoveAurasDueToSpell(e.action.removeAura.spell);
|
||||
{
|
||||
if (e.action.removeAura.charges)
|
||||
{
|
||||
if (Aura* aur = (*itr)->ToUnit()->GetAura(e.action.removeAura.spell))
|
||||
aur->ModCharges(-e.action.removeAura.charges, AURA_REMOVE_BY_EXPIRE);
|
||||
}
|
||||
else
|
||||
(*itr)->ToUnit()->RemoveAurasDueToSpell(e.action.removeAura.spell);
|
||||
}
|
||||
else
|
||||
(*itr)->ToUnit()->RemoveAllAuras();
|
||||
|
||||
|
||||
Reference in new issue
Block a user