[BUG] API : MyNW.Classes.Power.IsActive

Post Reply
DartKotik
Contributor
Contributor
Posts: 1091
Joined: Sat Jan 07, 2017 4:00 pm

[BUG] API : MyNW.Classes.Power.IsActive

Post by DartKotik » Tue Feb 04, 2020 11:39 am

I have this code in my plugin

Code: Select all

        private void Cast(Power _pwr)
        {
            if (last_power?.IsActive ?? false) last_power.StopCast();
            while (_pwr.IsActive || _pwr.IsOnCooldown()) Thread.Sleep(200);
            while (!_pwr.IsActive)
            {
                _pwr.Cast();
                Thread.Sleep((int)(_pwr.PowerDef.TimeActivate * 1000 / 2));
            }
            last_power = _pwr;
        }
But it returns such log:

Code: Select all

[14-29-0 LOG][14:29] False : False
[14-29-0 LOG][14:29] False : False
[14-29-0 LOG][14:29] False : False
[14-29-1 LOG][14:29] False : False
[14-29-1 LOG][14:29] False : False
[14-29-1 LOG][14:29] False : True
[14-29-1 LOG][14:29] False : True
[14-29-1 LOG][14:29] False : True
[14-29-2 LOG][14:29] False : True
[14-29-2 LOG][14:29] False : False
[14-29-2 LOG][14:29] False : False
[14-29-2 LOG][14:29] False : False
[14-29-3 LOG][14:29] False : False
[14-29-3 LOG][14:29] False : False
As you can see, during the first lines there is a casting of the skill, then it is recharged. I expect the log should be like this:

Code: Select all

True : False
True : False
True : False
True : False
False : True
False : True
False : True
False : True
False : False
False : False
False : False
False : False
Previously, this flag returned the correct value and the code worked. But it broke with some update of the Astral. Is this a bug?
Also for this reason, I can never stop the cast of the previous spell.
Sorry for my English. I translate with Google.
Quester Assistant plugin

Elephanteau
Veteran botter
Veteran botter
Posts: 195
Joined: Wed May 30, 2018 6:10 am

Re: [BUG] API : MyNW.Classes.Power.IsActive

Post by Elephanteau » Tue Feb 04, 2020 12:22 pm

+1. Jarod please repair this issue. It causes many problems. Thanks in advance.
May the force be with you.

Elephanteau
Veteran botter
Veteran botter
Posts: 195
Joined: Wed May 30, 2018 6:10 am

Re: [BUG] API : MyNW.Classes.Power.IsActive

Post by Elephanteau » Sun Feb 09, 2020 9:02 am

Jarod, tell us that you are alive! The fishing is broke! It only plays LeftMouse.
May the force be with you.

User avatar
Jarod46
Administrator
Administrator
Posts: 1887
Joined: Fri Aug 13, 2010 12:31 pm

Re: [BUG] API : MyNW.Classes.Power.IsActive

Post by Jarod46 » Tue Feb 11, 2020 2:10 pm

Ok Power.IsActive should be fixed now.
Only account support via private messages
Low English level, sorry

Elephanteau
Veteran botter
Veteran botter
Posts: 195
Joined: Wed May 30, 2018 6:10 am

Re: [BUG] API : MyNW.Classes.Power.IsActive

Post by Elephanteau » Tue Feb 11, 2020 4:41 pm

The function works well. Thank you.
May the force be with you.

DartKotik
Contributor
Contributor
Posts: 1091
Joined: Sat Jan 07, 2017 4:00 pm

Re: [BUG] API : MyNW.Classes.Power.IsActive

Post by DartKotik » Tue Feb 25, 2020 11:33 am

Jarod46 wrote:
Tue Feb 11, 2020 2:10 pm
Ok Power.IsActive should be fixed now.
BUG again. Slotted passive spell returns always TRUE
screenshot-090b2690-e6b0-4ace-bbb8-97299beab54b-2020.02.25-14_27_14.png
screenshot-github.com-2020.02.25-14_27_04.png
In my Powers Switcher I should to check IsActive and RechargeTime, because while the skill is being used or in cooldown, I cannot switch it.
Please fix it again!
You do not have the required permissions to view the files attached to this post.
Sorry for my English. I translate with Google.
Quester Assistant plugin

Post Reply

Who is online

Users browsing this forum: No registered users and 111 guests