public void SaleDefence(DefenceUIParam uiparam) { SaleDefenceActionParam param = new SaleDefenceActionParam(); param.DefenceId = uiparam.itemid; param.PackType = (int)uiparam.packtype; param.pos = uiparam.packpos; Net.Instance.DoAction((int)Message.MESSAGE_ID.ID_MSG_DEFENCE_SALE, param); }
protected override void OnRequest(request_defence_sale request, object userdata) { SaleDefenceActionParam param = userdata as SaleDefenceActionParam; if (param == null) { return; } request.defenceId = param.DefenceId; request.pos = param.pos; request.packtype = param.PackType; }