Core/Pet: load template immunities when creating (except for hunters)
Port From (https://github.com/TrinityCore/TrinityCore/commit/053d0cfda5a96160f9e480e29bd432bc59568f86)
This commit is contained in:
@@ -1698,7 +1698,7 @@ namespace Game.Entities
|
|||||||
ForcedDespawn(msTimeToDespawn, forceRespawnTimer);
|
ForcedDespawn(msTimeToDespawn, forceRespawnTimer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadMechanicTemplateImmunity()
|
public void LoadMechanicTemplateImmunity()
|
||||||
{
|
{
|
||||||
// uint32 max used for "spell id", the immunity system will not perform SpellInfo checks against invalid spells
|
// uint32 max used for "spell id", the immunity system will not perform SpellInfo checks against invalid spells
|
||||||
// used so we know which immunities were loaded from template
|
// used so we know which immunities were loaded from template
|
||||||
|
|||||||
@@ -356,6 +356,8 @@ namespace Game.Entities
|
|||||||
if (owner.IsTypeId(TypeId.Player) && IsControlled() && !IsTemporarySummoned() && (GetPetType() == PetType.Summon || GetPetType() == PetType.Hunter))
|
if (owner.IsTypeId(TypeId.Player) && IsControlled() && !IsTemporarySummoned() && (GetPetType() == PetType.Summon || GetPetType() == PetType.Hunter))
|
||||||
owner.ToPlayer().SetLastPetNumber(petId);
|
owner.ToPlayer().SetLastPetNumber(petId);
|
||||||
|
|
||||||
|
// must be after SetMinion (owner guid check)
|
||||||
|
LoadMechanicTemplateImmunity();
|
||||||
m_loading = false;
|
m_loading = false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user