From 6075f7cecd7c1a1f283c98eb0feeb746402a7c00 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 20 Oct 2013 14:00:45 +0200 Subject: Fixed memory leaks in cMobCensus, moved GetSpawnRate() to cMonster. --- source/MobCensus.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'source/MobCensus.h') diff --git a/source/MobCensus.h b/source/MobCensus.h index 7606efcea..e3892bec6 100644 --- a/source/MobCensus.h +++ b/source/MobCensus.h @@ -25,9 +25,6 @@ as side effect 2 : it also know the caps for mobs number and can compare census class cMobCensus { public: - typedef const std::map tMobSpawnRate; - static tMobSpawnRate & m_SpawnRate(void); - /// Returns the nested proximity counter cMobProximityCounter & GetProximityCounter(void); @@ -40,25 +37,21 @@ public: /// Returns true if the family is capped (i.e. there are more mobs of this family than max) bool IsCapped(cMonster::eFamily a_MobFamily); - + /// log the results of census to server console void Logd(void); - + protected : cMobProximityCounter m_ProximityCounter; cMobFamilyCollecter m_MobFamilyCollecter; - typedef const std::map tCapMultipliersMap; - - static tCapMultipliersMap & m_CapMultipliers(void); - std::set m_EligibleForSpawnChunks; /// Returns the number of chunks that are elligible for spawning (for now, the loaded, valid chunks) int GetNumChunks(); - static tCapMultipliersMap CapMultiplierInitializerBeforeCx11(void); - static tCapMultipliersMap MobSpawnRateInitializerBeforeCx11(void); + /// Returns the cap multiplier value of the given monster family + static int GetCapMultiplier(cMonster::eFamily a_MobFamily); } ; -- cgit v1.2.3