Core/Pet: load template immunities when creating (except for hunters)

Port From (https://github.com/TrinityCore/TrinityCore/commit/053d0cfda5a96160f9e480e29bd432bc59568f86)
This commit is contained in:
hondacrx
2020-05-06 13:38:48 -04:00
parent 4b55ac1e0e
commit 24cee23c13
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -1698,7 +1698,7 @@ namespace Game.Entities
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
// used so we know which immunities were loaded from template
+2
View File
@@ -356,6 +356,8 @@ namespace Game.Entities
if (owner.IsTypeId(TypeId.Player) && IsControlled() && !IsTemporarySummoned() && (GetPetType() == PetType.Summon || GetPetType() == PetType.Hunter))
owner.ToPlayer().SetLastPetNumber(petId);
// must be after SetMinion (owner guid check)
LoadMechanicTemplateImmunity();
m_loading = false;
return true;