修复竞技场bug
parent
76558c29c3
commit
05365b968e
Binary file not shown.
Binary file not shown.
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue