This commit is contained in:
@@ -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
|
||||
);
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user