Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
a6dae420ef
@ -476,7 +476,8 @@ func (this *Equipment) GetForgeEquip(session comm.IUserSession, suiteId int32, p
|
||||
for _, v := range configures {
|
||||
if v.Pos == pos && v.InitLv == lv {
|
||||
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
|
||||
}
|
||||
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()))
|
||||
index := r.Perm(len(lvs))[0]
|
||||
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
|
||||
}
|
||||
this.Errorf("err%v", err)
|
||||
|
@ -20,25 +20,28 @@ func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (errda
|
||||
return
|
||||
}
|
||||
for _, rid := range req.Rids {
|
||||
// reddot[v] = false
|
||||
_rid := comm.ReddotType(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) {
|
||||
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
|
||||
}
|
||||
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) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
case comm.Reddot10103:
|
||||
for k, v := range this.module.ModuleTask.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
case comm.Reddot17:
|
||||
for k, v := range this.module.horoscope.Reddot(session, _rid) {
|
||||
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) {
|
||||
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:
|
||||
for k, v := range this.module.gourmet.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
|
@ -19,29 +19,40 @@ func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq)
|
||||
if errdata = this.GetAllCheck(session, req); errdata != nil {
|
||||
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) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
//主线
|
||||
for k, v := range this.module.mline.Reddot(session, comm.Reddot11100) {
|
||||
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) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
for k, v := range this.module.horoscope.Reddot(session, comm.Reddot17) {
|
||||
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) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
for k, v := range this.module.gourmet.Reddot(session, comm.Reddot20, comm.Reddot21, comm.Reddot22) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
|
||||
for k, v := range this.module.sociaty.Reddot(session, comm.Reddot15102, comm.Reddot15201) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
|
@ -21,8 +21,8 @@ type Reddot struct {
|
||||
modules.ModuleBase
|
||||
service base.IRPCXService
|
||||
|
||||
pagoda comm.IPagoda
|
||||
// martialhall comm.IMartialhall
|
||||
smithy comm.ISmithy //铁匠铺
|
||||
pagoda comm.IPagoda
|
||||
horoscope comm.IHoroscope
|
||||
arena comm.IArena
|
||||
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) {
|
||||
err = this.ModuleBase.Start()
|
||||
var module core.IModule
|
||||
|
||||
if module, err = this.service.GetModule(comm.ModuleMline); err != nil {
|
||||
return
|
||||
}
|
||||
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 {
|
||||
return
|
||||
}
|
||||
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 {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user