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

View File

@ -47,12 +47,12 @@ namespace ET
public static void UpdatePer30(this PvpMap self)
{
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.Sliver, PvpMap.inatance.matchSliverList);
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)
@ -372,13 +372,13 @@ namespace ET
}
PersonalPvpType type = GetLevelType(self, data.personalScord);
// int sceneId = unitSceneMapId / 100;
// PersonalPvpType pvpType = GetTypeBySceneId(sceneId);
// if (type != pvpType)
// {
// Game.EventSystem.Publish(new ET.EventType.BackMainCity { unit = unit, }).Coroutine();
// return "上次已结算";
// }
int sceneId = unitSceneMapId / 100;
PersonalPvpType pvpType = GetTypeBySceneId(sceneId);
if (type != pvpType)
{
Game.EventSystem.Publish(new ET.EventType.BackMainCity { unit = unit, }).Coroutine();
return "上次已结算";
}
UnitScene unitScene = unit.GetComponent<UnitScene>();
UnitSceneType unitSceneType = MapHelper.GetMapType(unitScene.MapId / 100);
@ -433,7 +433,10 @@ namespace ET
if (list.Count < 2) return;
using ListComponent<Unit> listComponent = ListComponent<Unit>.Create();
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) =>
{
try