mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-07 04:47:45 +00:00
fix(Core/Misc): bunch of crashfixes (#7307)
This commit is contained in:
@@ -663,7 +663,7 @@ public:
|
||||
timer = 2500;
|
||||
if (me->IsSummon())
|
||||
{
|
||||
if (Unit* s = me->ToTempSummon()->GetSummoner())
|
||||
if (Unit* s = me->ToTempSummon()->GetSummonerUnit())
|
||||
{
|
||||
if ((s->GetTypeId() == TYPEID_PLAYER && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_PLAYER)) || (s->GetTypeId() == TYPEID_UNIT && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_NPC)))
|
||||
me->DespawnOrUnsummon(2000);
|
||||
|
||||
@@ -2405,7 +2405,7 @@ public:
|
||||
case SPELL_WATER_SPRAY:
|
||||
{
|
||||
if (me->IsSummon())
|
||||
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
|
||||
if (Unit* summoner = me->ToTempSummon()->GetSummonerUnit())
|
||||
if (Creature* c = summoner->ToCreature())
|
||||
if (c->AI())
|
||||
CAST_AI(npc_ulduar_flames_initial::npc_ulduar_flames_initialAI, c->AI())->RemoveFlame(me->GetGUID());
|
||||
|
||||
@@ -1769,7 +1769,7 @@ public:
|
||||
void JustDied(Unit*) override
|
||||
{
|
||||
if (me->IsSummon())
|
||||
if (Unit* sara = me->ToTempSummon()->GetSummoner())
|
||||
if (Unit* sara = me->ToTempSummon()->GetSummonerUnit())
|
||||
sara->GetAI()->DoAction(ACTION_INFLUENCE_TENTACLE_DIED);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user