CustomSuitSProxy.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.InteropServices.ComTypes;
  5. using System.Text;
  6. using ET;
  7. namespace GFGGame
  8. {
  9. public class CustomSuitSProxy
  10. {
  11. public static async ETTask UpdateCustomSuit(int index, List<int> arrayList, int bgID = 0, int suitId = 0, bool pic = false)
  12. {
  13. CustomSuitProto suitProto = new CustomSuitProto();
  14. suitProto.BgId = bgID;
  15. suitProto.SuitId = suitId;
  16. suitProto.Pic = pic;
  17. foreach (var equipId in arrayList)
  18. {
  19. suitProto.EquipIds.Add(equipId);
  20. }
  21. M2C_SaveCustomSuit response = (M2C_SaveCustomSuit) await MessageHelper.SendToServer(new C2M_SaveCustomSuit()
  22. {
  23. suit = suitProto
  24. });
  25. if (response != null)
  26. {
  27. if (response.Error == ErrorCode.ERR_Success)
  28. {
  29. }
  30. }
  31. }
  32. }
  33. }