feat(all): add verified gacha flows and native client studio
This commit is contained in:
@@ -50,9 +50,9 @@ mitmproxy 会把它们全缓冲进内存。加了之后超过 1MB 的响应不
|
||||
## 输出
|
||||
|
||||
- 控制台:`game=true` 的实时打印
|
||||
- `capture/2.34.13/<时间戳>/bd2_dump.jsonl`:全部流量,每行一条
|
||||
- `capture/2.34.13/<时间戳>/bd2_dump.log`:便于人工检查的文本日志
|
||||
- `capture/2.34.13/<时间戳>/bodies/`:`game=true` 的原始 body 原样存一份
|
||||
- `capture/2.35.10/<时间戳>/bd2_dump.jsonl`:全部流量,每行一条
|
||||
- `capture/2.35.10/<时间戳>/bd2_dump.log`:便于人工检查的文本日志
|
||||
- `capture/2.35.10/<时间戳>/bodies/`:`game=true` 的原始 body 原样存一份
|
||||
(服务端实现要按 schema 解,原字节比文本更值钱)
|
||||
|
||||
可用环境变量 `BD2_CAPTURE_DIR` 覆盖输出根目录。
|
||||
@@ -78,7 +78,7 @@ TAG = time.strftime("%Y%m%d-%H%M%S")
|
||||
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
PROJECT_DIR = os.path.dirname(os.path.dirname(SCRIPT_DIR))
|
||||
CAPTURE_ROOT = os.path.abspath(
|
||||
os.environ.get("BD2_CAPTURE_DIR", os.path.join(PROJECT_DIR, "data", "capture", "2.34.13"))
|
||||
os.environ.get("BD2_CAPTURE_DIR", os.path.join(PROJECT_DIR, "data", "capture", "2.35.10"))
|
||||
)
|
||||
RUN_DIR = os.path.join(CAPTURE_ROOT, TAG)
|
||||
LOG_PATH = os.path.join(RUN_DIR, "bd2_dump.jsonl")
|
||||
|
||||
@@ -7,7 +7,7 @@ by an explicitly configured local bd2server.
|
||||
|
||||
Example:
|
||||
python tools/python/dev_mail_grant.py serve `
|
||||
--game-data E:\\bd2\\dl\\GameData --game-data-version 20260910162539 `
|
||||
--game-data E:\\bd2\\dl\\GameData --game-data-version 20260923193640 `
|
||||
--mail-seed go\\seed\\v2_35_10\\mail.json --output data\\dev\\mail-grants.json
|
||||
"""
|
||||
|
||||
@@ -32,7 +32,7 @@ sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
from gamedata_db import read_database, walk_wire # noqa: E402
|
||||
|
||||
|
||||
VERSION = "2.34.13"
|
||||
VERSION = "2.35.10"
|
||||
MAX_INT32 = (1 << 31) - 1
|
||||
|
||||
# These are the local server's ItemDBInfo-backed ElementTypes. Item names use
|
||||
@@ -449,7 +449,7 @@ class MailGrantStore:
|
||||
|
||||
current_ids = {entry["mail_id"] for entry in self.seed["mails"]}
|
||||
mail_id = max(current_ids, default=13_000_000_000) + 1
|
||||
# MailDBInfo's InvenIndex is int64 in the 2.34.13 client descriptor.
|
||||
# MailDBInfo's InvenIndex is int64 in the 2.35.10 client descriptor.
|
||||
if mail_id > (1 << 63) - 1:
|
||||
raise ValueError("没有可用的正 int64 邮件 ID")
|
||||
now = int(time.time() * 1000)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Convert decoded 2.34.13 protobuf messages into reviewed JSON seeds.
|
||||
"""Convert decoded 2.35.10 protobuf messages into reviewed JSON seeds.
|
||||
|
||||
This replaces the old Go cmd/import-* programs. Network/capture decryption is
|
||||
kept separate: inputs here are raw, already-decoded protobuf files. Outputs
|
||||
@@ -27,7 +27,7 @@ from pathlib import Path
|
||||
import struct
|
||||
|
||||
|
||||
VERSION = "2.34.13"
|
||||
VERSION = "2.35.10"
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
|
||||
@@ -221,7 +221,7 @@ class DevelopmentMailGrantToolTests(unittest.TestCase):
|
||||
source = root / "mail.json"
|
||||
output = root / "generated.json"
|
||||
source.write_text(json.dumps({
|
||||
"version": "2.34.13", "mails": [], "mail_count": 1, "max_mail_id": 0,
|
||||
"version": "2.35.10", "mails": [], "mail_count": 1, "max_mail_id": 0,
|
||||
}), encoding="utf-8")
|
||||
gold = {"id": 0, "element_type": 4, "name": "金币"}
|
||||
store = dev_mail_grant.MailGrantStore(source, output, [gold], 365)
|
||||
@@ -283,7 +283,7 @@ class DevelopmentMailGrantToolTests(unittest.TestCase):
|
||||
source = root / "source-mail.json"
|
||||
output = root / "generated-mail.json"
|
||||
source.write_text(json.dumps({
|
||||
"version": "2.34.13",
|
||||
"version": "2.35.10",
|
||||
"mails": [{
|
||||
"mail_id": 100, "mail_type": 2, "title": "base", "body": "base",
|
||||
"expires_at": 200, "reward_types": [8], "reward_ids": [7],
|
||||
|
||||
Reference in New Issue
Block a user