mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
fix(Core/Misc): bunch of crashfixes (#7307)
This commit is contained in:
@@ -34,7 +34,7 @@ public:
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
if (Unit* owner = me->ToTempSummon()->GetSummoner())
|
||||
if (Unit* owner = me->ToTempSummon()->GetSummonerUnit())
|
||||
{
|
||||
uint32 hp = uint32(owner->GetMaxHealth() * 0.3f);
|
||||
me->SetMaxHealth(hp);
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (me->IsSummon())
|
||||
if (Unit* owner = me->ToTempSummon()->GetSummoner())
|
||||
if (Unit* owner = me->ToTempSummon()->GetSummonerUnit())
|
||||
if (owner->HasAura(SPELL_PRIEST_GLYPH_OF_SHADOWFIEND))
|
||||
owner->CastSpell(owner, SPELL_PRIEST_GLYPH_OF_SHADOWFIEND_MANA, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user