diff options
author | maximius <none@none> | 2009-11-01 20:50:31 -0800 |
---|---|---|
committer | maximius <none@none> | 2009-11-01 20:50:31 -0800 |
commit | c3ba7d220824c8b1cd157fe85edae7f47d94f0d9 (patch) | |
tree | 39a58559afd80e6bc08e2f4f4695ed88beab2fee /src/game | |
parent | 5ed3201ad61d7bfdc23b3a77ccfbe689cf0804db (diff) |
*Fix getLevel() being parsed as a char in ostringstream use
--HG--
branch : trunk
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/Pet.cpp | 2 | ||||
-rw-r--r-- | src/game/Player.cpp | 8 | ||||
-rw-r--r-- | src/game/Unit.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 775c0ee8df5..8fd3f70f6d2 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -425,7 +425,7 @@ void Pet::SavePetToDB(PetSaveMode mode) << GetEntry() << ", " << owner << ", " << GetNativeDisplayId() << ", " - << getLevel() << ", " + << uint32(getLevel()) << ", " << GetUInt32Value(UNIT_FIELD_PETEXPERIENCE) << ", " << uint32(GetReactState()) << ", " << uint32(mode) << ", '" diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 86c23316b22..a1d82e22c8d 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -16330,10 +16330,10 @@ void Player::SaveToDB() << GetGUIDLow() << ", " << GetSession()->GetAccountId() << ", '" << sql_name << "', " - << (uint32)getRace() << ", " - << (uint32)getClass() << ", " - << (uint32)getGender() << ", " - << getLevel() << ", " + << uint32(getRace()) << ", " + << uint32(getClass()) << ", " + << uint32(getGender()) << ", " + << uint32(getLevel()) << ", " << GetUInt32Value(PLAYER_XP) << ", " << GetMoney() << ", " << GetUInt32Value(PLAYER_BYTES) << ", " diff --git a/src/game/Unit.h b/src/game/Unit.h index 7053b81ac5b..0cebd3bf1b9 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1167,7 +1167,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject bool isTotem() const { return m_unitTypeMask & UNIT_MASK_TOTEM; } bool IsVehicle() const { return m_unitTypeMask & UNIT_MASK_VEHICLE; } - uint8 getLevel() const { return GetUInt32Value(UNIT_FIELD_LEVEL); } + uint8 getLevel() const { return uint8(GetUInt32Value(UNIT_FIELD_LEVEL)); } virtual uint8 getLevelForTarget(Unit const* /*target*/) const { return getLevel(); } void SetLevel(uint8 lvl); uint8 getRace() const { return GetByteValue(UNIT_FIELD_BYTES_0, 0); } |