zxl
/
CTT
forked from Cal/CTT
1
0
Fork 0

修复竞技场bug

develope
Cal 2022-01-22 20:33:10 +08:00
parent 76558c29c3
commit 05365b968e
4 changed files with 18 additions and 15 deletions

Binary file not shown.

Binary file not shown.

View File

@ -53,7 +53,7 @@ namespace ET
AttackComponent attacker = self.owner.GetComponent<AttackComponent>(); AttackComponent attacker = self.owner.GetComponent<AttackComponent>();
if (attacker == null) if (attacker == null)
{ {
Log.Error($"attacker == null"); // Log.Error($"attacker == null");
return 1; return 1;
} }
@ -65,7 +65,7 @@ namespace ET
AttackComponent attacker = self.owner.GetComponent<AttackComponent>(); AttackComponent attacker = self.owner.GetComponent<AttackComponent>();
if (attacker == null) if (attacker == null)
{ {
Log.Error($"attacker == null"); // Log.Error($"attacker == null");
return; return;
} }
@ -78,7 +78,7 @@ namespace ET
AttackComponent attacker = self.owner.GetComponent<AttackComponent>(); AttackComponent attacker = self.owner.GetComponent<AttackComponent>();
if (attacker == null) if (attacker == null)
{ {
Log.Error($"attacker == null"); // Log.Error($"attacker == null");
return 1; return 1;
} }
@ -90,7 +90,7 @@ namespace ET
AttackComponent attacker = self.owner.GetComponent<AttackComponent>(); AttackComponent attacker = self.owner.GetComponent<AttackComponent>();
if (attacker == null) if (attacker == null)
{ {
Log.Error($"attacker == null"); // Log.Error($"attacker == null");
return; return;
} }

View File

@ -47,12 +47,12 @@ namespace ET
public static void UpdatePer30(this PvpMap self) public static void UpdatePer30(this PvpMap self)
{ {
if (PvpMap.inatance.CanPvp() != null) return; if (PvpMap.inatance.CanPvp() != null) return;
PvpMap.inatance.MatchBattle(PvpMap.inatance.matchGoldList);
PvpMap.inatance.MatchBattle(PvpMap.inatance.matchSliverList);
PvpMap.inatance.MatchBattle(PvpMap.inatance.matchCupperList);
ClearNotInSceneUnit(PersonalPvpType.Cupper, PvpMap.inatance.matchCupperList); ClearNotInSceneUnit(PersonalPvpType.Cupper, PvpMap.inatance.matchCupperList);
ClearNotInSceneUnit(PersonalPvpType.Sliver, PvpMap.inatance.matchSliverList); ClearNotInSceneUnit(PersonalPvpType.Sliver, PvpMap.inatance.matchSliverList);
ClearNotInSceneUnit(PersonalPvpType.Gold, PvpMap.inatance.matchGoldList); ClearNotInSceneUnit(PersonalPvpType.Gold, PvpMap.inatance.matchGoldList);
PvpMap.inatance.MatchBattle(PvpMap.inatance.matchGoldList);
PvpMap.inatance.MatchBattle(PvpMap.inatance.matchSliverList);
PvpMap.inatance.MatchBattle(PvpMap.inatance.matchCupperList);
} }
private static void ClearNotInSceneUnit(PersonalPvpType type, List<Unit> list) private static void ClearNotInSceneUnit(PersonalPvpType type, List<Unit> list)
@ -372,13 +372,13 @@ namespace ET
} }
PersonalPvpType type = GetLevelType(self, data.personalScord); PersonalPvpType type = GetLevelType(self, data.personalScord);
// int sceneId = unitSceneMapId / 100; int sceneId = unitSceneMapId / 100;
// PersonalPvpType pvpType = GetTypeBySceneId(sceneId); PersonalPvpType pvpType = GetTypeBySceneId(sceneId);
// if (type != pvpType) if (type != pvpType)
// { {
// Game.EventSystem.Publish(new ET.EventType.BackMainCity { unit = unit, }).Coroutine(); Game.EventSystem.Publish(new ET.EventType.BackMainCity { unit = unit, }).Coroutine();
// return "上次已结算"; return "上次已结算";
// } }
UnitScene unitScene = unit.GetComponent<UnitScene>(); UnitScene unitScene = unit.GetComponent<UnitScene>();
UnitSceneType unitSceneType = MapHelper.GetMapType(unitScene.MapId / 100); UnitSceneType unitSceneType = MapHelper.GetMapType(unitScene.MapId / 100);
@ -433,7 +433,10 @@ namespace ET
if (list.Count < 2) return; if (list.Count < 2) return;
using ListComponent<Unit> listComponent = ListComponent<Unit>.Create(); using ListComponent<Unit> listComponent = ListComponent<Unit>.Create();
listComponent.List.AddRange(list.FindAll(t => listComponent.List.AddRange(list.FindAll(t =>
t && t.teamState != TeamState.Fight && t.GetComponent<PlayerData>().personalPvpCount < ConstDefine.PersonalMaxBattleCount)); t &&
t.teamState != TeamState.Fight &&
t.GetComponent<PlayerData>().personalPvpCount < ConstDefine.PersonalMaxBattleCount
));
listComponent.List.Sort((a, b) => listComponent.List.Sort((a, b) =>
{ {
try try