yyl
4 天以前 168e039cef99df9f0ee91d8ef975c2e7f2a9fb95
Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
2个文件已修改
36 ■■■■ 已修改文件
Main/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0418_tagObjInfoRefresh.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BaseBattleWin.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0418_tagObjInfoRefresh.cs
@@ -1,10 +1,17 @@
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);
@@ -16,9 +23,16 @@
        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);
                }
Main/System/Battle/BaseBattleWin.cs
@@ -14,7 +14,6 @@
    [SerializeField] protected Button btnSpeed; // 速度控制
    [SerializeField] protected Text textSpeed; // 速度显示
    [SerializeField] protected Button btnPass; // 跳过战斗
    [SerializeField] protected Button btnPause; // 暂停按钮 (BattleWin中的btnStop可对应此按钮)
    [Header("战斗UI组件")]
    [SerializeField] protected TotalDamageDisplayer totalDamageDisplayer; // 伤害统计
@@ -33,9 +32,6 @@
        if (btnPass != null)
            btnPass.AddListener(OnClickPass);
        if (btnPause != null)
            btnPause.AddListener(OnClickPause);
    }
    protected override void OnPreOpen()
@@ -179,16 +175,6 @@
    /// <summary>
    /// 暂停/继续
    /// </summary>
    protected virtual void OnClickPause()
    {
        if (null == battleField)
            return;
        battleField.IsPause = !battleField.IsPause;
    }
    /// <summary>
    /// 跳过战斗
    /// </summary>
    protected virtual void OnClickPass()
@@ -285,7 +271,7 @@
    {
        if (txtBattleRound != null)
        {
            txtBattleRound.text = string.Format("{0}/{1}", round, maxRound);
            txtBattleRound.text = Language.Get("RoundText", round, maxRound);
        }
    }