| | |
| | | if (!UIHelper.CheckMoneyCount(ArenaManager.Instance.ChallengeMoneyType, ArenaManager.Instance.NeedChallengeMoneyCnt, 1)) |
| | | return; |
| | | ArenaManager.Instance.atkPlayerId = arenaMatchInfo.PlayerID; |
| | | ArenaManager.Instance.SendTurnFight(arenaMatchInfo.PlayerID); |
| | | BattleManager.Instance.SendTurnFight(3, 0, 1, (uint)arenaMatchInfo.PlayerID); |
| | | }); |
| | | } |
| | | |
| | |
| | | GameNetSystem.Instance.SendInfo(pack); |
| | | } |
| | | |
| | | public void SendTurnFight(uint playerID) |
| | | { |
| | | CB410_tagCMTurnFight pack = new CB410_tagCMTurnFight(); |
| | | pack.MapID = 3; |
| | | pack.TagType = 1; |
| | | pack.TagID = playerID; |
| | | GameNetSystem.Instance.SendInfo(pack); |
| | | } |
| | | |
| | | public bool IsTimeInvalid(uint time) |
| | | { |
| | | DateTime dateTime = TimeUtility.GetTime(time); |
| | |
| | | { |
| | | if (arenaGameRec == null) |
| | | return; |
| | | ArenaManager.Instance.SendTurnFight(arenaGameRec.Value3); |
| | | BattleManager.Instance.SendTurnFight(3, 0, 1, (uint)arenaGameRec.Value3); |
| | | ArenaManager.Instance.atkPlayerId = arenaGameRec.Value3; |
| | | }); |
| | | } |
| | |
| | | return null; |
| | | } |
| | | |
| | | //发进入战斗包 |
| | | private float lastTime = 0f; |
| | | private float turnCoolDown = 0.5f; // 冷却时间 |
| | | public void SendTurnFight(uint mapID, uint funcLineID = 0, byte tagType = 0, uint tagID = 0, uint[] valueList = null) |
| | | { |
| | | // 连续频繁发包,触发提示 |
| | | float currentTime = Time.time; |
| | | if (currentTime - lastTime < turnCoolDown) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("BattleCoolDown"); |
| | | return; |
| | | } |
| | | lastTime = currentTime; |
| | | |
| | | CB410_tagCMTurnFight pack = new CB410_tagCMTurnFight(); |
| | | pack.MapID = mapID; |
| | | pack.FuncLineID = funcLineID; |
| | | pack.TagType = tagType; |
| | | pack.TagID = tagID; |
| | | if (!valueList.IsNullOrEmpty()) |
| | | { |
| | | pack.ValueList = valueList; |
| | | pack.ValueCount = (byte)valueList.Length; |
| | | } |
| | | GameNetSystem.Instance.SendInfo(pack); |
| | | } |
| | | |
| | | // 获取当前正在显示的战斗场景名称,如果没有则返回空字符串 |
| | | public string GetActiveBattleName() |
| | | { |
| | |
| | | if (!DungeonManager.Instance.TryGetFBInfoByMapID(BoneFieldManager.Instance.DataMapID, out var fbInfo)) |
| | | return; |
| | | int nowPassLineID = BoneFieldManager.Instance.GetNowPassLineID(fbInfo); |
| | | BoneFieldManager.Instance.SendTurnFight(BoneFieldManager.Instance.DataMapID, nowPassLineID); |
| | | BattleManager.Instance.SendTurnFight((uint)BoneFieldManager.Instance.DataMapID, (uint)nowPassLineID); |
| | | } |
| | | } |
| | |
| | | return true; |
| | | } |
| | | |
| | | public void SendTurnFight(int mapID, int funcLineID) |
| | | { |
| | | CB410_tagCMTurnFight pack = new CB410_tagCMTurnFight(); |
| | | pack.MapID = (uint)mapID; |
| | | pack.FuncLineID = (uint)funcLineID; |
| | | GameNetSystem.Instance.SendInfo(pack); |
| | | } |
| | | |
| | | public void SendBBeginFBWipeOut(int mapID, int lineID) |
| | | { |
| | | CA505_tagCMBeginFBWipeOut pack = new CA505_tagCMBeginFBWipeOut(); |
| | |
| | | pack.Cnt = 1; |
| | | GameNetSystem.Instance.SendInfo(pack); |
| | | } |
| | | |
| | | |
| | | |
| | | public void SendBuyEnterCount(int FBID) |
| | | { |
| | |
| | | { |
| | | if (MainLevelManager.Instance.CanChallengeBoss()) |
| | | { |
| | | var pack = new CB410_tagCMTurnFight(); |
| | | pack.MapID = 2; |
| | | // pack.FuncLineID = (uint)PlayerDatas.Instance.baseData.ExAttr1 + 1; |
| | | GameNetSystem.Instance.SendInfo(pack); |
| | | |
| | | BattleManager.Instance.SendTurnFight(2); |
| | | AutoFightModel.Instance.isPause = true; |
| | | } |
| | | CloseWindow(); |