In a random walk, it is hard to efficiently avoid processing the same element twice. If shuffling is slow, create an array of indexes, and shuffle that. Also, where does std::random_shuffle() get its randomness?
Suggested code:
0std::vector<int> vRandInv;
1vRandInv.resize(pto->vInventoryToSend.size());
2for (int i = 0; i < pto->vRandInv.size(); i++) vRandInv[i] = i;
3for (int i = 0; i < pto->vRandInv.size(); i++) std::swap(vRandInv[i], vRandInv[i + GetRand(vRandInv.size() - i]);
4
5for (int i = 0; i < pto->vRandInv.size(); i++) {
6 const CInv& inv = pto->vInventoryToSend[vRandInv[i]];
7
8 ...