Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
1d46dac1e7
@ -124,7 +124,7 @@ const (
|
||||
ModuleEgghunt core.M_Modules = "egghunt" //彩蛋
|
||||
ModuleCatchbugs core.M_Modules = "catchbugs" //捉虫子
|
||||
ModuleMoonlv core.M_Modules = "moonlv" //护月等级
|
||||
ModuleWhackamole core.M_Modules = "whackamole" //大豚鼠
|
||||
ModuleWhackamole core.M_Modules = "whackamole" //打豚鼠
|
||||
ModuleMonkey core.M_Modules = "monkey" //猴拳
|
||||
ModuleIntegral core.M_Modules = "integral" // 积分boss
|
||||
)
|
||||
|
53
modules/robot/modulerobot_dispatch.go
Normal file
53
modules/robot/modulerobot_dispatch.go
Normal file
@ -0,0 +1,53 @@
|
||||
package robot
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//派遣模块 机器人
|
||||
type ModuleRobot_Dispatch struct {
|
||||
dispatch *pb.Noticeboard
|
||||
}
|
||||
|
||||
func (this *ModuleRobot_Dispatch) Init() (err error) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
//接收到消息
|
||||
func (this *ModuleRobot_Dispatch) Receive(robot IRobot, stype string, message proto.Message) (err error) {
|
||||
switch stype {
|
||||
case "notice":
|
||||
resp := message.(*pb.DispatchNoticeResp)
|
||||
this.dispatch = resp.Dispatch
|
||||
break
|
||||
}
|
||||
return
|
||||
}
|
||||
func (this *ModuleRobot_Dispatch) OncePipeline(robot IRobot) (err error) {
|
||||
var (
|
||||
errdata *pb.ErrorData
|
||||
)
|
||||
if _, errdata = robot.SendMessage("dispatch", "notice", &pb.DispatchNoticeReq{}); errdata != nil {
|
||||
err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//机器人执行流
|
||||
func (this *ModuleRobot_Dispatch) DoPipeline(robot IRobot) (err error) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
//做任务
|
||||
func (this *ModuleRobot_Dispatch) DoTask(robot IRobot, taskconf *cfg.GameWorldTaskData, condconf *cfg.GameBuriedCondiData) (err error) {
|
||||
|
||||
return
|
||||
}
|
@ -188,12 +188,12 @@ func (this *configureComp) GetPlayerOverview(id string, sex int32) (configure *c
|
||||
)
|
||||
key = fmt.Sprintf("%s%d", id, sex)
|
||||
if configure, ok = this._pInforoverview[key]; !ok {
|
||||
// key = fmt.Sprintf("%s%d", id, 0)
|
||||
// if configure, ok = this._pInforoverview[key]; !ok {
|
||||
err = comm.NewNotFoundConfErr("用户模块", game_playerinfor_overview, key)
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
// }
|
||||
key = fmt.Sprintf("%s%d", id, 0)
|
||||
if configure, ok = this._pInforoverview[key]; !ok {
|
||||
err = comm.NewNotFoundConfErr("用户模块", game_playerinfor_overview, key)
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user