[7644] Fixed pet slot values using in pet save. Author: VladimirMangos
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.
--HG--
branch : trunk
This commit is contained in:
+8
-5
@@ -35,13 +35,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
|
||||
|
||||
Reference in New Issue
Block a user