[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:
ApoC 2009-01-21 02:45:31 +01:00
parent a92354afed
commit 1718653e63
33 changed files with 35 additions and 35 deletions

View file

@ -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

View file

@ -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;

View file

@ -30,7 +30,7 @@ BattleGroundAA::~BattleGroundAA()
}
void BattleGroundAA::Update(time_t diff)
void BattleGroundAA::Update(uint32 diff)
{
BattleGround::Update(diff);
}

View file

@ -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);

View file

@ -38,7 +38,7 @@ BattleGroundAB::~BattleGroundAB()
{
}
void BattleGroundAB::Update(time_t diff)
void BattleGroundAB::Update(uint32 diff)
{
BattleGround::Update(diff);

View file

@ -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);

View file

@ -34,7 +34,7 @@ BattleGroundAV::~BattleGroundAV()
}
void BattleGroundAV::Update(time_t diff)
void BattleGroundAV::Update(uint32 diff)
{
BattleGround::Update(diff);
}

View file

@ -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);

View file

@ -35,7 +35,7 @@ BattleGroundBE::~BattleGroundBE()
}
void BattleGroundBE::Update(time_t diff)
void BattleGroundBE::Update(uint32 diff)
{
BattleGround::Update(diff);

View file

@ -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);

View file

@ -30,7 +30,7 @@ BattleGroundDS::~BattleGroundDS()
}
void BattleGroundDS::Update(time_t diff)
void BattleGroundDS::Update(uint32 diff)
{
BattleGround::Update(diff);
}

View file

@ -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);

View file

@ -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)

View file

@ -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);

View file

@ -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)

View file

@ -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);

View file

@ -35,7 +35,7 @@ BattleGroundNA::~BattleGroundNA()
}
void BattleGroundNA::Update(time_t diff)
void BattleGroundNA::Update(uint32 diff)
{
BattleGround::Update(diff);

View file

@ -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);

View file

@ -35,7 +35,7 @@ BattleGroundRL::~BattleGroundRL()
}
void BattleGroundRL::Update(time_t diff)
void BattleGroundRL::Update(uint32 diff)
{
BattleGround::Update(diff);

View file

@ -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);

View file

@ -30,7 +30,7 @@ BattleGroundRV::~BattleGroundRV()
}
void BattleGroundRV::Update(time_t diff)
void BattleGroundRV::Update(uint32 diff)
{
BattleGround::Update(diff);
}

View file

@ -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);

View file

@ -29,7 +29,7 @@ BattleGroundSA::~BattleGroundSA()
}
void BattleGroundSA::Update(time_t diff)
void BattleGroundSA::Update(uint32 diff)
{
BattleGround::Update(diff);
}

View file

@ -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);

View file

@ -36,7 +36,7 @@ BattleGroundWS::~BattleGroundWS()
{
}
void BattleGroundWS::Update(time_t diff)
void BattleGroundWS::Update(uint32 diff)
{
BattleGround::Update(diff);

View file

@ -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);

View file

@ -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() )

View file

@ -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)
{

View file

@ -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);

View file

@ -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;

View file

@ -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())

View file

@ -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)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7129"
#define REVISION_NR "7130"
#endif // __REVISION_NR_H__