mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Pets: Change PET_SAVE_NOT_IN_SLOT constant from 100 to -1 to truly avoid conflicts when growing stable size and change PET_SAVE_AS_DELETED from -1 to -2
This commit is contained in:
@@ -1164,7 +1164,7 @@ CREATE TABLE `character_pet` (
|
||||
`Reactstate` tinyint unsigned NOT NULL DEFAULT '0',
|
||||
`name` varchar(21) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Pet',
|
||||
`renamed` tinyint unsigned NOT NULL DEFAULT '0',
|
||||
`slot` tinyint unsigned NOT NULL DEFAULT '0',
|
||||
`slot` smallint NOT NULL DEFAULT '-1',
|
||||
`curhealth` int unsigned NOT NULL DEFAULT '1',
|
||||
`curmana` int unsigned NOT NULL DEFAULT '0',
|
||||
`savetime` int unsigned NOT NULL DEFAULT '0',
|
||||
@@ -3660,7 +3660,9 @@ INSERT INTO `updates` VALUES
|
||||
('2022_01_02_00_characters.sql','5169A5BBACB42E6CEDE405D3C4843FD386CDF92E','ARCHIVED','2022-01-02 21:22:35',0),
|
||||
('2022_01_09_00_characters.sql','3AC51F589821C17027CBA861EF762A709430CDB3','ARCHIVED','2022-01-09 21:29:45',0),
|
||||
('2022_01_15_00_characters.sql','884EFB6592DC8A765E0C0BF8BF907B4E4733BB0C','ARCHIVED','2022-01-15 23:24:58',0),
|
||||
('2022_01_31_00_characters.sql','19551474AA6079F0616B565F254914C5DD9ED1A1','RELEASED','2022-01-31 14:32:49',0);
|
||||
('2022_01_31_00_characters.sql','19551474AA6079F0616B565F254914C5DD9ED1A1','RELEASED','2022-01-31 14:32:49',0),
|
||||
('2022_01_31_01_characters.sql','E0A1FA670F4621AEB594D7ACBA4921CB298F54FF','RELEASED','2022-01-31 20:47:59',0),
|
||||
('2022_01_31_02_characters.sql','6E3A3F02276287DD540BC4C17E246DFB850260D8','RELEASED','2022-01-31 21:43:38',0);
|
||||
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE `character_pet` CHANGE `slot` `slot` smallint NOT NULL DEFAULT '-1';
|
||||
|
||||
UPDATE `character_pet` SET `slot` = -1 WHERE `slot` = 100;
|
||||
@@ -36,13 +36,13 @@ enum PetType : uint8
|
||||
#define MAX_PET_STABLES 4
|
||||
|
||||
// stored in character_pet.slot
|
||||
enum PetSaveMode : int8
|
||||
enum PetSaveMode : int16
|
||||
{
|
||||
PET_SAVE_AS_DELETED = -1, // not saved in fact
|
||||
PET_SAVE_AS_DELETED = -2, // not saved in fact
|
||||
PET_SAVE_AS_CURRENT = 0, // in current slot (with player)
|
||||
PET_SAVE_FIRST_STABLE_SLOT = 1,
|
||||
PET_SAVE_LAST_STABLE_SLOT = MAX_PET_STABLES, // last in DB stable slot index (including), all higher have same meaning as PET_SAVE_NOT_IN_SLOT
|
||||
PET_SAVE_NOT_IN_SLOT = 100 // for avoid conflict with stable size grow will use 100
|
||||
PET_SAVE_NOT_IN_SLOT = -1 // for avoid conflict with stable size grow will use negative value
|
||||
};
|
||||
|
||||
enum PetSpellState
|
||||
|
||||
Reference in New Issue
Block a user