aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-10 18:18:44 -0500
committermegamage <none@none>2009-04-10 18:18:44 -0500
commit4d277430c56899543f8482c247dfa7aaf34a85e1 (patch)
treebe93f9958b4357b5c24053dd87a8c522f92d86f9 /src/game/Player.cpp
parentd1c2d980153744977c5c44d520d3e1ff9204dbcf (diff)
[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
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 992630ad1d5..4bf93b3ea70 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -14417,10 +14417,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();