ClothingSyntheticSProxy.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using ET;
  6. namespace GFGGame
  7. {
  8. public class ClothingSyntheticSProxy
  9. {
  10. public static async ETTask<bool> ClothtingSynthetic(int itemId)
  11. {
  12. var response = (M2C_ClothingSynthetic)await MessageHelper.SendToServer(new C2M_ClothingSynthetic() { ItemId = itemId });
  13. if (response != null)
  14. {
  15. if (response.Error == ErrorCode.ERR_Success)
  16. {
  17. GetSuitItemController.TryShow(itemId);
  18. return true;
  19. }
  20. }
  21. return true;
  22. }
  23. public static async ETTask<bool> CardSynthetic(int itemId,bool isFirst)
  24. {
  25. var response = (M2C_ClothingSynthetic)await MessageHelper.SendToServer(new C2M_ClothingSynthetic() { ItemId = itemId });
  26. if (response != null)
  27. {
  28. if (response.Error == ErrorCode.ERR_Success)
  29. {
  30. if(isFirst)
  31. {
  32. ViewManager.Show<LuckyBoxNewCardView>(itemId);
  33. }
  34. else
  35. {
  36. int[][] array = new int[][]
  37. {
  38. new int[] { 3000028, 1 }
  39. };
  40. BonusController.TryShowBonusList(array);
  41. }
  42. return true;
  43. }
  44. }
  45. return true;
  46. }
  47. }
  48. }