移除废除的特权

This commit is contained in:
meixiongfeng 2023-03-06 16:41:10 +08:00
parent 91fd8382f7
commit 83a5083a93
4 changed files with 18 additions and 20 deletions

View File

@ -721,16 +721,16 @@ const (
)
const (
PrivilegeType1 = iota + 1 //每日获得
PrivilegeType2 //金币商店每日免费刷新次数
PrivilegeType3 //维京远征每日可购买挑战次数
PrivilegeType4 //狩猎每日可购买挑战次数
PrivilegeType5 //竞技场每日可购买挑战次数
PrivilegeType6 //梦境每日可购买挑战次数
PrivilegeType7 //巨怪商队背包容量
PrivilegeType8 //美食馆每日最大制作时间
PrivilegeType9 //武馆每日最大练功时间
PrivilegeType10 //铁匠铺每日最大锻造时间
PrivilegeType1 = iota + 1 //每日获得
PrivilegeType2 //金币商店每日免费刷新次数
PrivilegeType3 //维京远征每日可购买挑战次数
PrivilegeType4 //狩猎每日可购买挑战次数
PrivilegeType5 //竞技场每日可购买挑战次数
PrivilegeType6 //梦境每日可购买挑战次数
PrivilegeType7 //巨怪商队背包容量
PrivilegeType8 //美食馆每日最大制作时间
PrivilegeType9 //武馆每日最大练功时间
)
const (
MainStarType1 = 1 //成功通关

View File

@ -67,7 +67,7 @@ type (
//清理玩家英雄数据
CleanData(uid string)
// 获取指定星级等级的英雄
GetSpecifiedHero(session IUserSession, heroConfId string, star, lv, amount int32) (code pb.ErrorCode)
GetSpecifiedHero(session IUserSession, heroConfId string, star, lv int32) (code pb.ErrorCode)
// 英雄加经验
AddHeroExp(session IUserSession, heroObjID string, exp int32) (curAddExp int32, code pb.ErrorCode)
// 英雄练功

View File

@ -204,8 +204,8 @@ func (this *Hero) CleanData(uid string) {
}
// 创建一些特殊的英雄
func (this *Hero) GetSpecifiedHero(session comm.IUserSession, heroConfId string, star, lv, amount int32) (code pb.ErrorCode) {
if session.GetUserId() == "" || heroConfId == "" || star == 0 || lv == 0 || amount == 0 {
func (this *Hero) GetSpecifiedHero(session comm.IUserSession, heroConfId string, star, lv int32) (code pb.ErrorCode) {
if session.GetUserId() == "" || heroConfId == "" || star == 0 || lv == 0 {
return pb.ErrorCode_ReqParameterError
}
// 等级校验
@ -235,11 +235,11 @@ func (this *Hero) GetSpecifiedHero(session comm.IUserSession, heroConfId string,
}
hero.Lv = lv
hero.Star = star
hero.SameCount = amount
hero.SameCount = 1
_heroMap := map[string]interface{}{
"lv": hero.Lv,
"star": hero.Star,
"sameCount": amount,
"sameCount": 1,
}
// 保存数据
err = this.modelHero.ChangeList(session.GetUserId(), hero.Id, _heroMap)

View File

@ -20,9 +20,8 @@ func (this *apiComp) CreateOrderCheck(session comm.IUserSession, req *pb.SmithyC
func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.SmithyCreateOrderReq) (code pb.ErrorCode, data proto.Message) {
var (
res []*cfg.Gameatn
costTime int32
privilegeAddItme int32 // 特权额外增加的时间
res []*cfg.Gameatn
costTime int32
)
code = this.CreateOrderCheck(session, req)
@ -83,8 +82,7 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.SmithyCreate
return
}
_smithy.OrderCostTime += costTime
privilegeAddItme = this.module.ModulePrivilege.GetCountByPrivilegeId(session.GetUserId(), comm.PrivilegeType10)
if cfgCom.SmithyMaxtime+privilegeAddItme < _smithy.OrderCostTime { // 大于总时长是不允许的
if cfgCom.SmithyMaxtime < _smithy.OrderCostTime { // 大于总时长是不允许的
code = pb.ErrorCode_GourmetMoreOrderTime
return
}