EventHelper.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using Core.Language;
  3. using Excel2Json;
  4. using Fort23.UTool;
  5. public static class EventHelper
  6. {
  7. public static string GetTaskMessage(int eventConfigId)
  8. {
  9. string result = String.Empty;
  10. EventConditionConfig eventCondition = ConfigComponent.Instance.Get<EventConditionConfig>(eventConfigId);
  11. switch (eventCondition.ConditionType)
  12. {
  13. case 1:
  14. ItemConfig itemConfig = ConfigComponent.Instance.Get<ItemConfig>(eventCondition.ConditionPara[0]);
  15. result = $"需要拥有{LanguageManager.Instance.Text(itemConfig.itemName)}{eventCondition.ConditionPara[1]}个";
  16. break;
  17. case 2:
  18. break;
  19. case 3:
  20. HeroPowerUpConfig heroPowerUpConfig = ConfigComponent.Instance.Get<HeroPowerUpConfig>(eventCondition.ConditionPara[0]);
  21. string jingjie = LanguageManager.Instance.Text(heroPowerUpConfig.jingjieLanIDs[0]) +
  22. LanguageManager.Instance.Text(heroPowerUpConfig.jingjieLanIDs[1]) +
  23. LanguageManager.Instance.Text(heroPowerUpConfig.jingjieLanIDs[2]);
  24. result = $"需要达到境界{jingjie}";
  25. break;
  26. case 4:
  27. TaskConfig taskConfig = ConfigComponent.Instance.Get<TaskConfig>(eventCondition.ConditionPara[0]);
  28. result = $"需要完成任务{LanguageManager.Instance.Text(taskConfig.taskName)}";
  29. break;
  30. }
  31. return result;
  32. }
  33. }