npc踢馆 领奖
This commit is contained in:
parent
882adadc3e
commit
99affaf831
@ -3,6 +3,7 @@ package practice
|
|||||||
import (
|
import (
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
|
"go_dreamfactory/sys/configure"
|
||||||
)
|
)
|
||||||
|
|
||||||
//参数校验
|
//参数校验
|
||||||
@ -13,32 +14,32 @@ func (this *apiComp) NPCDialogCheck(session comm.IUserSession, req *pb.PracticeN
|
|||||||
|
|
||||||
///npc 此协议废弃 不用
|
///npc 此协议废弃 不用
|
||||||
func (this *apiComp) NPCDialog(session comm.IUserSession, req *pb.PracticeNPCDialogReq) (code pb.ErrorCode, data *pb.ErrorData) {
|
func (this *apiComp) NPCDialog(session comm.IUserSession, req *pb.PracticeNPCDialogReq) (code pb.ErrorCode, data *pb.ErrorData) {
|
||||||
// var (
|
var (
|
||||||
// err error
|
err error
|
||||||
// room *pb.DBPracticeRoom
|
room *pb.DBPracticeRoom
|
||||||
// // conf *cfg.GameDispatch_BattleData
|
// conf *cfg.GameDispatch_BattleData
|
||||||
// )
|
)
|
||||||
// if room, err = this.module.modelPandata.queryUserMartialhall(session.GetUserId()); err != nil {
|
if room, err = this.module.modelPandata.queryUserMartialhall(session.GetUserId()); err != nil {
|
||||||
// code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if room.Npcstate != 2 {
|
||||||
|
code = pb.ErrorCode_ReqParameterError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// if conf, err = this.module.configure.getDispatchBattleData(room.Currnpc); err != nil {
|
||||||
|
// code = pb.ErrorCode_ConfigNoFound
|
||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
// if room.Npcstate != 2 {
|
// if code = this.module.DispenseRes(session, conf.StoryAward, true); code != pb.ErrorCode_Success {
|
||||||
// code = pb.ErrorCode_ReqParameterError
|
|
||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
// // if conf, err = this.module.configure.getDispatchBattleData(room.Currnpc); err != nil {
|
room.Npcstate = 3
|
||||||
// // code = pb.ErrorCode_ConfigNoFound
|
room.Refresh = configure.Now().Unix()
|
||||||
// // return
|
this.module.modelPandata.Change(session.GetUserId(), map[string]interface{}{
|
||||||
// // }
|
"npcstate": room.Npcstate,
|
||||||
// // if code = this.module.DispenseRes(session, conf.StoryAward, true); code != pb.ErrorCode_Success {
|
"refresh": room.Refresh,
|
||||||
// // return
|
})
|
||||||
// // }
|
|
||||||
// room.Npcstate = 3
|
|
||||||
// room.Refresh = configure.Now().Unix()
|
|
||||||
// this.module.modelPandata.Change(session.GetUserId(), map[string]interface{}{
|
|
||||||
// "npcstate": room.Npcstate,
|
|
||||||
// "refresh": room.Refresh,
|
|
||||||
// })
|
|
||||||
session.SendMsg(string(this.module.GetType()), "npcdialog", &pb.PracticeNPCDialogResp{Issucc: true})
|
session.SendMsg(string(this.module.GetType()), "npcdialog", &pb.PracticeNPCDialogResp{Issucc: true})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user