Core/ReferAFriend : fix strange grantableLevels value in DB

This commit is contained in:
Fest
2011-08-11 17:42:02 +02:00
parent fcdbe0db1b
commit c1f0833672
+3 -1
View File
@@ -831,6 +831,8 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa
m_lastFallTime = 0; m_lastFallTime = 0;
m_lastFallZ = 0; m_lastFallZ = 0;
m_grantableLevels = 0;
m_ControlledByPlayer = true; m_ControlledByPlayer = true;
m_isWorldObject = true; m_isWorldObject = true;
@@ -3068,7 +3070,7 @@ void Player::GiveLevel(uint8 level)
if (GetSession()->GetRecruiterId()) if (GetSession()->GetRecruiterId())
if (level < sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL)) if (level < sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL))
if (level % 2 == 0) { if (level % 2 == 0) {
m_grantableLevels++; ++m_grantableLevels;
if (!HasByteFlag(PLAYER_FIELD_BYTES, 1, 0x01)) if (!HasByteFlag(PLAYER_FIELD_BYTES, 1, 0x01))
SetByteFlag(PLAYER_FIELD_BYTES, 1, 0x01); SetByteFlag(PLAYER_FIELD_BYTES, 1, 0x01);