Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
2e66805b3a
@ -43,11 +43,11 @@ func (this *Caravan) Init(service core.IService, module core.IModule, options co
|
|||||||
|
|
||||||
func (this *Caravan) Start() (err error) {
|
func (this *Caravan) Start() (err error) {
|
||||||
err = this.ModuleBase.Start()
|
err = this.ModuleBase.Start()
|
||||||
// var module core.IModule
|
var module core.IModule
|
||||||
// this.mail = module.(comm.Imail)
|
if module, err = this.service.GetModule(comm.ModuleMail); err != nil {
|
||||||
// if module, err = this.service.GetModule(comm.ModuleChat); err != nil {
|
return
|
||||||
// return
|
}
|
||||||
// }
|
this.mail = module.(comm.Imail)
|
||||||
this.service.RegisterFunctionName(string(comm.Rpc_ModuleCaravanSettlement), this.Rpc_ModuleCaravanSettlement)
|
this.service.RegisterFunctionName(string(comm.Rpc_ModuleCaravanSettlement), this.Rpc_ModuleCaravanSettlement)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -87,9 +87,6 @@ func (this *Caravan) InitCaravanCityData(uid string, data *pb.DBCaravan) {
|
|||||||
} else {
|
} else {
|
||||||
city.Special = append(city.Special, v.Special...)
|
city.Special = append(city.Special, v.Special...)
|
||||||
}
|
}
|
||||||
// for _, v := range city.Special {
|
|
||||||
// city.Count[v] = 40 // 配置暂无 后面走配置
|
|
||||||
// }
|
|
||||||
|
|
||||||
data.City[v.Id] = city
|
data.City[v.Id] = city
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,6 @@ func (this *Mail) CheckMaxMail(session comm.IUserSession) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *Mail) SendMailByUID(uid string, cid string, res []*cfg.Gameatn) bool {
|
func (this *Mail) SendMailByUID(uid string, cid string, res []*cfg.Gameatn) bool {
|
||||||
// 查看玩家在不在线
|
|
||||||
// 获取额外配置
|
// 获取额外配置
|
||||||
var reward []*pb.UserAssets
|
var reward []*pb.UserAssets
|
||||||
for _, v := range res {
|
for _, v := range res {
|
||||||
@ -272,8 +271,12 @@ func (this *Mail) SendMailByUID(uid string, cid string, res []*cfg.Gameatn) bool
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 通知玩家
|
|
||||||
//this.AddNewMailPush(session, mail)
|
|
||||||
|
|
||||||
|
if session, ok := this.GetUserSession(uid); ok { // 通知玩家
|
||||||
|
session.SendMsg(string(this.GetType()), "getnewmail", &pb.MailGetNewMailPush{Mail: mail})
|
||||||
|
if err := session.Push(); err != nil {
|
||||||
|
this.Errorf("err:%v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user