Fixed pet evolution upgrade script (#4232)

This re-adds the missing eggs from before the change into the inventories.

Fixes #4116

Thanks to @Indigo000, @Badarosk0 and @Everade
This commit is contained in:
Lemongrass3110 2019-07-07 16:36:11 +02:00 committed by GitHub
parent 32525bad55
commit e6eaa9fe63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,3 +10,32 @@ WHERE
AND
( `i`.`card1` | ( `i`.`card2` << 16 ) ) = `c`.`pet_id`
;
INSERT INTO `inventory`( `char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3` )
SELECT
`p`.`char_id`, -- Character ID
`p`.`egg_id`, -- Egg Item ID
'1', -- Amount
'0', -- Equip
'1', -- Identify
'0', -- Refine
'1', -- Attribute
'256', -- Card0
( `p`.`pet_id` & 0xFFFF ), -- Card1
( ( `p`.`pet_id` >> 16 ) & 0xFFFF ), -- Card2
'0' -- Card3
FROM `pet` `p`
LEFT JOIN `inventory` `i`
ON
`i`.`char_id` = `p`.`char_id`
AND
`i`.`nameid` = `p`.`egg_id`
AND
`i`.`card0` = '256'
AND
( `i`.`card1` | ( `i`.`card2` << 16 ) ) = `p`.`pet_id`
WHERE
`p`.`incubate` = '0'
AND
`i`.`id` IS NULL
;