Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
a14e71e0f6
@ -20,8 +20,14 @@ func (this *apiComp) InCmd(session comm.IUserSession, req *pb.PvpInCmdReq) (code
|
|||||||
battle *BattleItem
|
battle *BattleItem
|
||||||
side int32
|
side int32
|
||||||
ok bool
|
ok bool
|
||||||
|
cd pb.ErrorCode
|
||||||
)
|
)
|
||||||
if code = this.InCmdCheck(session, req); code != pb.ErrorCode_Success {
|
|
||||||
|
defer func() {
|
||||||
|
session.SendMsg(string(this.module.GetType()), "incmd", &pb.PvpInCmdResp{Code: cd, Battleid: req.Battleid, Cmd: req.Cmd})
|
||||||
|
}()
|
||||||
|
|
||||||
|
if cd = this.InCmdCheck(session, req); cd != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.module.lock.RLock()
|
this.module.lock.RLock()
|
||||||
@ -46,11 +52,11 @@ func (this *apiComp) InCmd(session comm.IUserSession, req *pb.PvpInCmdReq) (code
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
//技能释放指令
|
//技能释放指令
|
||||||
if code = this.module.battle.InCmdBattle(&pb.BattleInCmdReq{
|
if cd = this.module.battle.InCmdBattle(&pb.BattleInCmdReq{
|
||||||
Battleid: req.Battleid,
|
Battleid: req.Battleid,
|
||||||
Side: side,
|
Side: side,
|
||||||
In: req.Cmd,
|
In: req.Cmd,
|
||||||
}); code != pb.ErrorCode_Success {
|
}); cd != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
if battle.operatetimer != nil {
|
if battle.operatetimer != nil {
|
||||||
@ -58,9 +64,9 @@ func (this *apiComp) InCmd(session comm.IUserSession, req *pb.PvpInCmdReq) (code
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
code = pb.ErrorCode_BattleInCmdFailed
|
cd = pb.ErrorCode_BattleInCmdFailed
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
session.SendMsg(string(this.module.GetType()), "incmd", &pb.PvpInCmdResp{Battleid: req.Battleid, Cmd: req.Cmd})
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user