Merge branches 'dev' and 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
4fceb5f841
@ -34,7 +34,7 @@ func (this *apiComp) NPCBattkleFinish(session comm.IUserSession, req *pb.Practic
|
|||||||
}
|
}
|
||||||
|
|
||||||
if req.Report.WinSide == 1 {
|
if req.Report.WinSide == 1 {
|
||||||
room.Npcstate = 2
|
room.Npcstate = 3
|
||||||
if conf, err = this.module.configure.getDispatchBattleData(room.Currnpc); err != nil {
|
if conf, err = this.module.configure.getDispatchBattleData(room.Currnpc); err != nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
return
|
return
|
||||||
|
@ -3,7 +3,6 @@ package practice
|
|||||||
import (
|
import (
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"go_dreamfactory/sys/configure"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
//参数校验
|
//参数校验
|
||||||
@ -14,32 +13,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 code = this.module.DispenseRes(session, conf.StoryAward, true); code != pb.ErrorCode_Success {
|
// if room.Npcstate != 2 {
|
||||||
|
// code = pb.ErrorCode_ReqParameterError
|
||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
room.Npcstate = 3
|
// // if conf, err = this.module.configure.getDispatchBattleData(room.Currnpc); err != nil {
|
||||||
room.Refresh = configure.Now().Unix()
|
// // code = pb.ErrorCode_ConfigNoFound
|
||||||
this.module.modelPandata.Change(session.GetUserId(), map[string]interface{}{
|
// // return
|
||||||
"npcstate": room.Npcstate,
|
// // }
|
||||||
"refresh": room.Refresh,
|
// // if code = this.module.DispenseRes(session, conf.StoryAward, true); code != pb.ErrorCode_Success {
|
||||||
})
|
// // 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
|
||||||
}
|
}
|
||||||
|
@ -413,7 +413,7 @@ func (this *Practice) CleanUpNpc(uid string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
result.Refresh = configure.Now().Unix()
|
result.Refresh = configure.Now().Unix()
|
||||||
this.modelPandata.Change(uid, map[string]interface{}{ // 同步状态即可
|
model.Change(uid, map[string]interface{}{ // 同步状态即可
|
||||||
"npcstate": 3,
|
"npcstate": 3,
|
||||||
"refresh": result.Refresh,
|
"refresh": result.Refresh,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user