EquipmentDropTableRepo.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. namespace XGame.Database
  2. {
  3. public partial class EquipmentDropTableRepo
  4. {
  5. public static int[] GetEquipIds(EQualityLevel quality, int playerLv)
  6. {
  7. Log.Info("权重随机装备品质:" + quality);
  8. var dataList = GetAll();
  9. for (int i = 0; i < dataList.Length; i++)
  10. {
  11. if (dataList[i].LevelPeriod[0] <= playerLv && playerLv <= dataList[i].LevelPeriod[1])
  12. {
  13. switch (quality)
  14. {
  15. case EQualityLevel.White:
  16. return dataList[i].DropPool1;
  17. case EQualityLevel.Green:
  18. return dataList[i].DropPool2;
  19. case EQualityLevel.Blue:
  20. return dataList[i].DropPool3;
  21. case EQualityLevel.Purple:
  22. return dataList[i].DropPool4;
  23. case EQualityLevel.Yellow:
  24. return dataList[i].DropPool5;
  25. case EQualityLevel.Orange:
  26. return dataList[i].DropPool6;
  27. case EQualityLevel.Red:
  28. return dataList[i].DropPool7;
  29. case EQualityLevel.Pink:
  30. return dataList[i].DropPool8;
  31. case EQualityLevel.BlueDiamond:
  32. return dataList[i].DropPool9;
  33. case EQualityLevel.Gilding:
  34. return dataList[i].DropPool10;
  35. case EQualityLevel.Bright:
  36. return dataList[i].DropPool11;
  37. default:
  38. return dataList[i].DropPool1;
  39. }
  40. }
  41. }
  42. return new int[0];
  43. }
  44. }
  45. }