| | |
| | | |
| | | public class DTC0418_tagObjInfoRefresh : DtcBasic { |
| | | //类型 |
| | | static Dictionary<int, ulong> lastPackUIDDict = new Dictionary<int, ulong>() |
| | | static Dictionary<int, GameNetPackBasic> lastPackDict = new Dictionary<int, GameNetPackBasic>() |
| | | { |
| | | {(int)PlayerDataType.ExAttr1, 0}, |
| | | {(int)PlayerDataType.ExAttr2, 0}, |
| | | {(int)PlayerDataType.default26, 0}, |
| | | {(int)PlayerDataType.ExAttr1, null}, |
| | | {(int)PlayerDataType.ExAttr2, null}, |
| | | {(int)PlayerDataType.default26, null}, |
| | | }; |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | |
| | | case 1: |
| | | if (vNetData.packUID > DTC0102_tagCDBPlayer.loginPackUID) |
| | | { |
| | | if (lastPackUIDDict.ContainsKey(vNetData.RefreshType)) |
| | | if (lastPackDict.ContainsKey(vNetData.RefreshType)) |
| | | { |
| | | if (vNetData.packUID < lastPackUIDDict[vNetData.RefreshType]) |
| | | var lastPack = lastPackDict[vNetData.RefreshType]; |
| | | if (lastPack != null && vNetData.packUID < lastPackDict[vNetData.RefreshType].packUID) |
| | | { |
| | | Debug.LogWarning($"封包顺序问题 0418 封包太旧被过滤 {vNetData.packUID} > {lastPackUIDDict[vNetData.RefreshType]}"); |
| | | return; |
| | | vNetData = lastPack as H0418_tagObjInfoRefresh; |
| | | if (null == vNetData) |
| | | { |
| | | return; |
| | | } |
| | | Debug.LogError("重置0418数据为上一个包,刷新数据 packUID:" + vNetData.packUID); |
| | | } |
| | | lastPackUIDDict[vNetData.RefreshType] = vNetData.packUID; |
| | | lastPackDict[vNetData.RefreshType] = vNetData; |
| | | } |
| | | //防范断线重连时,战斗中的旧包影响数据 |
| | | Update0418(vNetData); |