hch
4 天以前 311c3cfe9995013bd2fd84696b07ae1fb7247ec8
0312 去掉纠正战报中的关卡新旧封包数据,内网依然保留
1个文件已修改
33 ■■■■ 已修改文件
Main/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0418_tagObjInfoRefresh.cs 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0418_tagObjInfoRefresh.cs
@@ -6,13 +6,14 @@
public class DTC0418_tagObjInfoRefresh : DtcBasic {
    //类型
//     static Dictionary<int, ulong> lastPackUIDDict = new Dictionary<int, ulong>()
//     {
// // // #if UNITY_EDITOR
// //         {(int)PlayerDataType.ExAttr1, 0},
// //         {(int)PlayerDataType.ExAttr2, 0},
// // // #endif
//     };
    static Dictionary<int, ulong> lastPackUIDDict = new Dictionary<int, ulong>()
    {
#if UNITY_EDITOR
        {(int)PlayerDataType.ExAttr1, 0},
        {(int)PlayerDataType.ExAttr2, 0},
#endif
        {(int)PlayerDataType.default26, 0},
    };
    public override void Done(GameNetPackBasic vNetPack)
    {
        base.Done(vNetPack);
@@ -26,15 +27,15 @@
            case 1:
                if (vNetData.packUID > DTC0102_tagCDBPlayer.loginPackUID)
                {
                    // if (lastPackUIDDict.ContainsKey(vNetData.RefreshType))
                    // {
                    //     if (vNetData.packUID < lastPackUIDDict[vNetData.RefreshType])
                    //     {
                    //         Debug.LogWarning($"封包顺序问题 0418 封包太旧被过滤 {vNetData.packUID} > {lastPackUIDDict[vNetData.RefreshType]}");
                    //         return;
                    //     }
                    //     lastPackUIDDict[vNetData.RefreshType] = vNetData.packUID;
                    // }
                    if (lastPackUIDDict.ContainsKey(vNetData.RefreshType))
                    {
                        if (vNetData.packUID < lastPackUIDDict[vNetData.RefreshType])
                        {
                            Debug.LogWarning($"封包顺序问题 0418 封包太旧被过滤 {vNetData.packUID} > {lastPackUIDDict[vNetData.RefreshType]}");
                            return;
                        }
                        lastPackUIDDict[vNetData.RefreshType] = vNetData.packUID;
                    }
                    //防范断线重连时,战斗中的旧包影响数据
                    Update0418(vNetData);
                }