From 5b71b593588d0c64d2683700bc0473b3cc815db1 Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Sun, 4 Aug 2024 16:33:41 -0400 Subject: [PATCH] Core/Pets: Removed overriding unit class for pets Port From (https://github.com/TrinityCore/TrinityCore/commit/2c702df4e3b25d764a2712577048921008a20671) --- Source/Game/Entities/Pet.cs | 1 - Source/Game/Entities/TemporarySummon.cs | 4 +--- Source/Game/Entities/Unit/Unit.cs | 13 ++----------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/Source/Game/Entities/Pet.cs b/Source/Game/Entities/Pet.cs index 2d3add007..85446cd83 100644 --- a/Source/Game/Entities/Pet.cs +++ b/Source/Game/Entities/Pet.cs @@ -220,7 +220,6 @@ namespace Game.Entities case PetType.Summon: petlevel = owner.GetLevel(); - SetClass(Class.Mage); ReplaceAllUnitFlags(UnitFlags.PlayerControlled); // this enables popup window (pet dismiss, cancel) break; case PetType.Hunter: diff --git a/Source/Game/Entities/TemporarySummon.cs b/Source/Game/Entities/TemporarySummon.cs index d211b327a..3e3d71dfc 100644 --- a/Source/Game/Entities/TemporarySummon.cs +++ b/Source/Game/Entities/TemporarySummon.cs @@ -553,7 +553,6 @@ namespace Game.Entities // Death Knight pets public bool IsPetGhoul() { return GetEntry() == (uint)PetEntry.Ghoul; } // Ghoul may be guardian or pet - public bool IsPetAbomination() { return GetEntry() == (uint)PetEntry.Abomination; } // Sludge Belcher dk talent // Shaman pet public bool IsSpiritWolf() { return GetEntry() == (uint)PetEntry.SpiritWolf; } // Spirit wolf from feral spirits @@ -684,7 +683,7 @@ namespace Game.Entities } // Power - SetPowerType(powerType); + SetPowerType(powerType, true, true); // Damage SetBonusDamage(0); @@ -1240,7 +1239,6 @@ namespace Game.Entities // Death Knight pets Ghoul = 26125, - Abomination = 106848, // Shaman pet SpiritWolf = 29264 diff --git a/Source/Game/Entities/Unit/Unit.cs b/Source/Game/Entities/Unit/Unit.cs index 667ae041d..1dce8b7b9 100644 --- a/Source/Game/Entities/Unit/Unit.cs +++ b/Source/Game/Entities/Unit/Unit.cs @@ -1760,17 +1760,8 @@ namespace Game.Entities if (powerDisplay != null) displayPower = (PowerType)powerDisplay.ActualType; } - else - { - Pet pet = ToPet(); - if (pet != null) - { - if (pet.GetPetType() == PetType.Hunter) // Hunter pets have focus - displayPower = PowerType.Focus; - else if (pet.IsPetGhoul() || pet.IsPetAbomination()) // DK pets have energy - displayPower = PowerType.Energy; - } - } + else if (IsHunterPet()) + displayPower = PowerType.Focus; } break; }