mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Core/Random: Removed ancient and unused MAP_BASED_RAND_GEN
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user