This is the AMP version of this page.
If you want to load the real page instead, click this text.

Help! Class without update and usage

zxcDelix

Platinian
Original poster
Feb 12, 2023
41
5
8
24
Ukraine
I need to change the damage and selfdamage fields in these classes, but they are not mentioned anywhere, so I can’t change them in any way, I will be glad for any help with this, I will attach the classes and dump below.


Code:
public class SingleBulletShooter : HitShooter // TypeDefIndex: 3199
{
    // Fields
    [SerializeField]
    private ObscuredInt damage; // 0x10
    [SerializeField]
    private ObscuredInt selfDamage; // 0x24
    [SerializeField]
    private ObscuredFloat range; // 0x38

    // Properties
    public override float Range { get; }

    // Methods

    // RVA: 0x6173A0 Offset: 0x6173A0 VA: 0x6173A0 Slot: 6
    public override float get_Range() { }

    // RVA: 0x617440 Offset: 0x617440 VA: 0x617440 Slot: 7
    public override void Shoot(Ray shootRay) { }

    // RVA: 0x617DF4 Offset: 0x617DF4 VA: 0x617DF4
    public void .ctor() { }
}

// Namespace:
public class SpreadBulletsShooter : HitShooter // TypeDefIndex: 3200
{
    // Fields
    [SerializeField]
    private ObscuredInt damage; // 0x10
    [SerializeField]
    private ObscuredInt selfDamage; // 0x24
    [SerializeField]
    private ObscuredFloat range; // 0x38
    [Space]
    [SerializeField]
    private ObscuredInt bullets; // 0x50
    [SerializeField]
    private ObscuredFloat spread; // 0x64

    // Properties
    public override float Range { get; }

    // Methods

    // RVA: 0x617F4C Offset: 0x617F4C VA: 0x617F4C Slot: 6
    public override float get_Range() { }

    // RVA: 0x617FEC Offset: 0x617FEC VA: 0x617FEC Slot: 7
    public override void Shoot(Ray shootRay) { }

    // RVA: 0x618E0C Offset: 0x618E0C VA: 0x618E0C
    private void FillSpreadBullets(Ray shootRay, List<Ray> bullets, int count) { }

    // RVA: 0x61905C Offset: 0x61905C VA: 0x61905C
    public void .ctor() { }
}
 

libModz

Awesome Active Platinian
Jun 2, 2022
171
30
28
UK
Hook them to get_Range() function. Use it as if it were Update() like this...

C++:
float (*old_SingleBulletShooter_Range)(void *instance);
float SingleBulletShooter_Range(void *instance) {
    if(instance!=nullptr) {
        if(OneHitKill) {
            SetObscuredIntValue((uint64_t) instance + 0x10, 9999);    // damage
        } else {
            SetObscuredIntValue((uint64_t) instance + 0x10, 5);       // damage
        }
            SetObscuredIntValue((uint64_t) instance + 0x24, 5);       // selfDamage
    }
    return old_SingleBulletShooter_Range(instance);
}




float (*old_SpreadBulletsShooter_Range)(void *instance);
float SpreadBulletsShooter_Range(void *instance) {
    if(instance!=nullptr) {
        if(OneHitKill) {
            SetObscuredIntValue((uint64_t) instance + 0x10, 9999);      // damage
        } else {
            SetObscuredIntValue((uint64_t) instance + 0x10, 5);         // damage
        }
            SetObscuredIntValue((uint64_t) instance + 0x24, 5);         //selfDamage
    }
    return old_SpreadBulletsShooter_Range(instance);
}
Change the values as you wish
 

zxcDelix

Platinian
Original poster
Feb 12, 2023
41
5
8
24
Ukraine
Oh, thank you very much, it was very helpful!

Solved