Core/Battle Pets: Fixed possible crash in packet handler
Port From (https://github.com/TrinityCore/TrinityCore/commit/ce8f9b9a4efc8a3f110465db5310f08067658f60)
This commit is contained in:
@@ -454,7 +454,7 @@ namespace Game.BattlePets
|
||||
_owner.SendPacket(battlePetError);
|
||||
}
|
||||
|
||||
public BattlePetSlot GetSlot(byte slot) { return _slots[slot]; }
|
||||
public BattlePetSlot GetSlot(byte slot) { return slot < _slots.Count ? _slots[slot] : null; }
|
||||
WorldSession GetOwner() { return _owner; }
|
||||
|
||||
public ushort GetTrapLevel() { return _trapLevel; }
|
||||
|
||||
Reference in New Issue
Block a user