diff options
author | megamage <none@none> | 2009-05-25 11:34:01 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-25 11:34:01 -0500 |
commit | 2478087b5cd632c53add5e14f70c826150474e08 (patch) | |
tree | c49bf63d8e418d4e2144a84e69897e34eec00f4f /src/game/Map.h | |
parent | 4c6c9c560b594d235ddaf171b66493db121bed7c (diff) | |
parent | c66877019ee228193b9d68c6e8b886d5ffa1d9d5 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Map.h')
-rw-r--r-- | src/game/Map.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/game/Map.h b/src/game/Map.h index c69fe5f7345..85aeee8d6e4 100644 --- a/src/game/Map.h +++ b/src/game/Map.h @@ -33,6 +33,7 @@ #include "SharedDefines.h" #include "GameSystem/GridRefManager.h" #include "MapRefManager.h" +#include "mersennetwister/MersenneTwister.h" #include <bitset> #include <list> @@ -410,10 +411,34 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj template<class NOTIFIER> void VisitAll(const float &x, const float &y, float radius, NOTIFIER ¬ifier); template<class NOTIFIER> void VisitWorld(const float &x, const float &y, float radius, NOTIFIER ¬ifier); template<class NOTIFIER> void VisitGrid(const float &x, const float &y, float radius, NOTIFIER ¬ifier); + CreatureGroupHolderType CreatureGroupHolder; + MTRand mtRand; TempSummon *SummonCreature(uint32 entry, float x, float y, float z, float angle, SummonPropertiesEntry const *properties = NULL, uint32 duration = 0, Unit *summoner = NULL); + int32 irand(int32 min, int32 max) + { + return int32 (mtRand.randInt(max - min)) + min; + } - CreatureGroupHolderType CreatureGroupHolder; + uint32 urand(uint32 min, uint32 max) + { + return mtRand.randInt(max - min) + min; + } + + int32 rand32() + { + return mtRand.randInt(); + } + + double rand_norm(void) + { + return mtRand.randExc(); + } + + double rand_chance(void) + { + return mtRand.randExc(100.0); + } Creature* GetCreature(uint64 guid); GameObject* GetGameObject(uint64 guid); |