diff --git a/conf.bat b/conf.bat index 022bd02a..901a25a7 100644 --- a/conf.bat +++ b/conf.bat @@ -1,2 +1,3 @@ +git pull python .\tool\cfg\tool_cfg_txt.py pause \ No newline at end of file diff --git a/config/AllLanguage.xlsx b/config/AllLanguage.xlsx index 47834d56..3766ee30 100644 Binary files a/config/AllLanguage.xlsx and b/config/AllLanguage.xlsx differ diff --git a/config/Face.xlsx b/config/Face.xlsx index c9321cb1..b2c7f38c 100644 Binary files a/config/Face.xlsx and b/config/Face.xlsx differ diff --git a/config/IndoorProgress.xlsx b/config/IndoorProgress.xlsx index 40ccc002..a1eee3ef 100644 Binary files a/config/IndoorProgress.xlsx and b/config/IndoorProgress.xlsx differ diff --git a/config/Mail.xlsx b/config/Mail.xlsx index 476430b9..a68dda31 100644 Binary files a/config/Mail.xlsx and b/config/Mail.xlsx differ diff --git a/config/MergeData.xlsx b/config/MergeData.xlsx index c077a73a..22aed88c 100644 Binary files a/config/MergeData.xlsx and b/config/MergeData.xlsx differ diff --git a/config/UserData.xlsx b/config/UserData.xlsx index c4fda2b0..dc0fd503 100644 Binary files a/config/UserData.xlsx and b/config/UserData.xlsx differ diff --git a/proto/Gameapi.proto b/proto/Gameapi.proto index f2f6672b..1179f189 100644 --- a/proto/Gameapi.proto +++ b/proto/Gameapi.proto @@ -142,6 +142,7 @@ enum LOGIN_TYPE { ACCOUNT_LOGIN = 0; // 账号密码登录 CODE_LOGIN = 1; // 验证码登录 DEVICE_LOGIN = 2; // 设备号登录 + SDK_LOGIN = 3; // 第三方SDK登录 } // 时间线类型 @@ -255,7 +256,8 @@ message ClientRes{ //客户都请求数据返回 和主动推送 message ReqRegisterAccount{ string UserName = 1; string UserPwd = 2; - int32 dwUin = 3; + int32 dwUin = 3; + string Device = 4; // 设备标识 } ////响应注册账号 @@ -269,7 +271,6 @@ message ReqLogin{ string Code = 3; // 验证码 string Device = 4; // 设备标识 LOGIN_TYPE type = 5; // 登录方式 - } message ReqLoginCode{ @@ -1647,6 +1648,7 @@ message ResFriendReply{ message ReqFriendReplyHandle{ int32 LogId = 1; // 时间线id string Param = 2; // 回复内容 + int32 Type = 3; // 回复类型 1:打招呼 2:删除 3:查看 } message ResFriendReplyHandle{ diff --git a/proto/protoToCS.bat b/proto/protoToCS.bat index 7c150602..9778ce0a 100644 --- a/proto/protoToCS.bat +++ b/proto/protoToCS.bat @@ -1,4 +1,4 @@ @echo off REM 设置cs文件的输出目录 -set outDir=F:\Github\aplus-b_-pet_-c_nation\Assets\GameMain\Scripts\Hotfix\CS\Proto -protoc.exe --csharp_out=E:\AplusB_NewDocs\msg *.proto \ No newline at end of file +set outDir=E:\WorkSpace\docs\docs\proto +protoc.exe --csharp_out=%outDir% *.proto \ No newline at end of file diff --git a/tool/cfg/cfg_txt.json b/tool/cfg/cfg_txt.json index 838e2fbb..45f1925b 100644 --- a/tool/cfg/cfg_txt.json +++ b/tool/cfg/cfg_txt.json @@ -1,6 +1,12 @@ { "target_dir":"tool/txt", "source_dir":"config", + "post_move": { + "enabled": true, + "mode": "move", + "dest_dir": "E:\\WorkSpace\\Meowment\\Assets\\GameMain\\DataTables", + "files": ["LanguageData.txt"] + }, "file_list": [ { "in_file":"MergeData.xlsx", @@ -63,17 +69,11 @@ "coloum_type":["int","string","int","string","string","string","string","string","string"] }, { - "in_file":"LanguageData.xlsx", + "in_file":"AllLanguage.xlsx", "out_file":"LanguageData.txt", - "sheet_name":"LanguageData", + "sheet_name":"Sheet1", "coloum_type":["int","string","string","string"] }, - { - "in_file":"LanguageData.xlsx", - "out_file":"LanguageDataTwo.txt", - "sheet_name":"LanguageDataTwo", - "coloum_type":["int","string","string","string"] - }, { "in_file":"LimitedTimeEvent.xlsx", "out_file":"LuckyCatProbability.txt", diff --git a/tool/cfg/tool_cfg_txt.py b/tool/cfg/tool_cfg_txt.py index 92c90321..220ccbc4 100644 --- a/tool/cfg/tool_cfg_txt.py +++ b/tool/cfg/tool_cfg_txt.py @@ -2,6 +2,7 @@ import os import json import openpyxl import csv +import shutil current_dir = os.getcwd() print(current_dir) @@ -30,6 +31,7 @@ file_list = cfg['file_list'] target_dir = cfg['target_dir'] source_dir = cfg['source_dir'] fields_to_remove = cfg.get('fields_to_remove', []) +post_move_cfg = cfg.get('post_move', {}) # 确保目标目录存在 os.makedirs(target_dir, exist_ok=True) @@ -61,4 +63,54 @@ for file_cfg in file_list: row_data = [str(cell) if cell is not None else "" for cell in row if cell not in fields_to_remove] txt_file.write('\t'.join(row_data) + '\n') - print(f"Converted: {source_file_path} to {target_file_path}") \ No newline at end of file + print(f"Converted: {source_file_path} to {target_file_path}") + +# Post-move/copy selected files if configured +if post_move_cfg and post_move_cfg.get('enabled', False): + mode = (post_move_cfg.get('mode') or 'move').lower() # 'move' or 'copy' + files = post_move_cfg.get('files') or [] + dest_dir_cfg = post_move_cfg.get('dest_dir') or '' + + if not dest_dir_cfg: + print('[post_move] dest_dir 未配置,跳过后续移动/拷贝步骤') + else: + dest_dir_abs = dest_dir_cfg if os.path.isabs(dest_dir_cfg) else os.path.join(current_dir, dest_dir_cfg) + os.makedirs(dest_dir_abs, exist_ok=True) + + moved_count = 0 + for fname in files: + src_path = os.path.join(current_dir, target_dir, fname) + dst_path = os.path.join(dest_dir_abs, fname) + + if not os.path.isfile(src_path): + print(f"[post_move] 源文件不存在,跳过: {src_path}") + continue + + # 覆盖目标 + if os.path.exists(dst_path): + try: + if os.path.isdir(dst_path): + # 防御:如果是目录,跳过以避免误删 + print(f"[post_move] 目标路径是目录,跳过: {dst_path}") + continue + os.remove(dst_path) + except Exception as e: + print(f"[post_move] 覆盖目标文件失败: {dst_path}, 错误: {e}") + continue + + try: + if mode == 'copy': + shutil.copy2(src_path, dst_path) + else: + # 默认 move:为了兼容不同文件系统,使用 copy2 + 删除 源 + shutil.copy2(src_path, dst_path) + try: + os.remove(src_path) + except Exception as e: + print(f"[post_move] 删除源文件失败(已完成拷贝): {src_path}, 错误: {e}") + moved_count += 1 + print(f"[post_move] {mode} 完成: {src_path} -> {dst_path}") + except Exception as e: + print(f"[post_move] {mode} 失败: {src_path} -> {dst_path}, 错误: {e}") + + print(f"[post_move] 共处理 {moved_count}/{len(files)} 个文件,目标目录: {dest_dir_abs}") \ No newline at end of file