mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 00:08:01 +00:00
fix(Core/Common): -Wdeprecated-enum-float-conversion warning (#6870)
This commit is contained in:
@@ -42,16 +42,14 @@
|
|||||||
|
|
||||||
#define MAX_NETCLIENT_PACKET_SIZE (32767 - 1) // Client hardcap: int16 with trailing zero space otherwise crash on memory free
|
#define MAX_NETCLIENT_PACKET_SIZE (32767 - 1) // Client hardcap: int16 with trailing zero space otherwise crash on memory free
|
||||||
|
|
||||||
enum TimeConstants
|
// TimeConstants
|
||||||
{
|
constexpr auto MINUTE = 60;
|
||||||
MINUTE = 60,
|
constexpr auto HOUR = MINUTE * 60;
|
||||||
HOUR = MINUTE * 60,
|
constexpr auto DAY = HOUR * 24;
|
||||||
DAY = HOUR * 24,
|
constexpr auto WEEK = DAY * 7;
|
||||||
WEEK = DAY * 7,
|
constexpr auto MONTH = DAY * 30;
|
||||||
MONTH = DAY * 30,
|
constexpr auto YEAR = MONTH * 12;
|
||||||
YEAR = MONTH * 12,
|
constexpr auto IN_MILLISECONDS = 1000;
|
||||||
IN_MILLISECONDS = 1000
|
|
||||||
};
|
|
||||||
|
|
||||||
enum AccountTypes
|
enum AccountTypes
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
#include "DatabaseEnv.h"
|
#include "DatabaseEnv.h"
|
||||||
#include "DBCStores.h"
|
#include "DBCStores.h"
|
||||||
#include "Item.h"
|
#include "Item.h"
|
||||||
#include "Language.h"
|
|
||||||
#include "Logging/Log.h"
|
#include "Logging/Log.h"
|
||||||
#include "ObjectMgr.h"
|
#include "ObjectMgr.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
@@ -22,10 +21,7 @@
|
|||||||
#include "WorldSession.h"
|
#include "WorldSession.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
enum eAuctionHouse
|
constexpr auto AH_MINIMUM_DEPOSIT = 100;
|
||||||
{
|
|
||||||
AH_MINIMUM_DEPOSIT = 100,
|
|
||||||
};
|
|
||||||
|
|
||||||
AuctionHouseMgr::AuctionHouseMgr()
|
AuctionHouseMgr::AuctionHouseMgr()
|
||||||
{
|
{
|
||||||
@@ -563,7 +559,7 @@ bool AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
|
|||||||
|
|
||||||
for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr)
|
for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr)
|
||||||
{
|
{
|
||||||
if (AsyncAuctionListingMgr::IsAuctionListingAllowed() == false) // pussywizard: World::Update is waiting for us...
|
if (!AsyncAuctionListingMgr::IsAuctionListingAllowed()) // pussywizard: World::Update is waiting for us...
|
||||||
if ((itrcounter++) % 100 == 0) // check condition every 100 iterations
|
if ((itrcounter++) % 100 == 0) // check condition every 100 iterations
|
||||||
if (avgDiffTracker.getAverage() >= 30 || getMSTimeDiff(World::GetGameTimeMS(), getMSTime()) >= 10) // pussywizard: stop immediately if diff is high or waiting too long
|
if (avgDiffTracker.getAverage() >= 30 || getMSTimeDiff(World::GetGameTimeMS(), getMSTime()) >= 10) // pussywizard: stop immediately if diff is high or waiting too long
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -44,10 +44,7 @@ enum BattlefieldSounds
|
|||||||
BF_START = 3439
|
BF_START = 3439
|
||||||
};
|
};
|
||||||
|
|
||||||
enum BattlefieldTimers
|
constexpr auto BATTLEFIELD_OBJECTIVE_UPDATE_INTERVAL = 1000;
|
||||||
{
|
|
||||||
BATTLEFIELD_OBJECTIVE_UPDATE_INTERVAL = 1000
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint32 BattlefieldFactions[BG_TEAMS_COUNT] =
|
const uint32 BattlefieldFactions[BG_TEAMS_COUNT] =
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -281,8 +281,8 @@ public:
|
|||||||
me->CastSpell(me, me->GetMap()->IsHeroic() ? SPELL_FLAME_SPHERE_PERIODIC_H : SPELL_FLAME_SPHERE_PERIODIC, true);
|
me->CastSpell(me, me->GetMap()->IsHeroic() ? SPELL_FLAME_SPHERE_PERIODIC_H : SPELL_FLAME_SPHERE_PERIODIC, true);
|
||||||
|
|
||||||
float angle = rand_norm() * 2 * M_PI;
|
float angle = rand_norm() * 2 * M_PI;
|
||||||
float x = me->GetPositionX() + DATA_SPHERE_DISTANCE * cos(angle);
|
float x = me->GetPositionX() + static_cast<float>(DATA_SPHERE_DISTANCE) * cos(angle);
|
||||||
float y = me->GetPositionY() + DATA_SPHERE_DISTANCE * sin(angle);
|
float y = me->GetPositionY() + static_cast<float>(DATA_SPHERE_DISTANCE) * sin(angle);
|
||||||
me->GetMotionMaster()->MovePoint(0, x, y, me->GetPositionZ());
|
me->GetMotionMaster()->MovePoint(0, x, y, me->GetPositionZ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user