修复英雄招募秀代码
This commit is contained in:
parent
d3522c6867
commit
3d87c00b77
@ -130,6 +130,8 @@ type (
|
||||
QueryEquipmentAmount(uid string, equipmentId string) (amount uint32)
|
||||
//添加新武器
|
||||
AddNewEquipments(session IUserSession, cIds map[string]uint32, bPush bool) (change []*pb.DB_Equipment, code pb.ErrorCode)
|
||||
//添加所有装备
|
||||
AddAllEquipments(session IUserSession) (code pb.ErrorCode)
|
||||
//创建装备
|
||||
NewEquipment(uid, cid string) (code pb.ErrorCode, equip *pb.DB_Equipment)
|
||||
//添加装备
|
||||
|
@ -110,6 +110,24 @@ func (this *Equipment) AddNewEquipments(session comm.IUserSession, cIds map[stri
|
||||
return
|
||||
}
|
||||
|
||||
func (this *Equipment) AddAllEquipments(session comm.IUserSession) (code pb.ErrorCode) {
|
||||
var (
|
||||
configure *cfg.GameEquip
|
||||
cIds map[string]uint32
|
||||
err error
|
||||
)
|
||||
if configure, err = this.configure.GetEquipmentConfigure(); err != nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
return
|
||||
}
|
||||
cIds = make(map[string]uint32)
|
||||
for _, v := range configure.GetDataList() {
|
||||
cIds[v.Id] = 1
|
||||
}
|
||||
_, code = this.AddNewEquipments(session, cIds, true)
|
||||
return
|
||||
}
|
||||
|
||||
//删除武器
|
||||
func (this *Equipment) DelEquipments(session comm.IUserSession, equipIds []string, bPush bool) (code pb.ErrorCode) {
|
||||
var (
|
||||
|
@ -75,7 +75,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh
|
||||
if len(hero) > 0 {
|
||||
ishave := this.module.ModuleUser.CheckTujianHero(session, hero)
|
||||
for i, v := range ishave {
|
||||
if v {
|
||||
if !v {
|
||||
newhero = append(newhero, hero[i])
|
||||
}
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
||||
if len(hero) > 0 {
|
||||
ishave := this.module.ModuleUser.CheckTujianHero(session, hero)
|
||||
for i, v := range ishave {
|
||||
if v {
|
||||
if !v {
|
||||
newhero = append(newhero, hero[i])
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user