天赋压测
This commit is contained in:
parent
776dfc2811
commit
a7a8517f4d
61
busi/hero.go
61
busi/hero.go
@ -1,6 +1,7 @@
|
|||||||
package busi
|
package busi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"legu.airobot/lib"
|
"legu.airobot/lib"
|
||||||
@ -58,6 +59,11 @@ func (f *HeroScene) Run(robot lib.IRobot) error {
|
|||||||
f.AddHero(robot, "25004") // 加英雄
|
f.AddHero(robot, "25004") // 加英雄
|
||||||
f.AddHero(robot, "25004") // 加英雄
|
f.AddHero(robot, "25004") // 加英雄
|
||||||
f.AddHero(robot, "25004") // 加英雄
|
f.AddHero(robot, "25004") // 加英雄
|
||||||
|
f.HeroFusion(robot)
|
||||||
|
|
||||||
|
f.AddItem(robot, "525001")
|
||||||
|
f.HeroTalent(robot)
|
||||||
|
f.HeroTalentV2(robot) // 学习其他天赋
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,6 +251,9 @@ func (f *HeroScene) HeroStarUp(robot lib.IRobot) error {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if lvcard == nil {
|
||||||
|
return errors.New("data")
|
||||||
|
}
|
||||||
// 升星
|
// 升星
|
||||||
starReq := &pb.HeroStrengthenUpStarReq{
|
starReq := &pb.HeroStrengthenUpStarReq{
|
||||||
HeroObjID: lvcard.Id,
|
HeroObjID: lvcard.Id,
|
||||||
@ -440,3 +449,55 @@ func (f *HeroScene) HerouseEnegry(robot lib.IRobot) error {
|
|||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 天赋压测
|
||||||
|
func (f *HeroScene) HeroTalent(robot lib.IRobot) error {
|
||||||
|
var (
|
||||||
|
code pb.ErrorCode
|
||||||
|
)
|
||||||
|
talentReq := &pb.HeroTalentLearnReq{
|
||||||
|
TalentID: 1,
|
||||||
|
ObjId: "",
|
||||||
|
Heroid: "25001",
|
||||||
|
}
|
||||||
|
|
||||||
|
talentResp := &pb.HeroTalentLearnResp{}
|
||||||
|
code = robot.SendMsg("hero", "talentlearn", talentReq, talentResp)
|
||||||
|
if code != pb.ErrorCode_Success {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 学习其他天赋
|
||||||
|
func (f *HeroScene) HeroTalentV2(robot lib.IRobot) error {
|
||||||
|
var (
|
||||||
|
code pb.ErrorCode
|
||||||
|
obj string
|
||||||
|
)
|
||||||
|
listReq := &pb.HeroTalentListReq{}
|
||||||
|
listResp := &pb.HeroTalentListResp{}
|
||||||
|
code = robot.SendMsg("hero", "talentlist", listReq, listResp)
|
||||||
|
if code != pb.ErrorCode_Success {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
for _, v := range listResp.Telnet {
|
||||||
|
if v.Id != "" {
|
||||||
|
obj = v.Id
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
talentReq := &pb.HeroTalentLearnReq{
|
||||||
|
TalentID: 2,
|
||||||
|
ObjId: obj,
|
||||||
|
Heroid: "",
|
||||||
|
}
|
||||||
|
|
||||||
|
talentResp := &pb.HeroTalentLearnResp{}
|
||||||
|
code = robot.SendMsg("hero", "talentlearn", talentReq, talentResp)
|
||||||
|
if code != pb.ErrorCode_Success {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user