From a564f3dcf5300a6af31d6e72070729a5e426a913 Mon Sep 17 00:00:00 2001 From: zhaocy Date: Mon, 11 Jul 2022 18:55:44 +0800 Subject: [PATCH] deprecated method --- comm/imodule.go | 2 -- modules/hero/module.go | 34 ---------------------------------- 2 files changed, 36 deletions(-) diff --git a/comm/imodule.go b/comm/imodule.go index 723d9ad94..95b25e01f 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -35,8 +35,6 @@ type ( IHero interface { //查询用户卡片数量 QueryHeroAmount(uId string, heroCfgId int32) (amount uint32) - //消耗卡片 - ConsumeCard(uId string, heroCfgId int32, count int32) (code pb.ErrorCode) //创建新英雄 CreateHero(uid string, heroCfgId ...int32) error diff --git a/modules/hero/module.go b/modules/hero/module.go index 98029e9dd..ae4725445 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -43,40 +43,6 @@ func (this *Hero) CreateHero(uid string, heroCfgId ...int32) error { 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) { hero := this.modelHero.getOneHero(uid, heroId)