| | |
| | | Stop();
|
| | | return;
|
| | | }
|
| | | // 没有合适物品
|
| | | bool isHasSuitableItem = TrySend();
|
| | | if (!isHasSuitableItem)
|
| | | {
|
| | | //超出今日周围福地刷新次数上限
|
| | | bool isLimit = blessedLandModel.TryGetRefreshTypeDailyLimitValue(2, out int maxLimit);
|
| | | if (isLimit && blessedLandModel.RefreshCountRob >= maxLimit)
|
| | | return;
|
| | | //在冷却时间中
|
| | | if (blessedLandModel.GetCoolDownEndTime(0) > 0)
|
| | | return;
|
| | | // 没有空闲老鼠
|
| | | allWorkerCount = blessedLandModel.WorkerCount;
|
| | | freeWorkerCount = allWorkerCount - blessedLandModel.GetWorkingCount();
|
| | | if (freeWorkerCount < 0)
|
| | | return;
|
| | | // 工人体力耗尽
|
| | | energyUsed = blessedLandModel.EnergyUsed;
|
| | | totalEnergy = blessedLandModel.GetTotalEnergy();
|
| | | if (energyUsed >= totalEnergy)
|
| | | return;
|
| | | //能刷新周围福地就刷新周围福地
|
| | | blessedLandModel.SendCB031Pack(2);
|
| | | blessedLandModel.lastSurroundRefreshTime = TimeUtility.AllSeconds;
|
| | | blessedLandModel.SetTime(0);
|
| | | blessedLandModel.SaveAllTime();
|
| | | isTrigger = true;
|
| | | }
|
| | | TrySend();
|
| | | }
|
| | |
|
| | | private List<int> GetChooseMineIDList()
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | //循环结束还有可发包的次数 刷新周围福地
|
| | | if (isStart && nowSendCnt < sandCntMax)
|
| | | {
|
| | | //超出今日周围福地刷新次数上限
|
| | | bool isLimit = blessedLandModel.TryGetRefreshTypeDailyLimitValue(2, out int maxLimit);
|
| | | if (isLimit && blessedLandModel.RefreshCountRob >= maxLimit)
|
| | | return isHas;
|
| | | //在冷却时间中
|
| | | if (blessedLandModel.GetCoolDownEndTime(0) > 0)
|
| | | return isHas;
|
| | | //能刷新周围福地就刷新周围福地
|
| | | blessedLandModel.SendCB031Pack(2);
|
| | | blessedLandModel.lastSurroundRefreshTime = TimeUtility.AllSeconds;
|
| | | blessedLandModel.SetTime(0);
|
| | | blessedLandModel.SaveAllTime();
|
| | | isTrigger = true;
|
| | | }
|
| | | return isHas;
|
| | | }
|
| | |
|