Core/DB: Fix character creation in Player::SaveToDB.
And some misc comments/whitespaces
This commit is contained in:
@@ -3088,7 +3088,8 @@ void Player::GiveLevel(uint8 level)
|
||||
// Refer-A-Friend
|
||||
if (GetSession()->GetRecruiterId())
|
||||
if (level < sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL))
|
||||
if (level % 2 == 0) {
|
||||
if (level % 2 == 0)
|
||||
{
|
||||
++m_grantableLevels;
|
||||
|
||||
if (!HasByteFlag(PLAYER_FIELD_BYTES, 1, 0x01))
|
||||
@@ -18353,9 +18354,7 @@ void Player::SaveToDB(bool create /*=false*/)
|
||||
// cache equipment...
|
||||
for (uint32 i = 0; i < EQUIPMENT_SLOT_END * 2; ++i)
|
||||
ss << GetUInt32Value(PLAYER_VISIBLE_ITEM_1_ENTRYID + i) << ' ';
|
||||
stmt->setString(index++, ss.str());
|
||||
|
||||
ss.str().clear();
|
||||
|
||||
// ...and bags for enum opcode
|
||||
for (uint32 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i)
|
||||
{
|
||||
@@ -18466,9 +18465,7 @@ void Player::SaveToDB(bool create /*=false*/)
|
||||
// cache equipment...
|
||||
for (uint32 i = 0; i < EQUIPMENT_SLOT_END * 2; ++i)
|
||||
ss << GetUInt32Value(PLAYER_VISIBLE_ITEM_1_ENTRYID + i) << ' ';
|
||||
stmt->setString(index++, ss.str());
|
||||
|
||||
ss.str().clear();
|
||||
// ...and bags for enum opcode
|
||||
for (uint32 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i)
|
||||
{
|
||||
@@ -22917,7 +22914,6 @@ bool Player::CanCaptureTowerPoint()
|
||||
}
|
||||
|
||||
uint32 Player::GetBarberShopCost(uint8 newhairstyle, uint8 newhaircolor, uint8 newfacialhair, BarberShopStyleEntry const* newSkin)
|
||||
|
||||
{
|
||||
uint8 level = getLevel();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user