fix(huya): 修复精英宝典绑定后角色识别失败
This commit is contained in:
@@ -174,16 +174,12 @@ class BindMixin:
|
||||
|
||||
chosen_status = outer_status
|
||||
account_data = outer_status.accountData
|
||||
# 最新抓包协议只用外层查询(gid + outerActId)。旧的内层兜底会带上
|
||||
# gid=0/outerActId=空,被服务端判 501「参数错误」,仅在旧协议下保留。
|
||||
should_check_inner = (
|
||||
not gid
|
||||
and not self._has_bind_role(outer_status)
|
||||
and bool(
|
||||
account_data.isNeedActCheck
|
||||
or not account_data.isBindAcount
|
||||
or not account_data.isBindRole
|
||||
)
|
||||
# 官方页面会同时查两路:gid + outerActId,以及 gid + outerActId=空。
|
||||
# 角色名通常由第二路返回;第二路必须保留 gid,不能传成 gid=0。
|
||||
should_check_inner = not self._has_bind_role(outer_status) and bool(
|
||||
account_data.isNeedActCheck
|
||||
or not account_data.isBindAcount
|
||||
or not account_data.isBindRole
|
||||
)
|
||||
if should_check_inner:
|
||||
inner_status = client.check_user_bind_game_account(
|
||||
@@ -191,6 +187,9 @@ class BindMixin:
|
||||
cookie=cookie,
|
||||
b_act_id=b_act_id_int,
|
||||
is_use_outer_act_id=0,
|
||||
gid=gid,
|
||||
outer_act_id="",
|
||||
scene=scene,
|
||||
)
|
||||
if inner_status is not None:
|
||||
query_result["inner_bind_status"] = inner_status.to_dict()
|
||||
|
||||
Reference in New Issue
Block a user