syntax = "proto3";
option go_package = ".;pb";
import "items_db.proto";
import "comm.proto";

//查询用户背包请求
message ItemsGetlistReq {
    int32 IType = 1;                //道具类型
}

//查询用户背包请求 回应
message ItemsGetlistResp {
    repeated DB_UserItemData Grids = 1; //用户背包列表
}

//背包变化推送
message ItemsChangePush {
    repeated DB_UserItemData Grids = 1; //变化数据
}

//使用物品请求
message ItemsUseItemReq {
    string GridId = 1;      //格子Id
    uint32 Amount = 2;      //使用数量
    int32 Select = 3;       //选择下标
}

//使用物品请求 回应
message ItemsUseItemResp {
    string GridId = 1;      //格子Id
    uint32 Amount = 2;      //使用数量
    bool issucc = 3;        //是否成功
}

//出售道具请求sailitem
message ItemsSellItemReq {
    string GridId = 1;       //格子Id
    string ItemId = 2;       //物品Id
    uint32 Amount = 3;       //使用数量
}

//出售道具请求 回应
message ItemsSellItemResp {
    string GridId = 1;      //格子Id
    uint32 Amount = 2;      //使用数量
    bool issucc = 3;        //是否成功
}

//分解道具 请求
message ItemsDecomposeReq {
    string GridId = 1;       //格子Id
    string ItemId = 2;       //物品Id
    uint32 Amount = 3;       //使用数量
}

//分解道具 请求回应
message ItemsDecomposeResp {
    string GridId = 1;      //格子Id
    uint32 Amount = 2;      //使用数量
    bool issucc = 3;        //是否成功
}

//购买体力
message ItemsBuyPhysicalReq {
    uint32 Amount = 2;      //购买数量
}

//购买体力
message ItemsBuyPhysicalResp {
    bool issucc = 1;        //是否成功
    int32 PhysicalBuyNum = 2;   //体力购买次数
    repeated UserAssets asets = 3 ; //获取资源
}

//批量出售接口
message ItemsSellinbulkReq {
    repeated string grids = 1;       //格子Id
    repeated uint32 amount = 2;      //出售数量
}

//批量出售接口
message ItemsSellinbulkResp {
    repeated string grids = 1;       //格子Id
    repeated uint32 amount = 2;      //出售数量
    repeated bool issucc = 3;        //是否成功
}

//购买统一入场门票请求
message ItemsBuyUnifiedTicketReq {
    int32 BuyNum = 1;
}
//购买统一入场门票请求回应
message ItemsBuyUnifiedTicketResp {
    bool issucc = 1;
    int32 buyunifiedticket = 2; //购买统一入场门票次数
    int64 recovertimeunifiedticket = 3;//同意门票恢复时间
}

//刷新统一入场卷
message ItemsRefreshUnifiedTicketReq {

}

message ItemsRefreshUnifiedTicketResp {

}


//魔药合成请求
message ItemsPotionSynthesisReq {
    int32 id = 1;                   //配方id
    int32 succnum = 2;              //成功数量
    int32 num = 3;                  //炼制数量
}
//魔药合成请求 回应
message ItemsPotionSynthesisResp {
    bool succ = 1;
    int32 id = 2;                   //配方id
    int32 num = 3;                  //炼制数量
}