上传转呗强化扣款逻辑修复

This commit is contained in:
liwei1dao 2022-08-17 09:54:41 +08:00
parent ef4bbbdd03
commit ba0169ab47
4 changed files with 9 additions and 8 deletions

View File

@ -54,7 +54,9 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
code = pb.ErrorCode_EquipmentLvlimitReached
return
}
if code = this.module.ConsumeRes(session, intensify.Need, true); code != pb.ErrorCode_Success {
return
}
if equipment.KeepFailNum >= intensify.Num { //没有达到保底次数 根据概率随机成功失败
issucc = true
} else { //随机 千分比
@ -66,9 +68,6 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
}
}
if issucc {
if code = this.module.ConsumeRes(session, intensify.Need, true); code != pb.ErrorCode_Success {
return
}
modifyequipments = make([]*pb.DB_Equipment, 0)
//叠加装备 拆分处理
if equipment.IsInitialState && equipment.OverlayNum > 1 {

View File

@ -62,10 +62,10 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.MartialhallRecei
code = pb.ErrorCode_MartialhallInUse
return
}
//此处发放英雄经验增长
//...
//...
if code = this.module.ModuleHero.AddHeroExp(session, pillar.Hero, pillar.Reward); code != pb.ErrorCode_Success {
return
}
this.module.modelMartialhall.Change(session.GetUserId(), map[string]interface{}{
filed: pillar,

View File

@ -27,7 +27,7 @@ type Martialhall struct {
//模块名
func (this *Martialhall) GetType() core.M_Modules {
return comm.ModuleChat
return comm.ModuleMartialhall
}
//模块初始化接口 注册用户创建角色事件

View File

@ -13,6 +13,7 @@ import (
"go_dreamfactory/modules/items"
"go_dreamfactory/modules/mail"
"go_dreamfactory/modules/mainline"
"go_dreamfactory/modules/martialhall"
"go_dreamfactory/modules/notify"
"go_dreamfactory/modules/pagoda"
"go_dreamfactory/modules/shop"
@ -61,6 +62,7 @@ func main() {
forum.NewModule(),
pagoda.NewModule(),
gourmet.NewModule(),
martialhall.NewModule(),
)
}