Help! Help with playerlist

asdf101

Platinian
Original poster
Jun 8, 2021
15
2
3
24
-
Im currently modding an online unity il2cpp game and Im trying to get a playerlist.
But I don't know how to make a function pointer to it because it has a predicate<player> inside it.
Any help appreciated.
C#:
// RVA: 0x140D26C Offset: 0x140D26C VA: 0x140D26C
    public static List<RemotePlayer> GetRemotePlayers(Predicate<RemotePlayer> predicate) { }
 

Tiahh

Solid & Active Platinian
Jan 12, 2018
75
44
18
37
You could just do void* use this function for List:
C++:
/*
This struct represents a List. In the dump, a List is declared as List`1.
Deep down, this simply wraps a C array around a C# list. For example, if you had this in a dump,
public class Player {
    List`1<int> perks; // 0xDC
}
getting that list would look like this: monoList<int *> *perks = *(monoList<int *> **)((uint64_t)player + 0xdc);
You can also get lists that hold objects, but you need to use void ** because we don't have implementation for the Weapon class.
public class Player {
    List`1<Weapon> weapons; // 0xDC
}
getting that list would look like this: monoList<void **> *weapons = *(monoList<void **> **)((uint64_t)player + 0xdc);
If you need a list of strings, use monoString **.
To get the C array, call getItems.
To get the size of a monoList, call getSize.
*/
template <typename T>
struct monoList {
    void *unk0;
    void *unk1;
    monoArray<T> *items;
    int size;
    int version;
    
    T getItems(){
        return items->getPointer();
    }
    
    int getSize(){
        return size;
    }
    
    int getVersion(){
        return version;
    }
};