上传脱专武时英雄数据推送
This commit is contained in:
parent
c31dcd3a23
commit
d84f7de6db
@ -54,6 +54,10 @@ func (this *apiComp) Wear(session comm.IUserSession, req *pb.ExclusiveWearReq) (
|
||||
if errdata = this.module.ModuleHero.UpdateExclusive(session, hero, info); errdata != nil {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if errdata = this.module.ModuleHero.UpdateExclusive(session, hero, nil); errdata != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
this.module.equipmentsChangePush(session, change)
|
||||
session.SendMsg(string(this.module.GetType()), "wear", &pb.ExclusiveWearResp{Exclusives: info})
|
||||
|
@ -471,25 +471,31 @@ func (this *ModelHero) setExclusiveProperty(hero *pb.DBHero, exw *pb.DB_Exclusiv
|
||||
|
||||
addProperty := make(map[int32]int32) //副属性
|
||||
equipSkill := make([]*pb.SkillData, 0)
|
||||
hero.Exclusiveid = exw.Id
|
||||
if exw != nil {
|
||||
hero.Exclusiveid = exw.Id
|
||||
for k, v := range exw.Property {
|
||||
addProperty[k] = v //附加属性
|
||||
}
|
||||
hero.ExclusiveProperty = addProperty
|
||||
if exw.Commonskill != 0 {
|
||||
equipSkill = append(equipSkill, &pb.SkillData{
|
||||
SkillID: exw.Commonskill,
|
||||
SkillLv: 1,
|
||||
})
|
||||
}
|
||||
if exw.Exclusiveskill != 0 {
|
||||
equipSkill = append(equipSkill, &pb.SkillData{
|
||||
SkillID: exw.Exclusiveskill,
|
||||
SkillLv: 1,
|
||||
})
|
||||
}
|
||||
hero.ExclusiveSkill = equipSkill
|
||||
} else {
|
||||
hero.Exclusiveid = ""
|
||||
hero.ExclusiveProperty = addProperty
|
||||
hero.ExclusiveSkill = equipSkill
|
||||
}
|
||||
|
||||
for k, v := range exw.Property {
|
||||
addProperty[k] = v //附加属性
|
||||
}
|
||||
hero.ExclusiveProperty = addProperty
|
||||
if exw.Commonskill != 0 {
|
||||
equipSkill = append(equipSkill, &pb.SkillData{
|
||||
SkillID: exw.Commonskill,
|
||||
SkillLv: 1,
|
||||
})
|
||||
}
|
||||
if exw.Exclusiveskill != 0 {
|
||||
equipSkill = append(equipSkill, &pb.SkillData{
|
||||
SkillID: exw.Exclusiveskill,
|
||||
SkillLv: 1,
|
||||
})
|
||||
}
|
||||
hero.ExclusiveSkill = equipSkill
|
||||
this.calFigthValue(hero)
|
||||
if err := this.ChangeList(hero.Uid, hero.Id, map[string]interface{}{
|
||||
"exclusiveid": hero.Exclusiveid,
|
||||
|
Loading…
Reference in New Issue
Block a user