mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
fix(Core/Misc): bunch of crashfixes (#7307)
This commit is contained in:
@@ -648,7 +648,7 @@ public:
|
||||
NullCreatureAI::InitializeAI();
|
||||
|
||||
if (TempSummon* summon = me->ToTempSummon())
|
||||
if (Unit* owner = summon->GetSummoner())
|
||||
if (Unit* owner = summon->GetSummonerUnit())
|
||||
if (owner->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
_ownerGUID = owner->GetGUID();
|
||||
|
||||
@@ -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