feat(CI): add cppcheck (#15211)

Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com>
This commit is contained in:
Stefano Borzì 2023-03-05 18:47:18 +01:00 committed by GitHub
parent a5b4aecd52
commit 034b521501
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 91 additions and 41 deletions

View file

@ -1008,9 +1008,12 @@ public:
break;
}
if (Aura* aura = target->GetAura(uint32(GetSpellInfo()->Effects[stage].CalcValue())))
if (aura->GetOwner() == target) // avoid assert(false) at any cost
aura->UpdateOwner(5000, target); // update whole aura so previous periodic ticks before refreshed by new one
if (target)
{
if (Aura* aura = target->GetAura(uint32(GetSpellInfo()->Effects[stage].CalcValue())))
if (aura->GetOwner() == target) // avoid assert(false) at any cost
aura->UpdateOwner(5000, target); // update whole aura so previous periodic ticks before refreshed by new one
}
GetCaster()->CastSpell(target, uint32(GetSpellInfo()->Effects[stage].CalcValue()), true, nullptr, nullptr, GetCaster()->GetGUID());
}