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

This commit is contained in:
xinian
2026-02-13 01:39:53 +08:00
committed by cnb
parent 008aa97675
commit dca4d4ffca
2 changed files with 28 additions and 6 deletions

View File

@@ -42,4 +42,17 @@ SELECT pgm.id
FROM pet_group_mapping pgm
INNER JOIN excess_groups eg ON pgm.player_id = eg.player_id AND pgm.pet_group = eg.pet_group
WHERE pgm.rn > 1
);
);
//删除多余的异常融合精灵
DELETE FROM "player_pet" pp
WHERE
pp.deleted_at IS NULL
AND pp.is_vip = 0
AND (pp.data->>'OldCatchTime')::BIGINT != 0
AND NOT EXISTS (
SELECT 1
FROM config_fusion_pet cfp
WHERE (pp.data->>'ID')::INT BETWEEN cfp.result_pet_id AND cfp.result_pet_id + 2
);

View File

@@ -45,7 +45,18 @@ func (s *EggService) Get() (out *model.Egg) {
}
func (s *EggService) StartBreed(m, f *model.PetInfo) bool {
if m.Gender != 1 {
return false
}
if f.Gender != 2 {
return false
}
if m.Generation > 9 {
return false
}
if f.Generation > 9 {
return false
}
var tt *model.Egg
s.TestModel(s.Model).Scan(&tt)
if tt == nil {
@@ -61,10 +72,8 @@ func (s *EggService) StartBreed(m, f *model.PetInfo) bool {
cureff.EggCatchTime = uint32(time.Now().Unix())
cureff.EggID = (uint32(m.Generation) + uint32(f.Generation)) / 2
if cureff.EggID == 0 {
cureff.EggID = 1
}
cureff.EggID = (uint32(m.Generation)+uint32(f.Generation))/2 + 1
cureff.OwnerID = uint32(s.userid)
cureff.FeMalePetID = f.ID