BCForbiddenBuy.cs 693 B

12345678910111213141516171819202122232425262728
  1. using System.Threading.Tasks;
  2. using BossBase;
  3. namespace BossCommand
  4. {
  5. public class BCForbiddenBuy: ABossCommand
  6. {
  7. public BCForbiddenBuy(IMessageChannel iMessageChannel): base(iMessageChannel)
  8. {
  9. }
  10. public string Guid { get; set; }
  11. public override async Task<object> DoAsync()
  12. {
  13. this.SendMessage(new CMSG_Boss_Gm
  14. {
  15. Message = string.Format("forbidden_buy_item {0} {1}", this.Guid, 365 * 24 * 3600)
  16. });
  17. var smsgBossCommandResponse = await this.RecvMessage<SMSG_Boss_Command_Response>();
  18. if (smsgBossCommandResponse.ErrorCode == ErrorCode.RESPONSE_SUCCESS)
  19. {
  20. return ErrorCode.RESPONSE_SUCCESS;
  21. }
  22. return smsgBossCommandResponse.ErrorCode;
  23. }
  24. }
  25. }