BCAllowBuy.cs 661 B

12345678910111213141516171819202122232425262728
  1. using System.Threading.Tasks;
  2. using BossBase;
  3. namespace BossCommand
  4. {
  5. public class BCAllowBuy: ABossCommand
  6. {
  7. public BCAllowBuy(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} 0", this.Guid)
  16. });
  17. var smsgBossCommandResponse = await 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. }