Core/SAI: If spell id in SMART_ACTION_REMOVEAURASFROMSPELL is 0, remove all auras instead

Signed-off-by: Nay <dnpd.dd@gmail.com>
This commit is contained in:
Nay
2012-06-02 14:28:24 +01:00
parent adcd4e0a5d
commit cffcf633c3
3 changed files with 7 additions and 3 deletions

View File

@@ -789,7 +789,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!IsUnit((*itr)))
continue;
(*itr)->ToUnit()->RemoveAurasDueToSpell(e.action.removeAura.spell);
if (e.action.removeAura.spell == 0)
(*itr)->ToUnit()->RemoveAllAuras();
else
(*itr)->ToUnit()->RemoveAurasDueToSpell(e.action.removeAura.spell);
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_REMOVEAURASFROMSPELL: Unit %u, spell %u",
(*itr)->GetGUIDLow(), e.action.removeAura.spell);
}