更改配置
This commit is contained in:
parent
7924cc979a
commit
a9f8dc8bce
@ -10,7 +10,7 @@ import (
|
||||
const (
|
||||
gameRtask = "game_rdtask.json"
|
||||
gameRtaskChoose = "game_rdtaskchoose.json"
|
||||
gameRtaskCondi = "game_rdtaskcondi.json"
|
||||
gameTaskCond = "game_taskcond.json"
|
||||
gameRtaskSide = "game_rdtaskside.json"
|
||||
gameRtaskBattle = "game_rdtaskbattle.json"
|
||||
)
|
||||
@ -24,7 +24,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
|
||||
err = this.LoadMultiConfigure(map[string]interface{}{
|
||||
gameRtask: cfg.NewGameRdtask,
|
||||
gameRtaskChoose: cfg.NewGameRdtaskChoose,
|
||||
gameRtaskCondi: cfg.NewGameRdtaskCondi,
|
||||
gameTaskCond: cfg.NewGameTaskCond,
|
||||
gameRtaskSide: cfg.NewGameRdtaskSide,
|
||||
gameRtaskBattle: cfg.NewGameRdtaskBattle,
|
||||
})
|
||||
@ -52,7 +52,7 @@ func (this *configureComp) getRtaskCondiCfg() (data *cfg.GameRdtaskCondi, err er
|
||||
v interface{}
|
||||
ok bool
|
||||
)
|
||||
if v, err = this.GetConfigure(gameRtaskCondi); err != nil {
|
||||
if v, err = this.GetConfigure(gameTaskCond); err != nil {
|
||||
return
|
||||
} else {
|
||||
if data, ok = v.(*cfg.GameRdtaskCondi); !ok {
|
||||
|
@ -53,9 +53,9 @@ func (this *apiComp) Mine(session comm.IUserSession, req *pb.SociatyMineReq) (co
|
||||
// 获取会长
|
||||
master := this.module.modelSociaty.getMasterInfo(sociaty)
|
||||
if master != nil {
|
||||
//判断当前玩家是否是会长
|
||||
if master.Uid == uid { //会长
|
||||
this.module.modelSociaty.extendJob(master.Uid, sociaty)
|
||||
if err := this.module.modelSociaty.extendJob(master.Uid, sociaty); err == nil {
|
||||
// 获取新的会长
|
||||
master = this.module.modelSociaty.getMasterInfo(sociaty)
|
||||
}
|
||||
}
|
||||
rsp.Sociaty = sociaty
|
||||
|
@ -574,7 +574,7 @@ func (this *ModelSociaty) extendJob(srcMasterId string, sociaty *pb.DBSociaty) e
|
||||
return errors.New("config not found")
|
||||
}
|
||||
now := time.Now().Unix()
|
||||
//48小时内终止弹劾
|
||||
//终止弹劾
|
||||
if now-sociaty.AccuseTime < int64(ggd.GuildImpeachmentCountDown*3600) {
|
||||
update := map[string]interface{}{
|
||||
"accuseTime": 0,
|
||||
@ -653,7 +653,7 @@ func (this *ModelSociaty) electNewMaster(srcMasterId string, sociaty *pb.DBSocia
|
||||
}
|
||||
|
||||
if len(mIds) > 0 {
|
||||
return elect(aIds)
|
||||
return elect(mIds)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -1,8 +1,10 @@
|
||||
package worldtask
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -16,8 +18,23 @@ type configureComp struct {
|
||||
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
err = this.MCompConfigure.Init(service, module, comp, options)
|
||||
err = this.LoadMultiConfigure(map[string]interface{}{
|
||||
// gameGrowreward: cfg.NewGameGrowReward,
|
||||
// gameGrowTask: cfg.NewGameGrowTask,
|
||||
gameWorldTask: cfg.NewGameWorldTask,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func (this *configureComp) getWorldtaskCfg() (data *cfg.GameWorldTask, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
)
|
||||
if v, err = this.GetConfigure(gameWorldTask); err != nil {
|
||||
return
|
||||
} else {
|
||||
if data, ok = v.(*cfg.GameWorldTask); !ok {
|
||||
err = fmt.Errorf("%T is *cfg.GameWorldTask", v)
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ import (
|
||||
"go_dreamfactory/modules/troll"
|
||||
"go_dreamfactory/modules/user"
|
||||
"go_dreamfactory/modules/viking"
|
||||
"go_dreamfactory/modules/worldtask"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/services"
|
||||
"go_dreamfactory/sys/db"
|
||||
@ -101,6 +102,7 @@ func main() {
|
||||
pay.NewModule(),
|
||||
//privilege.NewModule(),
|
||||
growtask.NewModule(),
|
||||
worldtask.NewModule(),
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user