SkillSProxy.cs 859 B

1234567891011121314151617181920212223242526272829
  1. using System.Collections.Generic;
  2. using ET;
  3. using GFGGame;
  4. namespace ET
  5. {
  6. }
  7. namespace GFGGame
  8. {
  9. public static class SkillSProxy
  10. {
  11. public static async ETTask<bool> ReqUpgradeCardSkill(int cardId, int skillId)
  12. {
  13. M2C_UpgradeCardSkill response = null;
  14. response = (M2C_UpgradeCardSkill)await MessageHelper.SendToServer(new C2M_UpgradeCardSkill() { CardId = cardId, SkillId = skillId });
  15. if (response != null)
  16. {
  17. if (response.Error == ErrorCode.ERR_Success)
  18. {
  19. SkillDataManager.Instance.UpdateCardSkill(response.CardId, response.SkillId, response.SkillLvl);
  20. EventAgent.DispatchEvent(ConstMessage.CARD_UP_SKILL);
  21. return true;
  22. }
  23. }
  24. return false;
  25. }
  26. }
  27. }