上传铁匠铺专用接口
This commit is contained in:
parent
7e4dd0575d
commit
e7712e6e88
@ -151,6 +151,8 @@ type (
|
||||
RecycleEquipments(session IUserSession, equs []string, discount int32) (code pb.ErrorCode, atno []*pb.UserAtno)
|
||||
//获得可操作用户装备列表
|
||||
GetActionableEquipments(uid string) (code pb.ErrorCode, eruips []*pb.DB_Equipment)
|
||||
//获取可用套装 (铁匠铺使用)
|
||||
GetActionableSuit(uid string) (code pb.ErrorCode, Suit []int32)
|
||||
}
|
||||
IMainline interface {
|
||||
ModifyMainlineDataByNanduID(uid string, nandu, id int32) (code pb.ErrorCode)
|
||||
|
@ -300,6 +300,30 @@ func (this *Equipment) GetActionableEquipments(uid string) (code pb.ErrorCode, e
|
||||
return
|
||||
}
|
||||
|
||||
//获取可用套装 (铁匠铺使用)
|
||||
func (this *Equipment) GetActionableSuit(uid string) (code pb.ErrorCode, Suit []int32) {
|
||||
var (
|
||||
err error
|
||||
equipments []*pb.DB_Equipment
|
||||
suit map[int32]struct{}
|
||||
)
|
||||
suit = make(map[int32]struct{})
|
||||
if equipments, err = this.modelEquipment.QueryUserEquipments(uid); err != nil {
|
||||
return
|
||||
}
|
||||
for _, v := range equipments {
|
||||
if v.HeroId == "" && !v.Islock {
|
||||
if conf, err := this.configure.GetEquipmentConfigureById(v.CId); err == nil {
|
||||
suit[conf.Suittype] = struct{}{}
|
||||
}
|
||||
}
|
||||
}
|
||||
for i, _ := range suit {
|
||||
Suit = append(Suit, i)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//Evens--------------------------------------------------------------------------------------------------------------------------------
|
||||
//推送道具变化消息
|
||||
func (this *Equipment) equipmentsChangePush(session comm.IUserSession, items []*pb.DB_Equipment) (err error) {
|
||||
|
Loading…
Reference in New Issue
Block a user