deprecated method

This commit is contained in:
zhaocy 2022-07-11 18:55:44 +08:00
parent ca1bece4fa
commit a564f3dcf5
2 changed files with 0 additions and 36 deletions

View File

@ -35,8 +35,6 @@ type (
IHero interface { IHero interface {
//查询用户卡片数量 //查询用户卡片数量
QueryHeroAmount(uId string, heroCfgId int32) (amount uint32) QueryHeroAmount(uId string, heroCfgId int32) (amount uint32)
//消耗卡片
ConsumeCard(uId string, heroCfgId int32, count int32) (code pb.ErrorCode)
//创建新英雄 //创建新英雄
CreateHero(uid string, heroCfgId ...int32) error CreateHero(uid string, heroCfgId ...int32) error

View File

@ -43,40 +43,6 @@ func (this *Hero) CreateHero(uid string, heroCfgId ...int32) error {
return this.modelHero.createMultiHero(uid, heroCfgId...) return this.modelHero.createMultiHero(uid, heroCfgId...)
} }
//消耗英雄卡
// func (this *Hero) ConsumeCard(uId string, heroCfgId int32, count int32) (code pb.ErrorCode) {
// if count <= 0 {
// log.Errorf("attr no changed,uid: %s heroCfgId: %s count: %d", uId, heroCfgId, count)
// code = pb.ErrorCode_ReqParameterError
// return
// }
// heroCfg := this.configure.GetHero(heroCfgId)
// if heroCfg != nil {
// }
// heroes := this.GetHeroList(uId)
// var curList []*pb.DBHero
// for _, v := range heroes {
// if heroCfgId == v.HeroID {
// curList = append(curList, v)
// }
// }
// if int32(len(curList)) < count {
// return pb.ErrorCode_HeroNoEnough
// }
// for _, v := range curList {
// err := this.modelHero.consumeOneHeroCard(v.Uid, v.Id, count)
// if err != nil {
// return pb.ErrorCode_DBError
// }
// }
// return pb.ErrorCode_Success
// }
//获取英雄 //获取英雄
func (this *Hero) GetHero(uid, heroId string) (*pb.DBHero, pb.ErrorCode) { func (this *Hero) GetHero(uid, heroId string) (*pb.DBHero, pb.ErrorCode) {
hero := this.modelHero.getOneHero(uid, heroId) hero := this.modelHero.getOneHero(uid, heroId)