public BaseItem GetItemFromCashID(long cashId, int itemid = 0) { if (itemid == 0) { var possibleItem = GetLockerItemFromCashID(cashId); if (possibleItem == null) { return(null); } itemid = possibleItem.ItemId; } if (Constants.isEquip(itemid)) { return(Equips.FirstOrDefault(x => x.CashId == cashId)); } else if (Constants.isPet(itemid)) { return(Pets.FirstOrDefault(x => x.CashId == cashId)); } else { return(Bundles.FirstOrDefault(x => x.CashId == cashId)); } }