Fixed two crashes

This commit is contained in:
hondacrx
2021-03-30 11:14:16 -04:00
parent 10a939587f
commit 03cc39b4a2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -330,7 +330,7 @@ namespace Game.Entities
public virtual void OnCombatExit()
{
foreach (var pair in m_appliedAuras)
foreach (var pair in m_appliedAuras.KeyValueList)
{
AuraApplication aurApp = pair.Value;
aurApp.GetBase().CallScriptEnterLeaveCombatHandlers(aurApp, false);
+1 -1
View File
@@ -654,7 +654,7 @@ namespace Game.Entities
public float GetUnitSpellCriticalChance(Unit victim, Spell spell, AuraEffect aurEff, SpellSchoolMask schoolMask, WeaponAttackType attackType = WeaponAttackType.BaseAttack)
{
SpellInfo spellProto = spell.GetSpellInfo() ?? aurEff.GetSpellInfo();
SpellInfo spellProto = spell?.GetSpellInfo() ?? aurEff?.GetSpellInfo();
//! Mobs can't crit with spells. Player Totems can
//! Fire Elemental (from totem) can too - but this part is a hack and needs more research
if (GetGUID().IsCreatureOrVehicle() && !(IsTotem() && GetOwnerGUID().IsPlayer()) && GetEntry() != 15438)