| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | |
| | | //04 18 周围对象刷新#tagObjInfoRefresh |
| | | |
| | | public class DTC0418_tagObjInfoRefresh : DtcBasic { |
| | | static ulong lastPackUID = 0; |
| | | //类型 |
| | | static Dictionary<int, ulong> lastPackUIDDict = new Dictionary<int, ulong>() |
| | | { |
| | | {(int)PlayerDataType.ExAttr1, 0}, |
| | | {(int)PlayerDataType.ExAttr2, 0}, |
| | | {(int)PlayerDataType.default26, 0}, |
| | | }; |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | |
| | | switch (vNetData.ObjType) |
| | | { |
| | | case 1: |
| | | if (vNetData.packUID > DTC0102_tagCDBPlayer.loginPackUID && vNetData.packUID > lastPackUID) |
| | | if (vNetData.packUID > DTC0102_tagCDBPlayer.loginPackUID) |
| | | { |
| | | lastPackUID = vNetData.packUID; |
| | | if (lastPackUIDDict.ContainsKey(vNetData.RefreshType)) |
| | | { |
| | | if (vNetData.packUID < lastPackUIDDict[vNetData.RefreshType]) |
| | | { |
| | | return; |
| | | } |
| | | lastPackUIDDict[vNetData.RefreshType] = vNetData.packUID; |
| | | } |
| | | //防范断线重连时,战斗中的旧包影响数据 |
| | | Update0418(vNetData); |
| | | } |