Fixed the upgrade script for pet evolution (#4082)

Fixes #4075

Thanks to @mazvi
This commit is contained in:
Lemongrass3110 2019-04-07 14:17:11 +02:00 committed by GitHub
parent 4ef5764d8d
commit ee2f49509a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,2 +1,12 @@
ALTER TABLE `pet` ALTER TABLE `pet`
ADD COLUMN `autofeed` tinyint(2) NOT NULL default '0' AFTER `incubate`; ADD COLUMN `autofeed` tinyint(2) NOT NULL default '0' AFTER `incubate`;
UPDATE `inventory` `i`
INNER JOIN `char` `c`
ON `i`.`char_id` = `c`.`char_id` AND `c`.`pet_id` <> '0'
SET `i`.`attribute` = '1'
WHERE
`i`.`card0` = '256'
AND
( `i`.`card1` | ( `i`.`card2` << 16 ) ) = `c`.`pet_id`
;