Core/Creatures: fixed showing pet spells in action bars

This commit is contained in:
Ovahlord committed 2025-08-23 08:40:00 +02:00
1 parent 73effb91ad
commit 85a5e24182
1 file changed
+7 -7
@@ -68,13 +68,6 @@ void SummonInfo::InitializeSummonProperties(uint32 summonPropertiesId, Unit cons
// Controlled summons inherit their summoner's faction if not overridden by DBC data
if (!_factionId.has_value())
_factionId = summoner->GetFaction();
// The summon is going to be treated as a pet. Prepare spell list.
if (_control == SummonPropertiesControl::Pet)
{
if (CharmInfo* charmInfo = _summonedCreature->InitCharmInfo())
charmInfo->InitCharmCreateSpells();
}
}
}
}
@@ -116,6 +109,13 @@ Optional<uint8> SummonInfo::GetCreatureLevel() const
void SummonInfo::HandlePreSummonActions()
{
// The summon is going to be treated as a pet. Prepare spell list.
if (_control == SummonPropertiesControl::Pet)
{
if (CharmInfo* charmInfo = _summonedCreature->InitCharmInfo())
charmInfo->InitCharmCreateSpells();
}
if (Unit* summoner = GetUnitSummoner())
{
SummonPropertiesSlot slot = GetSummonSlot();