NGUInjector icon indicating copy to clipboard operation
NGUInjector copied to clipboard

Wandoos doesn't respect Cap [With Fix]

Open tahg opened this issue 4 years ago • 1 comments

Currently the Injector doesn't do anything differently between CAPWAN and WAN (and does neither correctly.) The below code fixes this. (Still gotta learn how to make a PR.)

in WandoosBP.cs

    private void AllocateEnergy()
    {
        if (IsCap)
        {
            var cap = Character.wandoos98Controller.capAmountEnergy();
            SetInput(Math.Min(cap, MaxAllocation));
            Character.wandoos98Controller.addCapEnergy();
        }
        else
        {
            SetInput(MaxAllocation);
            Character.wandoos98Controller.addEnergy();
        }
    }

    private void AllocateMagic()
    {
        if (IsCap)
        {
            var cap = Character.wandoos98Controller.capAmountMagic();
            SetInput(Math.Min(cap, MaxAllocation));
            Character.wandoos98Controller.addCapMagic();
        }
        else
        {
            SetInput(MaxAllocation);
            Character.wandoos98Controller.addMagic();
        }
    }

tahg avatar Jan 27 '21 17:01 tahg

Is this something I can paste somewhere to fix? I don't see WandoosBP.cs anywhere

Human-Udders avatar Nov 09 '24 13:11 Human-Udders