mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7124] Removed virtual keyworld from Map::CanUnload method. This method needn't to be virtual. Method moved all into header file to be inlined.
Fixed problem when instance never unloaded in case low population servers where update time always fit into WORLD_SLEEP_CONST and unload time is multiple of this constant. Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
ce384c5278
commit
220aa56fed
3 changed files with 8 additions and 10 deletions
|
|
@ -1448,14 +1448,6 @@ void Map::RemoveAllObjectsInRemoveList()
|
|||
//sLog.outDebug("Object remover 2 check.");
|
||||
}
|
||||
|
||||
bool Map::CanUnload(const uint32 &diff)
|
||||
{
|
||||
if(!m_unloadTimer) return false;
|
||||
if(m_unloadTimer < diff) return true;
|
||||
m_unloadTimer -= diff;
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 Map::GetPlayersCountExceptGMs() const
|
||||
{
|
||||
uint32 count = 0;
|
||||
|
|
|
|||
|
|
@ -131,7 +131,13 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
|||
virtual ~Map();
|
||||
|
||||
// currently unused for normal maps
|
||||
virtual bool CanUnload(const uint32& diff);
|
||||
bool CanUnload(uint32 diff)
|
||||
{
|
||||
if(!m_unloadTimer) return false;
|
||||
if(m_unloadTimer <= diff) return true;
|
||||
m_unloadTimer -= diff;
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool Add(Player *);
|
||||
virtual void Remove(Player *, bool);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7123"
|
||||
#define REVISION_NR "7124"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue