Core/Pets: Removed overriding unit class for pets

This commit is contained in:
Shauren
2024-03-30 21:52:56 +01:00
parent def601b4ff
commit 2c702df4e3
3 changed files with 3 additions and 11 deletions

View File

@@ -33,7 +33,6 @@ enum PetEntry
// Death Knight pets
PET_GHOUL = 26125,
PET_ABOMINATION = 106848,
// Shaman pet
PET_SPIRIT_WOLF = 29264
@@ -115,7 +114,6 @@ class TC_GAME_API Minion : public TempSummon
// Death Knight pets
bool IsPetGhoul() const { return GetEntry() == PET_GHOUL; } // Ghoul may be guardian or pet
bool IsPetAbomination() const { return GetEntry() == PET_ABOMINATION; } // Sludge Belcher dk talent
// Shaman pet
bool IsSpiritWolf() const { return GetEntry() == PET_SPIRIT_WOLF; } // Spirit wolf from feral spirits

View File

@@ -288,7 +288,6 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c
{
case SUMMON_PET:
petlevel = owner->GetLevel();
SetClass(CLASS_MAGE);
ReplaceAllUnitFlags(UNIT_FLAG_PLAYER_CONTROLLED); // this enables popup window (pet dismiss, cancel)
break;
case HUNTER_PET:
@@ -918,7 +917,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
}
// Power
SetPowerType(powerType);
SetPowerType(powerType, true, true);
// Damage
SetBonusDamage(0);

View File

@@ -5631,13 +5631,8 @@ Powers Unit::CalculateDisplayPowerType() const
if (PowerDisplayEntry const* powerDisplay = sPowerDisplayStore.LookupEntry(vehicle->GetVehicleInfo()->PowerDisplayID[0]))
displayPower = Powers(powerDisplay->ActualType);
}
else if (Pet const* pet = ToPet())
{
if (pet->getPetType() == HUNTER_PET) // Hunter pets have focus
displayPower = POWER_FOCUS;
else if (pet->IsPetGhoul() || pet->IsPetAbomination()) // DK pets have energy
displayPower = POWER_ENERGY;
}
else if (IsHunterPet())
displayPower = POWER_FOCUS;
}
break;
}