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

@@ -296,7 +296,7 @@ public:
case SPELL_VISUAL_THROW_CRANBERRY:
case SPELL_VISUAL_THROW_SWEET_POTATO:
if (TempSummon* ts = me->ToTempSummon())
if (Unit* owner = ts->GetSummoner())
if (Unit* owner = ts->GetSummonerUnit())
owner->ToCreature()->AI()->DoAction(spellInfo->Id);
break;
}
@@ -376,7 +376,7 @@ public:
else
{
if (TempSummon* ts = target->ToTempSummon())
if (Unit* owner = ts->GetSummoner())
if (Unit* owner = ts->GetSummonerUnit())
if (owner->GetEntry() == GetCaster()->GetEntry())
return;