1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-02-08 17:57:42 +08:00
parent 2edd1ba852
commit ffe3ff18bf
25 changed files with 180 additions and 117 deletions

View File

@@ -28,7 +28,7 @@ func (h Controller) EggGamePlay(data1 *egg.C2S_EGG_GAME_PLAY, c *player.Player)
result = &egg.S2C_EGG_GAME_PLAY{ListInfo: []data.ItemInfo{}}
if grand.Meet(int(data1.EggNum), 100) {
r := service.NewPetRewardService().GetEgg()
newPet := model.GenPetInfo(int(r.MonID), int(r.DV), int(r.Nature), int(r.Effect), int(r.Lv), nil)
newPet := model.GenPetInfo(int(r.MonID), int(r.DV), int(r.Nature), int(r.Effect), int(r.Lv), nil, 0)
if grand.Meet(int(data1.EggNum), 100) {
newPet.RandShiny()
}

View File

@@ -87,7 +87,7 @@ func (Controller) PlayerFightBoss(data *fight.ChallengeBossInboundInfo, p *playe
-1,
0, //野怪没特性
bm.Lv, nil)
bm.Lv, nil, 0)
monster.CatchTime = uint32(i)
if bm.Hp != 0 {
monster.Hp = uint32(bm.Hp)
@@ -158,21 +158,21 @@ func (Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundInf
return nil, errorcode.ErrorCodes.ErrSystemError
}
refPet := p.OgreInfo.Data[data1.Number]
if refPet.Id == 0 {
if refPet.ID == 0 {
return nil, errorcode.ErrorCodes.ErrPokemonNotExists
}
if refPet.Ext != 0 {
refPet.Id = refPet.Ext
refPet.ID = refPet.Ext
}
monster := model.GenPetInfo(
int(refPet.Id), -1,
int(refPet.ID), -1,
-1,
0, //野怪没特性
int(refPet.Lv),
refPet.ShinyInfo)
refPet.ShinyInfo, -1)
if refPet.Ext != 0 {
if grand.Meet(3, 100) {
monster.RandShiny()

View File

@@ -140,7 +140,7 @@ func (h Controller) PetTawor(data *fight.StartTwarInboundInfo, c *player.Player)
r := service.NewBossService().Get(v)
if r != nil {
monster := model.GenPetInfo(int(r.MonID), 24, int(r.Nature), 0, int(r.Lv), nil)
monster := model.GenPetInfo(int(r.MonID), 24, int(r.Nature), 0, int(r.Lv), nil, 0)
if r.Hp != 0 {
monster.Hp = uint32(r.Hp)
monster.MaxHp = uint32(r.Hp)

View File

@@ -53,7 +53,7 @@ func (h Controller) Collect(
}
c.Info.SetTask(1335+int(data.Type), model.Completed)
r := model.GenPetInfo(int(data.ID), -1, -1, 0, 1, nil)
r := model.GenPetInfo(int(data.ID), -1, -1, 0, 1, nil, 0)
c.Service.Pet.PetAdd(r)
result.CatchTime = r.CatchTime

View File

@@ -97,7 +97,7 @@ func (h Controller) PetFusion(data *pet.C2S_PetFusion, c *player.Player) (result
dv1 := alpacadecimal.NewFromInt(2).Div(alpacadecimal.NewFromInt(3)).Mul(alpacadecimal.NewFromInt(int64(Mcatchpetinfo.Dv)))
dv2 := alpacadecimal.NewFromInt(1).Div(alpacadecimal.NewFromInt(3)).Mul(alpacadecimal.NewFromInt(int64(Auxpetinfo.Dv)))
dv := dv1.Add(dv2).Add(alpacadecimal.NewFromInt(1)).IntPart()
r := model.GenPetInfo(resid, int(dv), int(natureId), effect, 1, nil)
r := model.GenPetInfo(resid, int(dv), int(natureId), effect, 1, nil, -1)
r.OldCatchTime = Mcatchpetinfo.CatchTime
shinycont := 1

View File

@@ -31,7 +31,7 @@ func (h Controller) CDK(data *user.C2S_GET_GIFT_COMPLETE, player *player.Player)
for _, v := range r.ElfRewardIds {
pet := service.NewPetRewardService().Get(v)
if pet != nil {
peti := model.GenPetInfo(int(pet.MonID), int(pet.DV), int(pet.Nature), int(pet.Effect), int(pet.Lv), nil)
peti := model.GenPetInfo(int(pet.MonID), int(pet.DV), int(pet.Nature), int(pet.Effect), int(pet.Lv), nil, 0)
player.Service.Pet.PetAdd(peti)
result.PetGift = append(result.PetGift, user.PetGiftInfo{PetID: peti.ID, CacthTime: peti.CatchTime})
}