mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
chore(Core/Misc): nullptr cleanup (#11467)
This commit is contained in:
@@ -8943,7 +8943,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
|
||||
// All ok. Check current trigger spell
|
||||
SpellInfo const* triggerEntry = sSpellMgr->GetSpellInfo(trigger_spell_id);
|
||||
if (triggerEntry == nullptr)
|
||||
if (!triggerEntry)
|
||||
{
|
||||
// Don't cast unknown spell
|
||||
LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell {} (effIndex: {}) has unknown TriggerSpell {}. Unhandled custom case?", auraSpellInfo->Id, triggeredByAura->GetEffIndex(), trigger_spell_id);
|
||||
@@ -9386,7 +9386,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
}
|
||||
|
||||
// try detect target manually if not set
|
||||
if (target == nullptr)
|
||||
if (!target)
|
||||
target = !(procFlags & (PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS | PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS)) && triggerEntry->IsPositive() ? this : victim;
|
||||
|
||||
if (cooldown)
|
||||
@@ -15761,7 +15761,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
continue;
|
||||
|
||||
// If not trigger by default and spellProcEvent == nullptr - skip
|
||||
if (!isTriggerAura[aurEff->GetAuraType()] && triggerData.spellProcEvent == nullptr)
|
||||
if (!isTriggerAura[aurEff->GetAuraType()] && !triggerData.spellProcEvent)
|
||||
continue;
|
||||
|
||||
switch (aurEff->GetAuraType())
|
||||
|
||||
Reference in New Issue
Block a user