fix(Core/Misc): bunch of crashfixes (#7307)

This commit is contained in:
Viste
2021-09-14 15:38:56 +03:00
committed by GitHub
parent bd956b5a57
commit a9796af174
56 changed files with 435 additions and 328 deletions

View File

@@ -224,7 +224,7 @@ public:
// xinef: chance of success stores proper amount of damage increase
// xinef: little hack because GetSpellModOwner will return nullptr pointer at this point (early summoning stage)
if (GetUnitOwner()->IsSummon())
if (Unit* owner = GetUnitOwner()->ToTempSummon()->GetSummoner())
if (Unit* owner = GetUnitOwner()->ToTempSummon()->GetSummonerUnit())
if (Player* player = owner->GetSpellModOwner())
player->ApplySpellMod(SPELL_DRUID_BARKSKIN, SPELLMOD_CHANCE_OF_SUCCESS, amount);
}