StorageSProxy.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System.Collections.Generic;
  2. using ET;
  3. using GFGGame;
  4. namespace GFGGame
  5. {
  6. public class StorageSProxy
  7. {
  8. //存储
  9. public static async ETTask ReqSetClientValue(int key, int value)
  10. {
  11. M2C_SetClientValue response = null;
  12. response = (M2C_SetClientValue)await MessageHelper.SendToServer(new C2M_SetClientValue() { Key = key, Value = value });
  13. if (response != null)
  14. {
  15. if (response.Error == ErrorCode.ERR_Success)
  16. {
  17. }
  18. }
  19. }
  20. //获取
  21. public static async ETTask ReqGetClientValues(int chapterId, int buyType, int buyCount)
  22. {
  23. M2C_GetClientValues response = null;
  24. response = (M2C_GetClientValues)await MessageHelper.SendToServer(new C2M_GetClientValues() { });
  25. if (response != null)
  26. {
  27. if (response.Error == ErrorCode.ERR_Success)
  28. {
  29. }
  30. }
  31. }
  32. }
  33. }