aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/game/DataStores/DB2Stores.cpp2
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp2
-rw-r--r--src/server/game/Entities/Creature/Creature.h4
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp2
-rw-r--r--src/server/game/Entities/Vehicle/Vehicle.cpp2
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiers.h2
-rw-r--r--src/server/game/Miscellaneous/SharedDefines.h2
-rw-r--r--src/server/game/Server/Protocol/Opcodes.h8
-rw-r--r--src/server/game/Server/WorldSocket.h2
-rw-r--r--src/server/shared/JSON/ProtobufJSON.cpp2
-rw-r--r--src/server/shared/Realm/RealmList.cpp18
11 files changed, 23 insertions, 23 deletions
diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp
index bbecf711f7a..f2a061da326 100644
--- a/src/server/game/DataStores/DB2Stores.cpp
+++ b/src/server/game/DataStores/DB2Stores.cpp
@@ -1412,7 +1412,7 @@ EmotesTextSoundEntry const* DB2Manager::GetTextSoundEmoteFor(uint32 emote, uint8
if (itr != _emoteTextSounds.end())
return itr->second;
- itr = _emoteTextSounds.find(EmotesTextSoundContainer::key_type(emote, race, gender, 0));
+ itr = _emoteTextSounds.find(EmotesTextSoundContainer::key_type(emote, race, gender, uint8(0)));
if (itr != _emoteTextSounds.end())
return itr->second;
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 0396786871c..7e1db91d6c3 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -1283,7 +1283,7 @@ float Creature::_GetHealthMod(int32 Rank)
}
}
-void Creature::LowerPlayerDamageReq(uint32 unDamage)
+void Creature::LowerPlayerDamageReq(uint64 unDamage)
{
if (m_PlayerDamageReq)
m_PlayerDamageReq > unDamage ? m_PlayerDamageReq -= unDamage : m_PlayerDamageReq = 0;
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index 03d69454e2b..c50853724b0 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -295,9 +295,9 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma
void SetDisableReputationGain(bool disable) { DisableReputationGain = disable; }
bool IsReputationGainDisabled() const { return DisableReputationGain; }
bool IsDamageEnoughForLootingAndReward() const { return (m_creatureInfo->flags_extra & CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ) || (m_PlayerDamageReq == 0); }
- void LowerPlayerDamageReq(uint32 unDamage);
+ void LowerPlayerDamageReq(uint64 unDamage);
void ResetPlayerDamageReq() { m_PlayerDamageReq = GetHealth() / 2; }
- uint32 m_PlayerDamageReq;
+ uint64 m_PlayerDamageReq;
uint32 GetOriginalEntry() const { return m_originalEntry; }
void SetOriginalEntry(uint32 entry) { m_originalEntry = entry; }
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index f4c50f0144f..22387bfc31b 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -13851,7 +13851,7 @@ void Unit::SendThreatListUpdate()
{
WorldPackets::Combat::ThreatInfo info;
info.UnitGUID = (*itr)->getUnitGuid();
- info.Threat = (*itr)->getThreat() * 100;
+ info.Threat = int32((*itr)->getThreat() * 100);
packet.ThreatList.push_back(info);
}
SendMessageToSet(packet.Write(), false);
diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp
index 6ae0bc5caf2..39a9f6b2f40 100644
--- a/src/server/game/Entities/Vehicle/Vehicle.cpp
+++ b/src/server/game/Entities/Vehicle/Vehicle.cpp
@@ -35,7 +35,7 @@
Vehicle::Vehicle(Unit* unit, VehicleEntry const* vehInfo, uint32 creatureEntry) :
UsableSeatNum(0), _me(unit), _vehicleInfo(vehInfo), _creatureEntry(creatureEntry), _status(STATUS_NONE), _lastShootPos()
{
- for (uint32 i = 0; i < MAX_VEHICLE_SEATS; ++i)
+ for (int8 i = 0; i < MAX_VEHICLE_SEATS; ++i)
{
if (uint32 seatId = _vehicleInfo->SeatID[i])
if (VehicleSeatEntry const* veSeat = sVehicleSeatStore.LookupEntry(seatId))
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index ffb0f818eb6..2de7397ac14 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -770,7 +770,7 @@ namespace Trinity
private:
Unit const* i_obj;
float i_range;
- uint32 i_hp;
+ uint64 i_hp;
};
class FriendlyCCedInRange
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index 3f337a2273f..52d705d1341 100644
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -2253,7 +2253,7 @@ enum Targets
TOTAL_SPELL_TARGETS
};
-enum SpellMissInfo
+enum SpellMissInfo : uint8
{
SPELL_MISS_NONE = 0,
SPELL_MISS_MISS = 1,
diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h
index 58834139c01..fdf6b9997ce 100644
--- a/src/server/game/Server/Protocol/Opcodes.h
+++ b/src/server/game/Server/Protocol/Opcodes.h
@@ -35,15 +35,15 @@ enum ConnectionType : int8
CONNECTION_TYPE_DEFAULT = -1
};
-enum OpcodeMisc : uint32
+enum OpcodeMisc : uint16
{
MAX_OPCODE = 0x3FFF,
NUM_OPCODE_HANDLERS = (MAX_OPCODE + 1),
- UNKNOWN_OPCODE = (0xFFFF + 1),
+ UNKNOWN_OPCODE = 0xFFFF,
NULL_OPCODE = 0xBADD
};
-enum OpcodeClient : uint32
+enum OpcodeClient : uint16
{
CMSG_ACCEPT_GUILD_INVITE = 0x35FB,
CMSG_ACCEPT_LEVEL_GRANT = 0x34EF,
@@ -759,7 +759,7 @@ enum OpcodeClient : uint32
CMSG_BF_MGR_QUEUE_EXIT_REQUEST = 0xBADD,
};
-enum OpcodeServer : uint32
+enum OpcodeServer : uint16
{
SMSG_ABORT_NEW_WORLD = 0x25AD,
SMSG_ACCOUNT_CRITERIA_UPDATE = 0x2652,
diff --git a/src/server/game/Server/WorldSocket.h b/src/server/game/Server/WorldSocket.h
index 57a1f05142b..fcee856c93b 100644
--- a/src/server/game/Server/WorldSocket.h
+++ b/src/server/game/Server/WorldSocket.h
@@ -36,7 +36,7 @@ class EncryptablePacket;
class WorldPacket;
class WorldSession;
enum ConnectionType : int8;
-enum OpcodeClient : uint32;
+enum OpcodeClient : uint16;
namespace WorldPackets
{
diff --git a/src/server/shared/JSON/ProtobufJSON.cpp b/src/server/shared/JSON/ProtobufJSON.cpp
index dcf7dc0436f..540d18c7b3f 100644
--- a/src/server/shared/JSON/ProtobufJSON.cpp
+++ b/src/server/shared/JSON/ProtobufJSON.cpp
@@ -325,7 +325,7 @@ bool Deserializer::Double(double d)
switch (field->cpp_type())
{
case google::protobuf::FieldDescriptor::CPPTYPE_FLOAT:
- SET_FIELD(message, field, Float, d);
+ SET_FIELD(message, field, Float, float(d));
break;
case google::protobuf::FieldDescriptor::CPPTYPE_DOUBLE:
SET_FIELD(message, field, Double, d);
diff --git a/src/server/shared/Realm/RealmList.cpp b/src/server/shared/Realm/RealmList.cpp
index c579b741d8e..66346614278 100644
--- a/src/server/shared/Realm/RealmList.cpp
+++ b/src/server/shared/Realm/RealmList.cpp
@@ -278,11 +278,11 @@ std::vector<uint8> RealmList::GetRealmEntryJSON(Battlenet::RealmHandle const& id
std::string json = "JamJSONRealmEntry:" + JSON::Serialize(realmEntry);
- uLong compressedLength = compressBound(json.length());
+ uLong compressedLength = compressBound(uLong(json.length()));
compressed.resize(compressedLength + 4);
- *reinterpret_cast<uint32*>(compressed.data()) = json.length() + 1;
+ *reinterpret_cast<uint32*>(compressed.data()) = uint32(json.length() + 1);
- if (compress(compressed.data() + 4, &compressedLength, reinterpret_cast<uint8 const*>(json.c_str()), json.length() + 1) == Z_OK)
+ if (compress(compressed.data() + 4, &compressedLength, reinterpret_cast<uint8 const*>(json.c_str()), uLong(json.length() + 1)) == Z_OK)
compressed.resize(compressedLength + 4);
else
compressed.clear();
@@ -337,12 +337,12 @@ std::vector<uint8> RealmList::GetRealmList(uint32 build, std::string const& subR
std::string json = "JSONRealmListUpdates:" + JSON::Serialize(realmList);
- uLong compressedLength = compressBound(json.length());
+ uLong compressedLength = compressBound(uLong(json.length()));
std::vector<uint8> compressed;
compressed.resize(4 + compressedLength);
- *reinterpret_cast<uint32*>(compressed.data()) = json.length() + 1;
+ *reinterpret_cast<uint32*>(compressed.data()) = uint32(json.length() + 1);
- compress(compressed.data() + 4, &compressedLength, reinterpret_cast<uint8 const*>(json.c_str()), json.length() + 1);
+ compress(compressed.data() + 4, &compressedLength, reinterpret_cast<uint8 const*>(json.c_str()), uLong(json.length() + 1));
compressed.resize(compressedLength + 4);
@@ -367,12 +367,12 @@ uint32 RealmList::JoinRealm(uint32 realmAddress, uint32 build, boost::asio::ip::
std::string json = "JSONRealmListServerIPAddresses:" + JSON::Serialize(serverAddresses);
- uLong compressedLength = compressBound(json.length());
+ uLong compressedLength = compressBound(uLong(json.length()));
std::vector<uint8> compressed;
compressed.resize(4 + compressedLength);
- *reinterpret_cast<uint32*>(compressed.data()) = json.length() + 1;
+ *reinterpret_cast<uint32*>(compressed.data()) = uint32(json.length() + 1);
- if (compress(compressed.data() + 4, &compressedLength, reinterpret_cast<uint8 const*>(json.c_str()), json.length() + 1) != Z_OK)
+ if (compress(compressed.data() + 4, &compressedLength, reinterpret_cast<uint8 const*>(json.c_str()), uLong(json.length() + 1)) != Z_OK)
return ERROR_UTIL_SERVER_FAILED_TO_SERIALIZE_RESPONSE;
BigNumber serverSecret;