Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Core/Creatures: totem slot summons will now despawn when the summoner…
Browse files Browse the repository at this point in the history
… dies
  • Loading branch information
Ovahlord committed Oct 25, 2023
1 parent 2aa9804 commit 6575616
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,14 @@ Unit* NewTemporarySummon::GetInternalSummoner() const

bool NewTemporarySummon::ShouldDespawnOnSummonerDeath() const
{
return _summonProperties && _summonProperties->GetFlags().HasFlag(SummonPropertiesFlags::DespawnOnSummonerDeath);
if (_summonProperties && _summonProperties->GetFlags().HasFlag(SummonPropertiesFlags::DespawnOnSummonerDeath))
return true;

// Totem slot summons will also despawn when the summoner has died
if (AsUnderlyingType(_summonSlot) >= AsUnderlyingType(SummonPropertiesSlot::Totem1) && AsUnderlyingType(_summonSlot) <= AsUnderlyingType(SummonPropertiesSlot::Totem4))
return true;

return false;
}

bool NewTemporarySummon::ShouldDespawnOnSummonerLogout() const
Expand Down

0 comments on commit 6575616

Please sign in to comment.