上传代码
This commit is contained in:
parent
042e7856ff
commit
22f19839b6
@ -216,12 +216,14 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
|
||||
if conf.Pos < 4 && hero.SuiteId != 0 {
|
||||
hero.Suite1Lv = suite1Lv
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype49, 1, hero.Suite1Star, hero.Suite1Lv))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype93, 1, hero.SuiteId, suite1Lv))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype43, equipment.Id, equipment.Lv))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype45, equipment.Id, conf.Star, hero.SuiteExtId, hero.Suite2Lv))
|
||||
}
|
||||
if conf.Pos >= 4 && conf.Pos < 6 && hero.SuiteExtId != 0 {
|
||||
hero.Suite2Lv = suite2Lv
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype48, 1, hero.Suite2Star, hero.Suite2Lv))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype93, 1, hero.SuiteExtId, suite2Lv))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype45, equipment.Id, conf.Star, hero.SuiteExtId, hero.Suite2Lv))
|
||||
}
|
||||
code = this.module.ModuleHero.UpdateEquipment(session, hero, equipments)
|
||||
|
@ -188,11 +188,34 @@ func (this *Equipment) NewEquipment(uid, cid string) (code pb.ErrorCode, equip *
|
||||
func (this *Equipment) AddEquipment(session comm.IUserSession, equip *pb.DB_Equipment) (code pb.ErrorCode) {
|
||||
var (
|
||||
err error
|
||||
configure *cfg.GameEquipData
|
||||
)
|
||||
if err = this.modelEquipment.addEquipment(equip); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
if configure, err = this.configure.GetEquipmentConfigureById(equip.CId); err != nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
return
|
||||
}
|
||||
tasks := make([]*pb.BuriedParam, 0)
|
||||
//随机任务
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype50, 1, configure.Star))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype97, 1, configure.Suittype, configure.Star))
|
||||
unm := int32(1)
|
||||
if equip.AdverbEntry != nil {
|
||||
unm += int32(len(equip.AdverbEntry))
|
||||
}
|
||||
if equip.Adverbskill != nil {
|
||||
unm += int32(len(equip.Adverbskill))
|
||||
}
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype99, 1, unm, configure.Star))
|
||||
if configure.Pos == 7 {
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype103, 1, configure.Star))
|
||||
} else if configure.Pos == 6 {
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype101, 1, configure.Star))
|
||||
}
|
||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), tasks...)
|
||||
this.equipmentsChangePush(session, []*pb.DB_Equipment{equip})
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user