syntax = "proto3";
option go_package = ".;pb";

import "battle_msg.proto";
import "rtask_db.proto";

// 申请做任务
message RtaskApplyReq {
  int32 rtaskId = 1;    //任务ID
  int32 rtaskSubId = 2; //支线任务ID
}

message RtaskApplyResp { int32 rtaskId = 1; }

// 任务列表
message RtasklistReq {
  int32 groupId = 1; //分组ID
}
message RtasklistResp {
  repeated int32 rtaskIds = 1;
  int32 groupId = 2;
}

// 对话选项
message RtaskChooseReq {
  int32 rtaskId = 1;    //任务ID
  int32 chooseId = 2;   //选项配置ID
  int32 rtaskSubId = 3; //支线任务ID
}

message RtaskChooseResp {
  int32 rtaskId = 1;    //任务ID
  int32 chooseId = 2;   //选项配置ID
  int32 rtaskSubId = 3; //支线任务ID
}

// 任务完成推送
message RtaskFinishPush { int32 rtaskId = 1; }

// 当前完成的任务列表推送
message RtaskFinishIdsPush {
  repeated int32 rtaskId = 1;
  int32 groupId = 2;
}

// 领奖
message RtaskGetRewardReq {
  int32 rtaskId = 1;
  int32 rtaskSubId = 2; //支线任务ID
}
message RtaskGetRewardResp {
  int32 rtaskId = 1;
  int32 rtaskSubId = 2; //支线任务ID
}

// 开始战斗
message RtaskBattleStartReq {
  int32 battleConfId = 1;      //战斗配表ID
  int32 leadpos = 3;           //队长位置
  repeated string teamids = 4; //阵容信息
}

message RtaskBattleStartResp {
  BattleInfo info = 1; //战斗信息
}

// 战斗完成
message RtaskBattleFinishReq {
  int32 rtaskId = 1;    //任务ID
  int32 rtaskSubId = 2; //支线任务ID
  int32 chooseId = 3;   //选项配置ID
}

message RtaskBattleFinishResp {
  int32 rtaskId = 1;    //任务ID
  int32 rtaskSubId = 2; //支线任务ID
}

//获取玩家任务记录
message RtaskGetrecordReq {}

message RtaskGetrecordResp { DBRtaskRecord record = 1; }

// 测试使用
message RtaskTestReq {
  int32 rtaskType = 1;       //任务类型
  repeated int32 params = 2; //参数
  int32 condiId = 3;         //条件ID
  int32 groupId = 4;         //分组编号
  string rtaskIds = 5;       //已完成的任务ids
}

message RtaskTestResp {
  bool flag = 1;
  repeated int32 rtaskIds = 2;
}