mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/BattlePets: Misc fixes (#26964)
* Define BattlePetSpeciesFlags enum class. * Define BattlePetDbFlags enum class. * Added check to prevent the pet from being caged if its species has flag BattlePetSpeciesFlags::NotTradable. * Added check to prevent the pet from being caged if it's in battle pet slots. * Added check to prevent the pet from being caged if its health is below maximum health. * Only add pet if the species has flag BattlePetSpeciesFlags::WellKnown. * Added function to check flag BattlePetSpeciesFlags::LegacyAccountUnique to avoid learning copies of unique pets. * Implemented CMSG_BATTLE_PET_CLEAR_FANFARE.
This commit is contained in:
@@ -5607,7 +5607,7 @@ void Spell::EffectUncageBattlePet()
|
||||
return;
|
||||
}
|
||||
|
||||
if (battlePetMgr->GetPetCount(speciesId) >= MAX_BATTLE_PETS_PER_SPECIES)
|
||||
if (battlePetMgr->HasMaxPetCount(speciesEntry))
|
||||
{
|
||||
battlePetMgr->SendError(BATTLEPETRESULT_CANT_HAVE_MORE_PETS_OF_THAT_TYPE, creatureId); // or speciesEntry.CreatureID
|
||||
SendCastResult(SPELL_FAILED_CANT_ADD_BATTLE_PET);
|
||||
|
||||
Reference in New Issue
Block a user