Compare commits

...

4 Commits

3 changed files with 45 additions and 1 deletions

View File

@ -58,7 +58,12 @@ func (this *apiComp) Sell(session comm.IUserSession, req *pb.SmithySellReq) (err
rsp := &pb.SmithySellResp{
CustomerId: req.CustomerId,
EquipIds: req.EquipIds,
Customers: cus.Customers,
}
if cus != nil {
rsp.Customers = cus.Customers
} else {
rsp.Customers = []*pb.CustomerInfo{}
}
session.SendMsg(string(this.module.GetType()), "sell", rsp)

View File

@ -14,6 +14,7 @@ const (
gameSociatyActivity = "game_guildactivity.json"
gameRdtaskCondi = "game_rdtaskcondi.json"
gameSociatyBossTask = "game_guildbosstask.json"
gameburiedCond = "game_buriedcondi.json"
)
type configureComp struct {
@ -29,6 +30,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
gameSociatyActivity: cfg.NewGameGuildActivity,
gameRdtaskCondi: cfg.NewGameRdtaskCondi,
gameSociatyBossTask: cfg.NewGameGuildBossTask,
gameburiedCond: cfg.NewGameBuriedCondi,
})
return
}
@ -148,3 +150,19 @@ func (this *configureComp) getBossTaskList() []*cfg.GameGuildBossTaskData {
return data.GetDataList()
}
}
func (this *configureComp) getBuriedCondCfg() (data *cfg.GameBuriedCondi, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(gameburiedCond); err != nil {
return
} else {
if data, ok = v.(*cfg.GameBuriedCondi); !ok {
err = fmt.Errorf("%T is *cfg.GameWorldAll", v)
return
}
}
return
}

View File

@ -88,11 +88,32 @@ func (this *Sociaty) Start() (err error) {
return err
}
if err = this.checkSociatyConf(); err != nil {
return err
}
this.Debug("check guild conf completed")
// 初始化公会BOSS赛季开始时间
this.modelSociatyBoss.initSports()
return
}
var errs []string
func (this *Sociaty) checkSociatyConf() (err error) {
buriedCondConf, err := this.configure.getBuriedCondCfg()
if err != nil {
return err
}
for _, data := range this.sociatyTaskConf.GetDataList() {
if _, ok := buriedCondConf.GetDataMap()[data.TypeId]; !ok {
errs = append(errs, fmt.Sprintf("condId:%v 可能无效,检查guild_task表字段type_id值是否存在于buried_condi", data.TypeId))
}
}
return
}
// 会长弹劾处理
// Deprecated
func (this *Sociaty) ProcessAccuse(uid, sociatyId string) {