红点需求
This commit is contained in:
parent
fed0de37af
commit
5c299aced4
@ -47,6 +47,16 @@ 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.Reddot21101:
|
||||
for k, v := range this.module.friend.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
//羁绊
|
||||
case comm.Reddot19103, comm.Reddot19105, comm.Reddot19109, comm.Reddot19110:
|
||||
for k, v := range this.module.library.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
case comm.Reddot17:
|
||||
for k, v := range this.module.horoscope.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
@ -68,10 +78,7 @@ func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (errda
|
||||
for k, v := range this.module.hunting.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
case comm.Reddot19103, comm.Reddot19105, comm.Reddot19109, comm.Reddot19110:
|
||||
for k, v := range this.module.library.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "get", &pb.ReddotGetAllResp{Reddot: reddot})
|
||||
|
@ -44,6 +44,10 @@ func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq)
|
||||
for k, v := range this.module.arena.Reddot(session, comm.Reddot22102) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
for k, v := range this.module.friend.Reddot(session, comm.Reddot21101) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
|
||||
for k, v := range this.module.pagoda.Reddot(session, comm.Reddot6) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
|
@ -22,18 +22,20 @@ type Reddot struct {
|
||||
modules.ModuleBase
|
||||
service base.IRPCXService
|
||||
|
||||
smithy comm.ISmithy //铁匠铺
|
||||
smithy comm.ISmithy //铁匠铺
|
||||
library comm.ILibrary //羁绊
|
||||
mail comm.Imail //邮件
|
||||
sociaty comm.ISociaty //工会
|
||||
pagoda comm.IPagoda
|
||||
horoscope comm.IHoroscope
|
||||
arena comm.IArena
|
||||
arena comm.IArena //竞技场
|
||||
friend comm.IFriend
|
||||
gourmet comm.IGourmet
|
||||
sociaty comm.ISociaty
|
||||
mail comm.Imail
|
||||
viking comm.IViking
|
||||
hunting comm.IHunting
|
||||
library comm.ILibrary
|
||||
api_comp *apiComp
|
||||
mline comm.IMline
|
||||
|
||||
api_comp *apiComp
|
||||
mline comm.IMline
|
||||
}
|
||||
|
||||
//模块名
|
||||
@ -59,7 +61,10 @@ func (this *Reddot) Start() (err error) {
|
||||
return
|
||||
}
|
||||
this.smithy = module.(comm.ISmithy)
|
||||
|
||||
if module, err = this.service.GetModule(comm.ModuleFriend); err != nil {
|
||||
return
|
||||
}
|
||||
this.friend = module.(comm.IFriend)
|
||||
if module, err = this.service.GetModule(comm.ModulePagoda); err != nil {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user