|
@@ -36,9 +36,9 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
base.AddButtonEvent();
|
|
|
Btn_RemoveEvent.onClick.AddListener(async () =>
|
|
|
- {
|
|
|
+ {
|
|
|
var isOk = await TipsPanle.OpenPnael("", "放弃后,事件会从列表消失。已消耗的神识不会返还。是否确认?");
|
|
|
- if(isOk)
|
|
|
+ if (isOk)
|
|
|
EventSystemManager.Instance.RemoveEvent(eventList);
|
|
|
});
|
|
|
Btn_Go.onClick.AddListener(() => { goCallBack?.Invoke(this); });
|
|
@@ -97,6 +97,7 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
Text_Eventcondition.text = "";
|
|
|
}
|
|
|
+
|
|
|
EventconditionState.ChangeState(0);
|
|
|
}
|
|
|
else
|
|
@@ -109,6 +110,7 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
isComplete = false;
|
|
|
}
|
|
|
+
|
|
|
desc += EventHelper.GetTaskMessage(eventConditionData) + "\n";
|
|
|
}
|
|
|
|
|
@@ -120,8 +122,7 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
EventconditionState.ChangeState(0);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
|
|
|
Text_Eventcondition.text = desc;
|
|
|
}
|
|
@@ -132,22 +133,6 @@ namespace Fort23.Mono
|
|
|
Icon_Marsk.gameObject.SetActive(eventList.isCompleted);
|
|
|
|
|
|
|
|
|
- List<ItemInfo> itemInfos = new List<ItemInfo>();
|
|
|
- for (var i = 0; i < randomEventConfig.PrizeIDs.Length; i++)
|
|
|
- {
|
|
|
- DropConfig dropConfig = ConfigComponent.Instance.Get<DropConfig>(randomEventConfig.PrizeIDs[i]);
|
|
|
- if (dropConfig.dropType == 3)
|
|
|
- {
|
|
|
- ItemInfo itemInfo = new ItemInfo(dropConfig.dropGroupID[0], randomEventConfig.PrizeNums[i]);
|
|
|
- itemInfos.Add(itemInfo);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- List<ItemInfo> items = DropManager.Instance.DropItem(randomEventConfig.PrizeIDs[i]);
|
|
|
- itemInfos.AddRange(items);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
if (randomEventConfig.placeID != 0)
|
|
|
{
|
|
|
PlacesConfig placesConfig = ConfigComponent.Instance.Get<PlacesConfig>(randomEventConfig.placeID);
|
|
@@ -158,11 +143,39 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
Text_Mapname.gameObject.SetActive(false);
|
|
|
}
|
|
|
+
|
|
|
Text_Type.text = EventHelper.GetEventType(randomEventConfig.EventTag);
|
|
|
- for (var i = 0; i < itemInfos.Count; i++)
|
|
|
+
|
|
|
+ if (randomEventConfig.PrizeIDs != null)
|
|
|
+ {
|
|
|
+ List<ItemInfo> itemInfos = new List<ItemInfo>();
|
|
|
+ for (var i = 0; i < randomEventConfig.PrizeIDs.Length; i++)
|
|
|
+ {
|
|
|
+ DropConfig dropConfig = ConfigComponent.Instance.Get<DropConfig>(randomEventConfig.PrizeIDs[i]);
|
|
|
+ if (dropConfig.dropType == 3)
|
|
|
+ {
|
|
|
+ ItemInfo itemInfo = new ItemInfo(dropConfig.dropGroupID[0], randomEventConfig.PrizeNums[i]);
|
|
|
+ itemInfos.Add(itemInfo);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ List<ItemInfo> items = DropManager.Instance.DropItem(randomEventConfig.PrizeIDs[i]);
|
|
|
+ itemInfos.AddRange(items);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for (var i = 0; i < itemInfos.Count; i++)
|
|
|
+ {
|
|
|
+ WidgetItem widgetItem = await UIManager.Instance.CreateGComponent<WidgetItem>(null, ItemRoot);
|
|
|
+ widgetItem.InitWidget(itemInfos[i]);
|
|
|
+ widgetList.Add(widgetItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach (var eventListItemInfo in eventList.itemInfos)
|
|
|
{
|
|
|
WidgetItem widgetItem = await UIManager.Instance.CreateGComponent<WidgetItem>(null, ItemRoot);
|
|
|
- widgetItem.InitWidget(itemInfos[i]);
|
|
|
+ widgetItem.InitWidget(eventListItemInfo);
|
|
|
widgetList.Add(widgetItem);
|
|
|
}
|
|
|
}
|