powbot / api

4 stars 8 forks source link

Chat.chatting() returns true when it shouldn't #110

Closed Krulvis closed 3 years ago

Krulvis commented 3 years ago

The:

for (final int[] arr : Constants.CHAT_CONTINUES) {
    if (ctx.widgets.component(arr[0], 0).valid()) {
        return true;
    }
}

part in the Chat.chatting() function returns true for widget Constants.CHAT_CONTNIUES (162). I am unsure if widget root index can be removed from the constants as I have no idea if it is required to be there for some specific widgets.

162 is the main chat widget root id so I don't know why it is added in the Chat.chatting() function in the first place. I assume Chat.chatting() should return true whenever there is a non-default npc dialogue/text widget open instead of the regular game chat. I.e. leveling-up and talking with npc's.

MatoV commented 3 years ago

Remove that part and call canContinue() ? That should work.

Krulvis commented 3 years ago

canContinue returns true if you can continue with space but that's not the case. I have to choose between options.