mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +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
|
|
@ -14073,10 +14073,10 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
uint32 extraflags = fields[25].GetUInt32();
|
||||
|
||||
m_stableSlots = fields[26].GetUInt32();
|
||||
if(m_stableSlots > 4)
|
||||
if(m_stableSlots > MAX_PET_STABLES)
|
||||
{
|
||||
sLog.outError("Player can have not more 4 stable slots, but have in DB %u",uint32(m_stableSlots));
|
||||
m_stableSlots = 4;
|
||||
sLog.outError("Player can have not more %u stable slots, but have in DB %u",MAX_PET_STABLES,uint32(m_stableSlots));
|
||||
m_stableSlots = MAX_PET_STABLES;
|
||||
}
|
||||
|
||||
m_atLoginFlags = fields[27].GetUInt32();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue