syntax = "proto3";
option go_package = ".;pb";
import "errorcode.proto";
import "practice_db.proto";
import "battle_msg.proto";
import "pvp_db.proto";



///信息请求
message PracticeInfoReq {}
///信息请求 回应
message PracticeInfoResp { DBPracticeRoom info = 1; }

///推送自己的房价数据变化
message PracticeRommChangePush{
    DBPracticeRoom info = 1;
}

///请求好友武馆房间信息 
message PracticeFriendRommReq {
    repeated string fuid = 1;
}
///请求好友武馆房间信息 回应
message PracticeFriendRommResp {
    map<string,DBPracticeRoom>  infos = 1;
}
///升级请求
message PracticeUnLockReq {
    int32 index = 1;            //柱子id
}
message PracticeUnLockResp {
    DBPracticeRoom info = 1;
}


///升级请求
message PracticeUpgradeReq {
    int32 index = 1;            //柱子id
}
message PracticeUpgradeResp {
    int32 index = 1;            //柱子id
    int32 lv = 2;
}

///练功请求
message PracticePracticeReq {
    int32 index = 1;            //柱子id
    string hero = 2;            //训练英雄id
    string teacher = 3;         //教习id
    string prop = 4;            //道具id
}
message PracticePracticeResp {
    DBPracticePillar pillar = 1;
}

///蹭馆请求
message PracticeLootReq {
    string friend = 1;          //好友id
    string hero = 2;            //训练英雄id
    string teacher = 3;         //教习id
    string prop = 4;            //道具id
}
message PracticeLootResp {
    string friend = 1;          //好友id
    DBPracticePillar pillar = 2;
}

///驱逐
message PracticeExpulsionReq {

}
message PracticeExpulsionResp {
    DBPracticePillar pillar = 1;
    map<string,int32> knapsack = 2;    //资源
}

///自己的英雄被驱逐推送
message PracticeBeExpulsionPush{
    string fuid = 1;
    DBPracticePillar pillar = 2;
    map<string,int32> knapsack = 3;    //资源
}


///领取收益
message PracticeReceiveReq {
    int32 index = 1;            //柱子id
    string friend = 2;          //好友id
}
message PracticeReceiveResp {
    DBPracticePillar pillar = 1;
    map<string,int32> knapsack = 2;    //资源
}

///登记满级英雄
message PracticeEnrolledReq {
    int32 group = 1;
    repeated string hero = 2;
}
///登记满级英雄 回应
message PracticeEnrolledResp{
    int32 group = 1;
    repeated string hero = 2;
}

///练功道具和教习推送
message PracticeJXItemPush{
    repeated string id = 1;
}


///健身获得buff请求
message PracticeGymInfoReq {
   
}
///健身获得buff请求
message PracticeGymInfoResp {
   int32 lastaction = 1;
   int32 refreshnum = 2;
}

message PracticeGymRefreshReq {

}

message PracticeGymRefreshResp {
    int32 lastaction = 1;
    int32 refreshnum = 2;
}

///健身获得buff请求
message PracticeGetGymBuffReq {
    int32 posture = 1;
}

///健身获得buff请求 回应
message PracticeGetGymBuffResp {
    int32 buffid = 1;
}


///健身 确认buff 请求
message PracticeGymConfirmReq {
    int32 buffid = 1;
}

///健身 确认buff 请求回应
message PracticeGymConfirmResp {
    int32 buffid = 1;
}


///武馆切磋请求
message PracticeQiecuoReq {
    string fid = 1;
}
message PracticeQiecuoResp {
    string fid = 1;
    bool isbattle = 2;
    DBPvpBattle battle = 3;
}


//接受切磋
message PracticeAcceptReq{
    string uid = 1; //切磋发起者
}
  
message PracticeAcceptResp{
    bool isSucc = 1;
}



//拒绝切磋
message PracticeRefuseReq{
    string uid = 1; //切磋发起者 
}
   
message PracticeRefuseResp{
    bool isSucc = 1;
     
}


//切磋通知
message PracticeQiecuonotifyPush{
    string uid = 1; //发起者（切磋)
    string name = 2;  //发起者用户名
    int32 notifyType = 3; //1发起通知 2接受通知 3拒绝通知
}

//NPC战斗请求
message PracticeNPCBattkleReq {
    BattleFormation formation = 1;  //战斗类型
}
//NPC战斗请求 回应
message PracticeNPCBattkleResp {
    ErrorCode code = 1; //是否成功
    BattleInfo info = 2;
}

//NPC战斗结束请求
message PracticeNPCBattkleFinishReq {
    BattleReport report = 1; //战报
}
//NPC战斗结束请求 回应
message PracticeNPCBattkleFinishResp {
    bool issucc = 1; //是否成功
}

//NPC对话 请求
message PracticeNPCDialogReq{

}
//NPC对话 请求
message PracticeNPCDialogResp{
    bool issucc = 1; //是否成功
}