上传转呗强化扣款逻辑修复
This commit is contained in:
parent
ef4bbbdd03
commit
ba0169ab47
@ -54,7 +54,9 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
|
|||||||
code = pb.ErrorCode_EquipmentLvlimitReached
|
code = pb.ErrorCode_EquipmentLvlimitReached
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if code = this.module.ConsumeRes(session, intensify.Need, true); code != pb.ErrorCode_Success {
|
||||||
|
return
|
||||||
|
}
|
||||||
if equipment.KeepFailNum >= intensify.Num { //没有达到保底次数 根据概率随机成功失败
|
if equipment.KeepFailNum >= intensify.Num { //没有达到保底次数 根据概率随机成功失败
|
||||||
issucc = true
|
issucc = true
|
||||||
} else { //随机 千分比
|
} else { //随机 千分比
|
||||||
@ -66,9 +68,6 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if issucc {
|
if issucc {
|
||||||
if code = this.module.ConsumeRes(session, intensify.Need, true); code != pb.ErrorCode_Success {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
modifyequipments = make([]*pb.DB_Equipment, 0)
|
modifyequipments = make([]*pb.DB_Equipment, 0)
|
||||||
//叠加装备 拆分处理
|
//叠加装备 拆分处理
|
||||||
if equipment.IsInitialState && equipment.OverlayNum > 1 {
|
if equipment.IsInitialState && equipment.OverlayNum > 1 {
|
||||||
|
@ -62,10 +62,10 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.MartialhallRecei
|
|||||||
code = pb.ErrorCode_MartialhallInUse
|
code = pb.ErrorCode_MartialhallInUse
|
||||||
return
|
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{}{
|
this.module.modelMartialhall.Change(session.GetUserId(), map[string]interface{}{
|
||||||
filed: pillar,
|
filed: pillar,
|
||||||
|
@ -27,7 +27,7 @@ type Martialhall struct {
|
|||||||
|
|
||||||
//模块名
|
//模块名
|
||||||
func (this *Martialhall) GetType() core.M_Modules {
|
func (this *Martialhall) GetType() core.M_Modules {
|
||||||
return comm.ModuleChat
|
return comm.ModuleMartialhall
|
||||||
}
|
}
|
||||||
|
|
||||||
//模块初始化接口 注册用户创建角色事件
|
//模块初始化接口 注册用户创建角色事件
|
||||||
|
@ -13,6 +13,7 @@ import (
|
|||||||
"go_dreamfactory/modules/items"
|
"go_dreamfactory/modules/items"
|
||||||
"go_dreamfactory/modules/mail"
|
"go_dreamfactory/modules/mail"
|
||||||
"go_dreamfactory/modules/mainline"
|
"go_dreamfactory/modules/mainline"
|
||||||
|
"go_dreamfactory/modules/martialhall"
|
||||||
"go_dreamfactory/modules/notify"
|
"go_dreamfactory/modules/notify"
|
||||||
"go_dreamfactory/modules/pagoda"
|
"go_dreamfactory/modules/pagoda"
|
||||||
"go_dreamfactory/modules/shop"
|
"go_dreamfactory/modules/shop"
|
||||||
@ -61,6 +62,7 @@ func main() {
|
|||||||
forum.NewModule(),
|
forum.NewModule(),
|
||||||
pagoda.NewModule(),
|
pagoda.NewModule(),
|
||||||
gourmet.NewModule(),
|
gourmet.NewModule(),
|
||||||
|
martialhall.NewModule(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user