Skip to content

Commit

Permalink
Vehicle: Fix aura tracking unboard not using proper exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Nov 20, 2023
1 parent b52cba1 commit 55af748
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/game/Entities/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5365,16 +5365,16 @@ bool Unit::AddSpellAuraHolder(SpellAuraHolder* holder)
SpellEntry const* itr_spellEntry = itr->first;
ObjectGuid itr_targetGuid = itr->second; // Target on whom the tracked aura is

if (itr_targetGuid == GetObjectGuid()) // Note: I don't understand this check (based on old aura concepts, kept when adding holders)
{
++itr;
continue;
}

bool removed = false;
switch (trackedType)
{
case TRACK_AURA_TYPE_SINGLE_TARGET:
if (itr_targetGuid == GetObjectGuid()) // Note: I don't understand this check (based on old aura concepts, kept when adding holders)
{
++itr;
continue;
}

if (sSpellMgr.IsSingleTargetSpells(itr_spellEntry, aurSpellInfo))
{
removed = true;
Expand All @@ -5400,7 +5400,7 @@ bool Unit::AddSpellAuraHolder(SpellAuraHolder* holder)

// remove from target if target found
if (Unit* itr_target = GetMap()->GetUnit(itr_targetGuid))
itr_target->RemoveAurasByCasterSpell(itr_spellEntry->Id, caster->GetObjectGuid());
itr_target->RemoveAurasByCasterSpell(itr_spellEntry->Id, caster->GetObjectGuid(), AURA_REMOVE_BY_TRACKING);
else // Normally the tracking will be removed by the AuraRemoval
scTargets.erase(itr);
}
Expand Down

0 comments on commit 55af748

Please sign in to comment.