| | |
| | | |
| | | 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); |
| | |
| | | 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); |
| | | } |