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