Core/Random: Removed ancient and unused MAP_BASED_RAND_GEN

This commit is contained in:
Shauren
2016-05-09 18:44:26 +02:00
parent c42f0bd830
commit 1ad02a0d61
4 changed files with 0 additions and 25 deletions

View File

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

View File

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

View File

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

View File

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