【报错日志】增加cellindex为-1时提前返回,不进行错误日志打印
parent
4a6071903f
commit
01e9dc3a74
|
|
@ -89,6 +89,10 @@ namespace Gameplay.Area
|
|||
|
||||
private bool _CheckCenterIsSelfVehicle(int centerCellIndex)
|
||||
{
|
||||
if (centerCellIndex == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var units = AreaManager.instance.GetUnitsByCellIndex(centerCellIndex);
|
||||
var senderTroopId = troopId;
|
||||
var isSelf = false;
|
||||
|
|
@ -107,6 +111,10 @@ namespace Gameplay.Area
|
|||
|
||||
private bool _CheckAreaContainsSelfSide(int centerCellIndex)
|
||||
{
|
||||
if (centerCellIndex == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var influenceAreaId = influenceId;
|
||||
var areaIndexs = AreaManager.instance.GetCellIndexs(centerCellIndex, influenceAreaId);
|
||||
// 查找所有友军
|
||||
|
|
@ -121,6 +129,10 @@ namespace Gameplay.Area
|
|||
|
||||
private bool _CheckAreaContainsEnemy(int centerCellIndex)
|
||||
{
|
||||
if (centerCellIndex == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (troopId == ETroopsId.Self)
|
||||
{
|
||||
// 需要额外判断是否在光亮区域
|
||||
|
|
@ -141,6 +153,10 @@ namespace Gameplay.Area
|
|||
|
||||
private bool _CheckCenterIsEmpty(int centerCellIndex)
|
||||
{
|
||||
if (centerCellIndex == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (troopId == ETroopsId.Self)
|
||||
{
|
||||
// 需要额外判断是否在光亮区域
|
||||
|
|
@ -166,6 +182,10 @@ namespace Gameplay.Area
|
|||
|
||||
private bool _CheckCenterIsSelfSide(int centerCellIndex)
|
||||
{
|
||||
if (centerCellIndex == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var units = AreaManager.instance.GetUnitsByCellIndex(centerCellIndex);
|
||||
var senderTroopId = troopId;
|
||||
var isSelf = false;
|
||||
|
|
@ -187,6 +207,10 @@ namespace Gameplay.Area
|
|||
|
||||
private bool _CheckCenterIsEnemy(int centerCellIndex)
|
||||
{
|
||||
if (centerCellIndex == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (troopId == ETroopsId.Self)
|
||||
{
|
||||
// 需要额外判断是否在光亮区域
|
||||
|
|
|
|||
Loading…
Reference in New Issue