Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot pick Wraith King #878

Open
dobegor opened this issue Oct 16, 2020 · 4 comments
Open

Cannot pick Wraith King #878

dobegor opened this issue Oct 16, 2020 · 4 comments

Comments

@dobegor
Copy link

dobegor commented Oct 16, 2020

It's possible to "pick" it, but the game always starts with a random hero instead.

@Kodpact
Copy link

Kodpact commented Nov 6, 2020

Yes you can by disconnecting before it will random you. Whenever hero is banned with IMBA system (red line on hero, you cannot select it, and hero is not faded into red) you can pick it with dota_select_hero console command.
I guess disconnect trick works because code is checking if player is actually connected

if PlayerResource:IsValidPlayer(i) and PlayerResource:GetConnectionState(i) == DOTA_CONNECTION_STATE_CONNECTED then

#FixIt

@dobegor dobegor closed this as completed Jan 14, 2021
@EarthSalamander42
Copy link
Owner

It's not as easy as it looks like. If the server select a hero for you when you're offline, once you reconnect you'll be unable to issue any command. I'll take a closer look to find a way using timers maybe.

@dobegor dobegor reopened this Jan 14, 2021
@Kodpact
Copy link

Kodpact commented Jan 15, 2021

Do you really need timers? Cannot you hook reconnect event and then check if player actually has valid hero?

@EarthSalamander42
Copy link
Owner

yeah but i'll need timers, iirc there's a delay with the reconnect hook and player being valid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants