private bool isProtoIdLoaded(int id) { foreach(ItemProto prot in LoadedProtos) if (prot.ProtoId == id) return true; return false; }