mirror of
https://github.com/mangosfour/server.git
synced 2025-12-27 19:37:04 +00:00
[7644] Fixed pet slot values using in pet save.
Problem exist from client version switch when stable slot amount changed. In result this has been source problems with stable use (3-4 slots) and possible pet lost in some cases or "not save state" for summoned pets. Use enums to avoid repeating problem, use more safe value for not-in-slot save (for summoned pets) Fixed data preparing for MSG_LIST_STABLED_PETS.
This commit is contained in:
parent
34d69bbfdd
commit
263bf2ab22
9 changed files with 142 additions and 124 deletions
|
|
@ -34,13 +34,16 @@ enum PetType
|
|||
|
||||
extern char const* petTypeSuffix[MAX_PET_TYPE];
|
||||
|
||||
#define MAX_PET_STABLES 4
|
||||
|
||||
// stored in character_pet.slot
|
||||
enum PetSaveMode
|
||||
{
|
||||
PET_SAVE_AS_DELETED =-1,
|
||||
PET_SAVE_AS_CURRENT = 0,
|
||||
PET_SAVE_IN_STABLE_SLOT_1 = 1,
|
||||
PET_SAVE_IN_STABLE_SLOT_2 = 2,
|
||||
PET_SAVE_NOT_IN_SLOT = 3
|
||||
PET_SAVE_AS_DELETED = -1, // 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
|
||||
};
|
||||
|
||||
enum HappinessState
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue