| | |
| | | } |
| | | } |
| | | |
| | | public bool isAutoChangeBetterEquip |
| | | { |
| | | get |
| | | { |
| | | return QuickSetting.Instance.GetQuickSettingBool(QuickSettingType.AutoFight_AutoChangeBetterEquip, 0); |
| | | } |
| | | set |
| | | { |
| | | QuickSetting.Instance.SetQuickSetting(QuickSettingType.AutoFight_AutoChangeBetterEquip, value); |
| | | } |
| | | } |
| | | public int startServerTime; // 开始时的服务器时间戳 |
| | | bool m_HasAutoExchanged = false; |
| | | public bool hasAutoExchanged // 是否已自动交换过 |
| | | { |
| | | get |
| | | { |
| | | return m_HasAutoExchanged; |
| | | } |
| | | set |
| | | { |
| | | if (m_HasAutoExchanged == value) |
| | | return; |
| | | m_HasAutoExchanged = value; |
| | | if (!value) |
| | | { |
| | | startServerTime = TimeUtility.AllSeconds; |
| | | } |
| | | } |
| | | } |
| | | |
| | | bool m_IsAutoExchangeDecomposeOld = false; |
| | | public bool isAutoExchangeDecomposeOld //是否替换后自动分解原装备 |
| | | { |
| | | get |
| | | { |
| | | return m_IsAutoExchangeDecomposeOld; |
| | | } |
| | | set |
| | | { |
| | | if (m_IsAutoExchangeDecomposeOld == value) |
| | | return; |
| | | m_IsAutoExchangeDecomposeOld = value; |
| | | if (value) |
| | | { |
| | | hasAutoExchanged = false; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public event Action<bool> OnAutoChallengeBossEvent; |
| | | //自动挑战首领 |
| | | public bool isAutoChallengeBoss |
| | |
| | | } |
| | | public event Action ChangeAutoEvent; |
| | | |
| | | |
| | | |
| | | |
| | | public int maxSpeed = 3; //最高速度 索引 |
| | | public int maxCost; //最高消耗 |
| | | public int[] autoCostWithBlessLV; //自动战斗消耗倍数关联祝福等级 |
| | |
| | | public int maxTryChallengeCD; //打主线boss战败后,间隔x秒后重试 |
| | | public int openAutoFinishCond;//自动完成任务需祝福树X级 |
| | | public int autoCloseWinCD; |
| | | public int autoChangeBetterEquipWaitTimeS;//装备对比界面打开x秒后,为玩家替换高战力装备 |
| | | |
| | | public override void Init() |
| | | { |
| | |
| | | { |
| | | BattleManager.Instance.onBattleFieldCreate -= OnCreateBattleField; |
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= BeforePlayerInit; |
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEventOnRelogin += OnBeforePlayerDataInitializeEventOnRelogin; |
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEventOnRelogin -= OnBeforePlayerDataInitializeEventOnRelogin; |
| | | EventBroadcast.Instance.RemoveListener<string, SkillConfig, TeamHero>(EventName.BATTLE_CAST_SKILL, OnSkillCast); |
| | | BlessLVManager.Instance.OnBlessLVUpdateEvent -= UpdateRedpint; |
| | | TaskManager.Instance.OnTaskUpdate -= OnTaskUpdate; |
| | |
| | | speed2UnlockMissionID = int.Parse(config.Numerical2); |
| | | maxCost = autoCostWithBlessLV.Length; |
| | | autoCloseWinCD = int.Parse(config.Numerical3); |
| | | autoChangeBetterEquipWaitTimeS = int.Parse(config.Numerical5); |
| | | config = FuncConfigConfig.Get("AutoGuaji1"); |
| | | openAutoChallengeBossCond = int.Parse(config.Numerical1); |
| | | maxTryChallengeCount = int.Parse(config.Numerical2); |
| | |
| | | { |
| | | fightingHeroSkinID = 0; |
| | | heroGuid = ""; |
| | | startServerTime = 0; |
| | | hasAutoExchanged = false; |
| | | } |
| | | |
| | | private void OnBeforePlayerDataInitializeEventOnRelogin() |
| | | { |
| | | nowChallengeCount = 0; |
| | | isAutoExchangeDecomposeOld = true; |
| | | } |
| | | |
| | | Dictionary<string, int> winWaitCloseDict = new Dictionary<string, int>(); |