GetHighestCardIndex.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using UnityEditor.SceneManagement;
  5. using UnityEditor;
  6. using UnityEngine;
  7. using UnityEngine.SceneManagement;
  8. using DCGO.CardEntities;
  9. namespace DCGO.Tools.Repair
  10. {
  11. public class GetHighestCardIndex : MonoBehaviour
  12. {
  13. [MenuItem("Window/DCGO/Repair/Get Highest Card Index")]
  14. static void FixEntityClassNames()
  15. {
  16. List<CEntity_Base> Entities = GetAsset.LoadAll<CEntity_Base>("Assets/CardBaseEntity/");
  17. int cardIndex = 0;
  18. string name = "";
  19. foreach (CEntity_Base card in Entities)
  20. {
  21. if (card.CardID.Contains("P-"))
  22. continue;
  23. if (card.CardIndex > cardIndex)
  24. {
  25. cardIndex = card.CardIndex;
  26. name = card.CardSpriteName;
  27. }
  28. }
  29. Debug.Log($"Highest Card Index: {cardIndex} - {name}");
  30. }
  31. }
  32. public class GetHighestPromoCardIndex : MonoBehaviour
  33. {
  34. [MenuItem("Window/DCGO/Repair/Get Highest Promo Index")]
  35. static void FixEntityClassNames()
  36. {
  37. List<CEntity_Base> Entities = GetAsset.LoadAll<CEntity_Base>("Assets/CardBaseEntity/");
  38. int cardIndex = 0;
  39. string name = "";
  40. foreach (CEntity_Base card in Entities)
  41. {
  42. if (!card.CardID.Contains("P-"))
  43. continue;
  44. if (card.CardIndex > cardIndex)
  45. {
  46. cardIndex = card.CardIndex;
  47. name = card.CardSpriteName;
  48. }
  49. }
  50. Debug.Log($"Highest Card Index: {cardIndex} - {name}");
  51. }
  52. }
  53. }