diff --git a/comm/const.go b/comm/const.go index 5ba8099de..104c67bd6 100644 --- a/comm/const.go +++ b/comm/const.go @@ -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 //成功通关 diff --git a/comm/imodule.go b/comm/imodule.go index 75d4eaf49..7216de839 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -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) // 英雄练功 diff --git a/modules/hero/module.go b/modules/hero/module.go index 315e94f67..e1ee8d508 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -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) diff --git a/modules/smithy/api_createorder.go b/modules/smithy/api_createorder.go index c315ba6b8..a4d9ae5f9 100644 --- a/modules/smithy/api_createorder.go +++ b/modules/smithy/api_createorder.go @@ -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 }