diff --git a/comm/imodule.go b/comm/imodule.go index 3987a7918..7661a319c 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -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 传空 diff --git a/modules/caravan/api_buyorsell.go b/modules/caravan/api_buyorsell.go index 66817b811..cac80c710 100644 --- a/modules/caravan/api_buyorsell.go +++ b/modules/caravan/api_buyorsell.go @@ -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 { diff --git a/modules/caravan/module.go b/modules/caravan/module.go index 3bd6282da..e32b9507a 100644 --- a/modules/caravan/module.go +++ b/modules/caravan/module.go @@ -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++