Help! Can i hook this function?

NoPref

Platinian
C#:
        // Token: 0x0600321E RID: 12830 RVA: 0x00002053 File Offset: 0x00000253
        [Token(Token = "0x600321E")]
        [Address(RVA = "0xC441B4", Offset = "0xC441B4", VA = "0xC441B4")]
        public void AddCurrency(int currencyId, float amount)
        {
        }
 
guiding you in the right direction without giving a straight up answer is the best way of teaching. In your case, the direction you need to start looking is: "function pointers"

in other words, yes.

Good luck my friend!
 
guiding you in the right direction without giving a straight up answer is the best way of teaching. In your case, the direction you need to start looking is: "function pointers"

in other words, yes.

Good luck my friend!

I'm not sure I can hook it, because i found out it's probably a server function (It's in the Bolt.Dll file)
 
can🌱 :pepe017:

C++:
void (*old_VoidTes)(void *instance,int testb,float amount);

void VoidTes(void *instance,int testb,float amount) {

    if (instance != NULL && XLUA.Test) {



        return old_VoidTes(instance,testb,(float) 9999999);



    }

   return old_VoidTes(instance,testb,amount);
}
 
Do i need also hook this method?


Code:
    // Token: 0x06003223 RID: 12835 RVA: 0x00002053 File Offset: 0x00000253
        [Token(Token = "0x6003223")]
        [Address(RVA = "0xC43EEC", Offset = "0xC43EEC", VA = "0xC43EEC")]
        public void Apply()
        {

It`s in the same file as "AddAmount"
 
Do i need also hook this method?


Code:
    // Token: 0x06003223 RID: 12835 RVA: 0x00002053 File Offset: 0x00000253
        [Token(Token = "0x6003223")]
        [Address(RVA = "0xC43EEC", Offset = "0xC43EEC", VA = "0xC43EEC")]
        public void Apply()
        {

It`s in the same file as "AddAmount"
You need to find an Update function to hook or find an instance that has access to that class, which you would know already if you started looking up "function pointers" as per my first reply.
 
you have possibility to modif this by create a pointer or use simple hook :

//
AddCurrency(int currencyId, float amount) // inclde in update or methode in class

//hook

void (*old_AddCurrency)(void *instance,int currencyId, float amount);

void AddCurrency(void *instance,int currencyId, float amount) {

if (instance != NULL && Hack) {
currencyId = 1;
amount = 10.0f;
}

old_VoidTes(instance,currencyId, amount);
}
 
Back
Top Bottom