1234567891011121314151617181920212223242526272829303132333435363738 |
- using System;
- using Core.Language;
- using Excel2Json;
- using Fort23.UTool;
- public static class EventHelper
- {
- public static string GetTaskMessage(int eventConfigId)
- {
- string result = String.Empty;
- EventConditionConfig eventCondition = ConfigComponent.Instance.Get<EventConditionConfig>(eventConfigId);
- switch (eventCondition.ConditionType)
- {
- case 1:
- ItemConfig itemConfig = ConfigComponent.Instance.Get<ItemConfig>(eventCondition.ConditionPara[0]);
- result = $"需要拥有{LanguageManager.Instance.Text(itemConfig.itemName)}{eventCondition.ConditionPara[1]}个";
- break;
- case 2:
- break;
- case 3:
- HeroPowerUpConfig heroPowerUpConfig = ConfigComponent.Instance.Get<HeroPowerUpConfig>(eventCondition.ConditionPara[0]);
- string jingjie = LanguageManager.Instance.Text(heroPowerUpConfig.jingjieLanIDs[0]) +
- LanguageManager.Instance.Text(heroPowerUpConfig.jingjieLanIDs[1]) +
- LanguageManager.Instance.Text(heroPowerUpConfig.jingjieLanIDs[2]);
- result = $"需要达到境界{jingjie}";
- break;
- case 4:
- TaskConfig taskConfig = ConfigComponent.Instance.Get<TaskConfig>(eventCondition.ConditionPara[0]);
- result = $"需要完成任务{LanguageManager.Instance.Text(taskConfig.taskName)}";
- break;
- }
- return result;
- }
- }
|