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();
|
||||
|
||||
|
||||
@@ -774,7 +774,7 @@ enum PlayerChatTag
|
||||
CHAT_TAG_AFK = 0x01,
|
||||
CHAT_TAG_DND = 0x02,
|
||||
CHAT_TAG_GM = 0x04,
|
||||
CHAT_TAG_UNK = 0x08, // Probably battleground commentator
|
||||
CHAT_TAG_COM = 0x08, // Commentator
|
||||
CHAT_TAG_DEV = 0x10,
|
||||
};
|
||||
|
||||
@@ -2301,6 +2301,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
m_mover = target;
|
||||
m_mover->m_movedPlayer = this;
|
||||
}
|
||||
|
||||
void SetSeer(WorldObject* target) { m_seer = target; }
|
||||
void SetViewpoint(WorldObject* target, bool apply);
|
||||
WorldObject* GetViewpoint() const;
|
||||
|
||||
@@ -130,7 +130,7 @@ void PlayerSocial::SendSocialList(Player* player)
|
||||
sSocialMgr->GetFriendInfo(player, itr->first, itr->second);
|
||||
|
||||
data << uint64(itr->first); // player guid
|
||||
data << uint32(itr->second.Flags); // player flag (0x1-friend?, 0x2-ignored?, 0x4-muted?)
|
||||
data << uint32(itr->second.Flags); // player flag (0x1 = Friend, 0x2 = Ignored, 0x4 = Muted)
|
||||
data << itr->second.Note; // string note
|
||||
if (itr->second.Flags & SOCIAL_FLAG_FRIEND) // if IsFriend()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user