aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2016-07-20 00:29:58 +0200
committerShauren <shauren.trinity@gmail.com>2016-07-20 00:29:58 +0200
commit1dd3d9f0e903fe14b2e95f3b4a6b52e94a396c37 (patch)
treea9cec0a456d58d6830ebd63dce80c2de444ee63c /src/server/game
parentcb4b6e8f3fe6dd36d8fa6f4281790e0a68fce187 (diff)
Fixed more compile warnings
Diffstat (limited to 'src/server/game')
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.h1
-rw-r--r--src/server/game/Entities/Player/Player.cpp13
2 files changed, 10 insertions, 4 deletions
diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h
index 407d8c295e7..f36212d8001 100644
--- a/src/server/game/DungeonFinding/LFGMgr.h
+++ b/src/server/game/DungeonFinding/LFGMgr.h
@@ -28,6 +28,7 @@ class Group;
class Player;
class Quest;
struct LfgDungeonsEntry;
+enum Difficulty : uint8;
namespace lfg
{
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 8e4da6952f1..9873f90edbb 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -11869,7 +11869,7 @@ void Player::EquipChildItem(uint8 parentBag, uint8 parentSlot, Item* parentItem)
void Player::AutoUnequipChildItem(Item* parentItem)
{
- if (ItemChildEquipmentEntry const* itemChildEquipment = sDB2Manager.GetItemChildEquipment(parentItem->GetEntry()))
+ if (sDB2Manager.GetItemChildEquipment(parentItem->GetEntry()))
{
if (Item* childItem = GetChildItemByGuid(parentItem->GetChildItem()))
{
@@ -17108,13 +17108,18 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder *holder)
money = MAX_MONEY_AMOUNT;
SetMoney(money);
+ std::array<uint8, PLAYER_CUSTOM_DISPLAY_SIZE> customDisplay;
+ customDisplay[0] = fields[14].GetUInt8();
+ customDisplay[1] = fields[15].GetUInt8();
+ customDisplay[2] = fields[16].GetUInt8();
+
SetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_SKIN_ID, fields[9].GetUInt8());
SetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_FACE_ID, fields[10].GetUInt8());
SetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_STYLE_ID, fields[11].GetUInt8());
SetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_COLOR_ID, fields[12].GetUInt8());
SetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_FACIAL_STYLE, fields[13].GetUInt8());
for (uint32 i = 0; i < PLAYER_CUSTOM_DISPLAY_SIZE; ++i)
- SetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_CUSTOM_DISPLAY_OPTION + i, fields[14 + i].GetUInt8());
+ SetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_CUSTOM_DISPLAY_OPTION + i, customDisplay[i]);
SetBankBagSlotCount(fields[17].GetUInt8());
SetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER, gender);
SetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_INEBRIATION, fields[53].GetUInt8());
@@ -17130,7 +17135,7 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder *holder)
GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_FACE_ID),
GetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_FACIAL_STYLE),
GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_SKIN_ID),
- std::array<uint8, PLAYER_CUSTOM_DISPLAY_SIZE>{ fields[14].GetUInt8(), fields[15].GetUInt8(), fields[16].GetUInt8() }))
+ customDisplay))
{
TC_LOG_ERROR("entities.player", "Player::LoadFromDB: Player (%s) has wrong Appearance values (Hair/Skin/Color), can't load.", guid.ToString().c_str());
return false;
@@ -20354,7 +20359,7 @@ void Player::outDebugValues() const
if (!sLog->ShouldLog("entities.unit", LOG_LEVEL_DEBUG))
return;
- TC_LOG_DEBUG("entities.unit", "HP is: \t\t\t%u\t\tMP is: \t\t\t%u", GetMaxHealth(), GetMaxPower(POWER_MANA));
+ TC_LOG_DEBUG("entities.unit", "HP is: \t\t\t" UI64FMTD "\t\tMP is: \t\t\t%u", GetMaxHealth(), GetMaxPower(POWER_MANA));
TC_LOG_DEBUG("entities.unit", "AGILITY is: \t\t%f\t\tSTRENGTH is: \t\t%f", GetStat(STAT_AGILITY), GetStat(STAT_STRENGTH));
TC_LOG_DEBUG("entities.unit", "INTELLECT is: \t\t%f", GetStat(STAT_INTELLECT));
TC_LOG_DEBUG("entities.unit", "STAMINA is: \t\t%f", GetStat(STAT_STAMINA));