This commit is contained in:
meixiongfeng 2023-06-14 16:30:03 +08:00
commit a6dae420ef
4 changed files with 40 additions and 26 deletions

View File

@ -476,7 +476,8 @@ func (this *Equipment) GetForgeEquip(session comm.IUserSession, suiteId int32, p
for _, v := range configures { for _, v := range configures {
if v.Pos == pos && v.InitLv == lv { if v.Pos == pos && v.InitLv == lv {
if eruip, err = this.modelEquipment.newEquipment(session.GetUserId(), v, dyweight, isepic); err == nil { if eruip, err = this.modelEquipment.newEquipment(session.GetUserId(), v, dyweight, isepic); err == nil {
this.equipmentsChangePush(session, []*pb.DB_Equipment{eruip}) errdata = this.AddEquipment(session, eruip)
// this.equipmentsChangePush(session, []*pb.DB_Equipment{eruip})
return return
} }
this.Errorf("err%v", err) this.Errorf("err%v", err)
@ -511,7 +512,8 @@ func (this *Equipment) GetForgeEquip(session comm.IUserSession, suiteId int32, p
r := rand.New(rand.NewSource(time.Now().Unix())) r := rand.New(rand.NewSource(time.Now().Unix()))
index := r.Perm(len(lvs))[0] index := r.Perm(len(lvs))[0]
if eruip, err = this.modelEquipment.newEquipment(session.GetUserId(), lvs[index], dyweight, isepic); err == nil { if eruip, err = this.modelEquipment.newEquipment(session.GetUserId(), lvs[index], dyweight, isepic); err == nil {
this.equipmentsChangePush(session, []*pb.DB_Equipment{eruip}) errdata = this.AddEquipment(session, eruip)
// this.equipmentsChangePush(session, []*pb.DB_Equipment{eruip})
return return
} }
this.Errorf("err%v", err) this.Errorf("err%v", err)

View File

@ -20,25 +20,28 @@ func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (errda
return return
} }
for _, rid := range req.Rids { for _, rid := range req.Rids {
// reddot[v] = false
_rid := comm.ReddotType(rid) _rid := comm.ReddotType(rid)
switch _rid { switch _rid {
case comm.Reddot10101: //任务
case comm.Reddot10101, comm.Reddot10102, comm.Reddot10103, comm.Reddot10201, comm.Reddot10301:
for k, v := range this.module.ModuleTask.Reddot(session, _rid) { for k, v := range this.module.ModuleTask.Reddot(session, _rid) {
reddot[int32(k)] = v reddot[int32(k)] = v
} }
case comm.Reddot10102: //主线
for k, v := range this.module.ModuleTask.Reddot(session, _rid) { case comm.Reddot11100:
for k, v := range this.module.mail.Reddot(session, _rid) {
reddot[int32(k)] = v reddot[int32(k)] = v
} }
case comm.Reddot15102: //铁匠铺
case comm.Reddot17102, comm.Reddot17106, comm.Reddot17107:
for k, v := range this.module.smithy.Reddot(session, _rid) {
reddot[int32(k)] = v
}
//工会
case comm.Reddot15102, comm.Reddot15201:
for k, v := range this.module.ModuleSociaty.Reddot(session, _rid) { for k, v := range this.module.ModuleSociaty.Reddot(session, _rid) {
reddot[int32(k)] = v reddot[int32(k)] = v
} }
case comm.Reddot10103:
for k, v := range this.module.ModuleTask.Reddot(session, _rid) {
reddot[int32(k)] = v
}
case comm.Reddot17: case comm.Reddot17:
for k, v := range this.module.horoscope.Reddot(session, _rid) { for k, v := range this.module.horoscope.Reddot(session, _rid) {
reddot[int32(k)] = v reddot[int32(k)] = v
@ -47,10 +50,6 @@ func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (errda
for k, v := range this.module.arena.Reddot(session, _rid) { for k, v := range this.module.arena.Reddot(session, _rid) {
reddot[int32(k)] = v reddot[int32(k)] = v
} }
// case comm.Reddot23, comm.Reddot24, comm.Reddot25:
// for k, v := range this.module.martialhall.Reddot(session, _rid) {
// reddot[int32(k)] = v
// }
case comm.Reddot20, comm.Reddot21, comm.Reddot22: case comm.Reddot20, comm.Reddot21, comm.Reddot22:
for k, v := range this.module.gourmet.Reddot(session, _rid) { for k, v := range this.module.gourmet.Reddot(session, _rid) {
reddot[int32(k)] = v reddot[int32(k)] = v

View File

@ -19,29 +19,40 @@ func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq)
if errdata = this.GetAllCheck(session, req); errdata != nil { if errdata = this.GetAllCheck(session, req); errdata != nil {
return return
} }
for k, v := range this.module.ModuleTask.Reddot(session, comm.Reddot10101, comm.Reddot10102, comm.Reddot10103, comm.Reddot10201, //任务系统
for k, v := range this.module.ModuleTask.Reddot(session,
comm.Reddot10101,
comm.Reddot10102,
comm.Reddot10103,
comm.Reddot10201,
comm.Reddot10301) { comm.Reddot10301) {
reddot[int32(k)] = v reddot[int32(k)] = v
} }
//主线
for k, v := range this.module.mline.Reddot(session, comm.Reddot11100) { for k, v := range this.module.mline.Reddot(session, comm.Reddot11100) {
reddot[int32(k)] = v reddot[int32(k)] = v
} }
//铁匠铺
for k, v := range this.module.smithy.Reddot(session,
comm.Reddot17102,
comm.Reddot17106,
comm.Reddot17107,
) {
reddot[int32(k)] = v
}
for k, v := range this.module.pagoda.Reddot(session, comm.Reddot6) { for k, v := range this.module.pagoda.Reddot(session, comm.Reddot6) {
reddot[int32(k)] = v reddot[int32(k)] = v
} }
for k, v := range this.module.horoscope.Reddot(session, comm.Reddot17) { for k, v := range this.module.horoscope.Reddot(session, comm.Reddot17) {
reddot[int32(k)] = v reddot[int32(k)] = v
} }
// for k, v := range this.module.martialhall.Reddot(session, comm.Reddot23, comm.Reddot24, comm.Reddot25) {
// reddot[int32(k)] = v
// }
for k, v := range this.module.arena.Reddot(session, comm.Reddot19) { for k, v := range this.module.arena.Reddot(session, comm.Reddot19) {
reddot[int32(k)] = v reddot[int32(k)] = v
} }
for k, v := range this.module.gourmet.Reddot(session, comm.Reddot20, comm.Reddot21, comm.Reddot22) { for k, v := range this.module.gourmet.Reddot(session, comm.Reddot20, comm.Reddot21, comm.Reddot22) {
reddot[int32(k)] = v reddot[int32(k)] = v
} }
for k, v := range this.module.sociaty.Reddot(session, comm.Reddot15102, comm.Reddot15201) { for k, v := range this.module.sociaty.Reddot(session, comm.Reddot15102, comm.Reddot15201) {
reddot[int32(k)] = v reddot[int32(k)] = v
} }

View File

@ -21,8 +21,8 @@ type Reddot struct {
modules.ModuleBase modules.ModuleBase
service base.IRPCXService service base.IRPCXService
smithy comm.ISmithy //铁匠铺
pagoda comm.IPagoda pagoda comm.IPagoda
// martialhall comm.IMartialhall
horoscope comm.IHoroscope horoscope comm.IHoroscope
arena comm.IArena arena comm.IArena
gourmet comm.IGourmet gourmet comm.IGourmet
@ -48,18 +48,20 @@ func (this *Reddot) Init(service core.IService, module core.IModule, options cor
func (this *Reddot) Start() (err error) { func (this *Reddot) Start() (err error) {
err = this.ModuleBase.Start() err = this.ModuleBase.Start()
var module core.IModule var module core.IModule
if module, err = this.service.GetModule(comm.ModuleMline); err != nil { if module, err = this.service.GetModule(comm.ModuleMline); err != nil {
return return
} }
this.mline = module.(comm.IMline) this.mline = module.(comm.IMline)
if module, err = this.service.GetModule(comm.ModuleSmithy); err != nil {
return
}
this.smithy = module.(comm.ISmithy)
if module, err = this.service.GetModule(comm.ModulePagoda); err != nil { if module, err = this.service.GetModule(comm.ModulePagoda); err != nil {
return return
} }
this.pagoda = module.(comm.IPagoda) this.pagoda = module.(comm.IPagoda)
// if module, err = this.service.GetModule(comm.ModuleMartialhall); err != nil {
// return
// }
// this.martialhall = module.(comm.IMartialhall)
if module, err = this.service.GetModule(comm.ModuleHoroscope); err != nil { if module, err = this.service.GetModule(comm.ModuleHoroscope); err != nil {
return return
} }