Skip to content

Commit

Permalink
Core/Random: Removed ancient and unused MAP_BASED_RAND_GEN
Browse files Browse the repository at this point in the history
  • Loading branch information
Shauren committed May 9, 2016
1 parent c42f0bd commit 1ad02a0
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 25 deletions.
8 changes: 0 additions & 8 deletions src/server/game/Entities/Object/Object.h
Expand Up @@ -584,14 +584,6 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation
template<class NOTIFIER> void VisitNearbyGridObject(float const& radius, NOTIFIER& notifier) const { if (IsInWorld()) GetMap()->VisitGrid(GetPositionX(), GetPositionY(), radius, notifier); }
template<class NOTIFIER> void VisitNearbyWorldObject(float const& radius, NOTIFIER& notifier) const { if (IsInWorld()) GetMap()->VisitWorld(GetPositionX(), GetPositionY(), radius, notifier); }

#ifdef MAP_BASED_RAND_GEN
int32 irand(int32 min, int32 max) const { return int32 (GetMap()->mtRand.randInt(max - min)) + min; }
uint32 urand(uint32 min, uint32 max) const { return GetMap()->mtRand.randInt(max - min) + min;}
int32 rand32() const { return GetMap()->mtRand.randInt();}
double rand_norm() const { return GetMap()->mtRand.randExc();}
double rand_chance() const { return GetMap()->mtRand.randExc(100.0);}
#endif

uint32 LastUsedScriptID;

// Transports
Expand Down
Expand Up @@ -23,11 +23,6 @@
#include "MoveSpline.h"
#include "Player.h"

#ifdef MAP_BASED_RAND_GEN
#define rand_norm() unit.rand_norm()
#define urand(a, b) unit.urand(a, b)
#endif

template<class T>
void ConfusedMovementGenerator<T>::DoInitialize(T* unit)
{
Expand Down
Expand Up @@ -26,10 +26,6 @@

#define RUNNING_CHANCE_RANDOMMV 20 //will be "1 / RUNNING_CHANCE_RANDOMMV"

#ifdef MAP_BASED_RAND_GEN
#define rand_norm() creature.rand_norm()
#endif

template<>
void RandomMovementGenerator<Creature>::_setRandomLocation(Creature* creature)
{
Expand Down
8 changes: 0 additions & 8 deletions src/server/game/Spells/Spell.h
Expand Up @@ -694,14 +694,6 @@ class TC_GAME_API Spell

ByteBuffer * m_effectExecuteData[MAX_SPELL_EFFECTS];

#ifdef MAP_BASED_RAND_GEN
int32 irand(int32 min, int32 max) { return int32 (m_caster->GetMap()->mtRand.randInt(max - min)) + min; }
uint32 urand(uint32 min, uint32 max) { return m_caster->GetMap()->mtRand.randInt(max - min) + min; }
int32 rand32() { return m_caster->GetMap()->mtRand.randInt(); }
double rand_norm() { return m_caster->GetMap()->mtRand.randExc(); }
double rand_chance() { return m_caster->GetMap()->mtRand.randExc(100.0); }
#endif

Spell(Spell const& right) = delete;
Spell& operator=(Spell const& right) = delete;
};
Expand Down

0 comments on commit 1ad02a0

Please sign in to comment.