mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[7130] Changet all *::Update(time_t) to *::Update(uint32), there is no need to use time_t (mostly 64b) because time diffs are very small numbers and the base calculation of diff is done as uint32.
Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
a92354afed
commit
1718653e63
33 changed files with 35 additions and 35 deletions
|
|
@ -116,7 +116,7 @@ BattleGround::~BattleGround()
|
|||
this->RemoveFromBGFreeSlotQueue();
|
||||
}
|
||||
|
||||
void BattleGround::Update(time_t diff)
|
||||
void BattleGround::Update(uint32 diff)
|
||||
{
|
||||
if(!GetPlayersSize() && !GetRemovedPlayersSize() && !GetReviveQueueSize())
|
||||
//BG is empty
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ class BattleGround
|
|||
BattleGround();
|
||||
/*BattleGround(const BattleGround& bg);*/
|
||||
virtual ~BattleGround();
|
||||
virtual void Update(time_t diff); // must be implemented in BG subclass of BG specific update code, but must in begginning call parent version
|
||||
virtual void Update(uint32 diff); // must be implemented in BG subclass of BG specific update code, but must in begginning call parent version
|
||||
virtual bool SetupBattleGround() // must be implemented in BG subclass
|
||||
{
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ BattleGroundAA::~BattleGroundAA()
|
|||
|
||||
}
|
||||
|
||||
void BattleGroundAA::Update(time_t diff)
|
||||
void BattleGroundAA::Update(uint32 diff)
|
||||
{
|
||||
BattleGround::Update(diff);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class BattleGroundAA : public BattleGround
|
|||
public:
|
||||
BattleGroundAA();
|
||||
~BattleGroundAA();
|
||||
void Update(time_t diff);
|
||||
void Update(uint32 diff);
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player *plr);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ BattleGroundAB::~BattleGroundAB()
|
|||
{
|
||||
}
|
||||
|
||||
void BattleGroundAB::Update(time_t diff)
|
||||
void BattleGroundAB::Update(uint32 diff)
|
||||
{
|
||||
BattleGround::Update(diff);
|
||||
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ class BattleGroundAB : public BattleGround
|
|||
BattleGroundAB();
|
||||
~BattleGroundAB();
|
||||
|
||||
void Update(time_t diff);
|
||||
void Update(uint32 diff);
|
||||
void AddPlayer(Player *plr);
|
||||
void RemovePlayer(Player *plr,uint64 guid);
|
||||
void HandleAreaTrigger(Player *Source, uint32 Trigger);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ BattleGroundAV::~BattleGroundAV()
|
|||
|
||||
}
|
||||
|
||||
void BattleGroundAV::Update(time_t diff)
|
||||
void BattleGroundAV::Update(uint32 diff)
|
||||
{
|
||||
BattleGround::Update(diff);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class BattleGroundAV : public BattleGround
|
|||
public:
|
||||
BattleGroundAV();
|
||||
~BattleGroundAV();
|
||||
void Update(time_t diff);
|
||||
void Update(uint32 diff);
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player *plr);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ BattleGroundBE::~BattleGroundBE()
|
|||
|
||||
}
|
||||
|
||||
void BattleGroundBE::Update(time_t diff)
|
||||
void BattleGroundBE::Update(uint32 diff)
|
||||
{
|
||||
BattleGround::Update(diff);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class BattleGroundBE : public BattleGround
|
|||
public:
|
||||
BattleGroundBE();
|
||||
~BattleGroundBE();
|
||||
void Update(time_t diff);
|
||||
void Update(uint32 diff);
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player *plr);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ BattleGroundDS::~BattleGroundDS()
|
|||
|
||||
}
|
||||
|
||||
void BattleGroundDS::Update(time_t diff)
|
||||
void BattleGroundDS::Update(uint32 diff)
|
||||
{
|
||||
BattleGround::Update(diff);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class BattleGroundDS : public BattleGround
|
|||
public:
|
||||
BattleGroundDS();
|
||||
~BattleGroundDS();
|
||||
void Update(time_t diff);
|
||||
void Update(uint32 diff);
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player *plr);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ BattleGroundEY::~BattleGroundEY()
|
|||
{
|
||||
}
|
||||
|
||||
void BattleGroundEY::Update(time_t diff)
|
||||
void BattleGroundEY::Update(uint32 diff)
|
||||
{
|
||||
BattleGround::Update(diff);
|
||||
// after bg start we get there (once)
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ class BattleGroundEY : public BattleGround
|
|||
public:
|
||||
BattleGroundEY();
|
||||
~BattleGroundEY();
|
||||
void Update(time_t diff);
|
||||
void Update(uint32 diff);
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player *plr);
|
||||
|
|
|
|||
|
|
@ -1095,7 +1095,7 @@ BattleGroundMgr::~BattleGroundMgr()
|
|||
}
|
||||
|
||||
// used to update running battlegrounds, and delete finished ones
|
||||
void BattleGroundMgr::Update(time_t diff)
|
||||
void BattleGroundMgr::Update(uint32 diff)
|
||||
{
|
||||
BattleGroundSet::iterator itr, next;
|
||||
for(itr = m_BattleGrounds.begin(); itr != m_BattleGrounds.end(); itr = next)
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ class BattleGroundMgr
|
|||
/* Construction */
|
||||
BattleGroundMgr();
|
||||
~BattleGroundMgr();
|
||||
void Update(time_t diff);
|
||||
void Update(uint32 diff);
|
||||
|
||||
/* Packet Building */
|
||||
void BuildPlayerJoinedBattleGroundPacket(WorldPacket *data, Player *plr);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ BattleGroundNA::~BattleGroundNA()
|
|||
|
||||
}
|
||||
|
||||
void BattleGroundNA::Update(time_t diff)
|
||||
void BattleGroundNA::Update(uint32 diff)
|
||||
{
|
||||
BattleGround::Update(diff);
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class BattleGroundNA : public BattleGround
|
|||
public:
|
||||
BattleGroundNA();
|
||||
~BattleGroundNA();
|
||||
void Update(time_t diff);
|
||||
void Update(uint32 diff);
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player *plr);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ BattleGroundRL::~BattleGroundRL()
|
|||
|
||||
}
|
||||
|
||||
void BattleGroundRL::Update(time_t diff)
|
||||
void BattleGroundRL::Update(uint32 diff)
|
||||
{
|
||||
BattleGround::Update(diff);
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class BattleGroundRL : public BattleGround
|
|||
public:
|
||||
BattleGroundRL();
|
||||
~BattleGroundRL();
|
||||
void Update(time_t diff);
|
||||
void Update(uint32 diff);
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player *plr);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ BattleGroundRV::~BattleGroundRV()
|
|||
|
||||
}
|
||||
|
||||
void BattleGroundRV::Update(time_t diff)
|
||||
void BattleGroundRV::Update(uint32 diff)
|
||||
{
|
||||
BattleGround::Update(diff);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class BattleGroundRV : public BattleGround
|
|||
public:
|
||||
BattleGroundRV();
|
||||
~BattleGroundRV();
|
||||
void Update(time_t diff);
|
||||
void Update(uint32 diff);
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player *plr);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ BattleGroundSA::~BattleGroundSA()
|
|||
|
||||
}
|
||||
|
||||
void BattleGroundSA::Update(time_t diff)
|
||||
void BattleGroundSA::Update(uint32 diff)
|
||||
{
|
||||
BattleGround::Update(diff);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class BattleGroundSA : public BattleGround
|
|||
public:
|
||||
BattleGroundSA();
|
||||
~BattleGroundSA();
|
||||
void Update(time_t diff);
|
||||
void Update(uint32 diff);
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player *plr);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ BattleGroundWS::~BattleGroundWS()
|
|||
{
|
||||
}
|
||||
|
||||
void BattleGroundWS::Update(time_t diff)
|
||||
void BattleGroundWS::Update(uint32 diff)
|
||||
{
|
||||
BattleGround::Update(diff);
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ class BattleGroundWS : public BattleGround
|
|||
/* Construction */
|
||||
BattleGroundWS();
|
||||
~BattleGroundWS();
|
||||
void Update(time_t diff);
|
||||
void Update(uint32 diff);
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
virtual void AddPlayer(Player *plr);
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ void MapManager::RemoveBonesFromMap(uint32 mapid, uint64 guid, float x, float y)
|
|||
}
|
||||
|
||||
void
|
||||
MapManager::Update(time_t diff)
|
||||
MapManager::Update(uint32 diff)
|
||||
{
|
||||
i_timer.Update(diff);
|
||||
if( !i_timer.Passed() )
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class MANGOS_DLL_DECL MapManager : public MaNGOS::Singleton<MapManager, MaNGOS::
|
|||
uint32 GetZoneId(uint32 mapid, float x, float y, float z) const { return Map::GetZoneId(GetAreaFlag(mapid, x, y, z),mapid); }
|
||||
|
||||
void Initialize(void);
|
||||
void Update(time_t);
|
||||
void Update(uint32);
|
||||
|
||||
void SetGridCleanUpDelay(uint32 t)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ Weather::Weather(uint32 zone, WeatherZoneChances const* weatherChances) : m_zone
|
|||
}
|
||||
|
||||
/// Launch a weather update
|
||||
bool Weather::Update(time_t diff)
|
||||
bool Weather::Update(uint32 diff)
|
||||
{
|
||||
if (m_timer.GetCurrent()>=0)
|
||||
m_timer.Update(diff);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class Weather
|
|||
void SetWeather(WeatherType type, float grade);
|
||||
/// For which zone is this weather?
|
||||
uint32 GetZone() { return m_zone; };
|
||||
bool Update(time_t diff);
|
||||
bool Update(uint32 diff);
|
||||
private:
|
||||
WeatherState GetWeatherState() const;
|
||||
uint32 m_zone;
|
||||
|
|
|
|||
|
|
@ -1412,7 +1412,7 @@ void World::DetectDBCLang()
|
|||
}
|
||||
|
||||
/// Update the World !
|
||||
void World::Update(time_t diff)
|
||||
void World::Update(uint32 diff)
|
||||
{
|
||||
///- Update the different timers
|
||||
for(int i = 0; i < WUPDATE_COUNT; i++)
|
||||
|
|
@ -2591,7 +2591,7 @@ void World::SendServerMessage(uint32 type, const char *text, Player* player)
|
|||
SendGlobalMessage( &data );
|
||||
}
|
||||
|
||||
void World::UpdateSessions( time_t diff )
|
||||
void World::UpdateSessions( uint32 diff )
|
||||
{
|
||||
///- Add new sessions
|
||||
while(!addSessQueue.empty())
|
||||
|
|
|
|||
|
|
@ -426,9 +426,9 @@ class World
|
|||
static void StopNow(uint8 exitcode) { m_stopEvent = true; m_ExitCode = exitcode; }
|
||||
static bool IsStopped() { return m_stopEvent; }
|
||||
|
||||
void Update(time_t diff);
|
||||
void Update(uint32 diff);
|
||||
|
||||
void UpdateSessions( time_t diff );
|
||||
void UpdateSessions( uint32 diff );
|
||||
/// Set a server rate (see #Rates)
|
||||
void setRate(Rates rate,float value) { rate_values[rate]=value; }
|
||||
/// Get a server rate (see #Rates)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7129"
|
||||
#define REVISION_NR "7130"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue