商队等级奖励修复
This commit is contained in:
parent
4c11d7540d
commit
bc6284afc2
@ -51,11 +51,11 @@ type (
|
||||
|
||||
//邮件业务模块对外接口定义 提供给其他模块使用的
|
||||
Imail interface {
|
||||
IGetReddot
|
||||
// 注意 此接口逐步废弃
|
||||
SendMailByCid(session IUserSession, cid string, res []*pb.UserAssets) bool
|
||||
SendNewMail(mail *pb.DBMailData, uid ...string) bool // 批量发送邮件 支持跨服
|
||||
SendMailByUID(uid string, cid string, res []*cfg.Gameatn, Param []string) bool
|
||||
IGetReddot
|
||||
// 所有邮件奖励统一调这个接口
|
||||
SendRewardMailByCid(session IUserSession, cid string, res []*cfg.Gameatn) bool
|
||||
// 批量发邮件结果: cid 邮件表ID, 没有附件 res 传空
|
||||
|
@ -92,6 +92,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
||||
|
||||
sellValue += price * v
|
||||
}
|
||||
|
||||
addScore = sellValue
|
||||
if errdata = this.module.DispenseRes(session, []*cfg.Gameatn{{
|
||||
A: "attr",
|
||||
@ -138,7 +139,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
||||
if len(lvReward) > 0 { // 商队等级奖励 改发邮件
|
||||
this.module.mail.SendRewardMailByCid(session, comm.CaravanLvReward, lvReward)
|
||||
}
|
||||
caravan.Profit = 0
|
||||
|
||||
// 商队盈利收益奖励
|
||||
reward := this.configure.GetCaravanReward()
|
||||
for _, v := range reward {
|
||||
|
@ -449,7 +449,7 @@ func (this *Caravan) CheckOverweight(data *pb.DBCaravan) (b bool) {
|
||||
func (this *Caravan) CheckCaravavLvUp(data *pb.DBCaravan) (curLv int32) {
|
||||
curLv = data.Lv
|
||||
for {
|
||||
if conf, err := this.configure.GetCaravanLv(curLv + 1); err == nil {
|
||||
if conf, err := this.configure.GetCaravanLv(curLv); err == nil {
|
||||
if conf.Newmoneyexp <= int32(data.Profit) {
|
||||
//data.Profit -= int64(conf.Newmoneyexp)
|
||||
curLv++
|
||||
|
Loading…
Reference in New Issue
Block a user