RoleInfoSProxy.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System.Collections.Generic;
  2. using ET;
  3. namespace GFGGame
  4. {
  5. public static class RoleInfoSProxy
  6. {
  7. //请求个人信息
  8. public static async ETTask<bool> ReqPersonalInfo()
  9. {
  10. S2C_GetPersonalInfo response = null;
  11. response = (S2C_GetPersonalInfo)await MessageHelper.SendToServer(new C2S_GetPersonalInfo());
  12. if (response != null)
  13. {
  14. if (response.Error == ErrorCode.ERR_Success)
  15. {
  16. RoleDataManager.slogan = response.Signature;
  17. return true;
  18. }
  19. }
  20. return false;
  21. }
  22. //修改个人签名
  23. public static async ETTask<string> ReqModifySlogan(string slogan)
  24. {
  25. S2C_ModifySignature response = null;
  26. response = (S2C_ModifySignature)await MessageHelper.SendToServer(new C2S_ModifySignature() { Signature = slogan });
  27. if (response != null)
  28. {
  29. if (response.Error == ErrorCode.ERR_Success)
  30. {
  31. RoleDataManager.slogan = response.Signature;
  32. return RoleDataManager.slogan;
  33. }
  34. }
  35. return RoleDataManager.slogan;
  36. }
  37. }
  38. }