|
@@ -4,6 +4,8 @@ using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using Excel2Json;
|
|
|
using Fort23.UTool;
|
|
|
+using GameLogic.Bag;
|
|
|
+using GameLogic.Player;
|
|
|
using UnityEngine;
|
|
|
using Utility;
|
|
|
using Random = UnityEngine.Random;
|
|
@@ -26,17 +28,15 @@ public class EventSystemManager : Singleton<EventSystemManager>
|
|
|
DivineSenseConfig divineSenseConfig = ConfigComponent.Instance.Get<DivineSenseConfig>(1);
|
|
|
|
|
|
|
|
|
- // 选择神识区间
|
|
|
- DivineSenseIntervalConfig interval = SelectInterval(200);
|
|
|
+ //先掉落出品质
|
|
|
+ List<ItemInfo> itemInfos = DropManager.Instance.DropItem(1);
|
|
|
|
|
|
// 获取通用事件
|
|
|
- List<EventConfig> globalEvents = eventConfigs
|
|
|
- .Where(e => e.EventTriggerType == 3 && CanTriggerEvent(e.ID))
|
|
|
- .ToList();
|
|
|
+ List<EventConfig> globalEvents = eventConfigs.Where(e => e.EventTriggerType == 3 && CanTriggerEvent(e.ID) && e.EventQuality == itemInfos[0].dropItemConfig.itemID[0]).ToList();
|
|
|
|
|
|
|
|
|
//神识场景事件
|
|
|
- List<EventConfig> candidateEvents = eventConfigs.Where(e => bigMap.DivineSenseGeneralEvent.Contains(e.ID) && CanTriggerEvent(e.ID)).ToList();
|
|
|
+ List<EventConfig> candidateEvents = eventConfigs.Where(e => bigMap.DivineSenseGeneralEvent.Contains(e.ID) && CanTriggerEvent(e.ID) && e.EventQuality == itemInfos[0].dropItemConfig.itemID[0]).ToList();
|
|
|
|
|
|
if (candidateEvents.Count == 0 && globalEvents.Count == 0)
|
|
|
{
|
|
@@ -49,7 +49,7 @@ public class EventSystemManager : Singleton<EventSystemManager>
|
|
|
for (int i = 0; i >= divineSenseConfig.DetectEventCount; i++)
|
|
|
{
|
|
|
int randomValue1 = Random.Range(0, 101);
|
|
|
- //刷
|
|
|
+ //刷场景事件
|
|
|
if (randomValue1 >= bigMap.DivineSenseGeneralProbability && candidateEvents.Count > 0)
|
|
|
{
|
|
|
int randomValue2 = Random.Range(0, candidateEvents.Count);
|