Core/Achievements: Defined all modifier tree types and implemented many of them

Port From (https://github.com/TrinityCore/TrinityCore/commit/d0be92ec0ad0334c38b4073a7e24a571982b17da)
This commit is contained in:
hondacrx
2021-06-07 13:13:46 -04:00
parent 9c58042e07
commit 1941148d8f
18 changed files with 1677 additions and 674 deletions
@@ -319,6 +319,15 @@ namespace Game.BattlePets
return (byte)_pets.Values.Count(battlePet => battlePet.PacketInfo.Species == species && battlePet.SaveInfo != BattlePetSaveInfo.Removed);
}
public uint GetPetUniqueSpeciesCount()
{
HashSet<uint> speciesIds = new();
foreach (var pair in _pets)
speciesIds.Add(pair.Value.PacketInfo.Species);
return (uint)speciesIds.Count;
}
public void UnlockSlot(byte slot)
{
if (!_slots[slot].Locked)
@@ -460,6 +469,8 @@ namespace Game.BattlePets
public ushort GetTrapLevel() { return _trapLevel; }
public List<BattlePetSlot> GetSlots() { return _slots; }
public bool HasJournalLock() { return true; }
WorldSession _owner;
ushort _trapLevel;
Dictionary<ulong, BattlePet> _pets = new();