public void UnlockSlot(BattlePetSlots slot) { if (slot >= BattlePetSlots.Count) { return; } byte slotIndex = (byte)slot; if (!_slots[slotIndex].Locked) { return; } _slots[slotIndex].Locked = false; PetBattleSlotUpdates updates = new(); updates.Slots.Add(_slots[slotIndex]); updates.AutoSlotted = false; // what's this? updates.NewSlot = true; // causes the "new slot unlocked" bubble to appear _owner.SendPacket(updates); }
public BattlePetSlot GetSlot(BattlePetSlots slot) { return(slot < BattlePetSlots.Count ? _slots[(byte)slot] : null); }