private int SortByPetBattling(PetDataEx aItem, PetDataEx bItem) { if (!aItem.IsPetBattling()) { if (!bItem.IsPetBattling()) { return this.SortByPetAssisting(aItem, bItem); } return 1; } else { if (!bItem.IsPetBattling()) { return -1; } return this.SortByPetAssisting(aItem, bItem); } }