mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
fix(Core/Spells): possible crashes within class spells (#9168)
This commit is contained in:
@@ -156,6 +156,11 @@ class spell_mage_molten_armor : public AuraScript
|
||||
if (!spellInfo || (eventInfo.GetTypeMask() & PROC_FLAG_TAKEN_MELEE_AUTO_ATTACK))
|
||||
return true;
|
||||
|
||||
if (!eventInfo.GetActionTarget())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Xinef: Molten Shields talent
|
||||
if (AuraEffect* aurEff = eventInfo.GetActionTarget()->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_MAGE, 16, EFFECT_0))
|
||||
return roll_chance_i(aurEff->GetSpellInfo()->GetRank() * 50);
|
||||
@@ -803,7 +808,7 @@ class spell_mage_master_of_elements : public AuraScript
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
_spellInfo = eventInfo.GetSpellInfo();
|
||||
if (!_spellInfo)
|
||||
if (!_spellInfo || !eventInfo.GetActor() || !eventInfo.GetActionTarget())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user