Jump to content
Korean Random
Sign in to follow this  
SoprachevAK

Вход в очередь ожидания боя

Recommended Posts

Подскажите может кто сталкивался, как задетектить вход в очередь в бой
Пробовал g_playerEvents.onEnqueued, но судя по всему оно не срабатывает при взводной игре, когда игрок НЕ командует взводом

Возможно надо где то из UI подхватывать, но это настолько запарно тестировать, что может кто то уже находил

Share this post


Link to post

Short link
Share on other sites

С этим же столкнулся в Presence. Решил таким образом:

from gui.Scaleform.daapi.view.lobby.battle_queue import BattleQueue, BattleStrongholdsQueue

def override(*a, **kw):
    # stub for KR
    pass

@override(BattleQueue, '_populate')
def handleEnqueue(base, self):
    base(self)
    # logic


@override(BattleStrongholdsQueue, '_populate')
def handleStrongholdEnqueue(base, self):
    base(self)
    # logic


@override(BattleQueue, '_dispose')
def handleDequeue(base, self):
    base(self)
    # logic


@override(BattleStrongholdsQueue, '_dispose')
def handleStrongholdDequeue(base, self):
    base(self)
    # logic

Имхо не лучшее решение.
Но тут надо быть также осторожным ибо BattleQueue.dispose файрится не только при клике выхода из очереди, а и при отправке в бой. Тоесть ещё надо проверять не находимся ли мы в lobbyApp по факту и он не задестроился.
Но вообще лучше надо лезть куда-то в g_prbLoader и как с ним пытатся работать.

Edited by Kurzdor
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...