refactor(Core/Random): Remove unused map based RNG (#20939)

Remove unused map based RNG
This commit is contained in:
Takenbacon
2024-12-18 04:48:06 -08:00
committed by GitHub
parent 5f020de546
commit e9c86737fb
3 changed files with 0 additions and 21 deletions

View File

@@ -590,14 +590,6 @@ public:
return GetMapId() == 571 && GetPositionX() > 3733.33331f && GetPositionX() < 5866.66663f && GetPositionY() > 1599.99999f && GetPositionY() < 4799.99997f; return GetMapId() == 571 && GetPositionX() > 3733.33331f && GetPositionX() < 5866.66663f && GetPositionY() > 1599.99999f && GetPositionY() < 4799.99997f;
} }
#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; uint32 LastUsedScriptID;
// Transports // Transports

View File

@@ -21,11 +21,6 @@
#include "MoveSplineInit.h" #include "MoveSplineInit.h"
#include "Player.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> template<class T>
void ConfusedMovementGenerator<T>::DoInitialize(T* unit) void ConfusedMovementGenerator<T>::DoInitialize(T* unit)
{ {

View File

@@ -783,14 +783,6 @@ public:
bool _spellTargetsSelected; bool _spellTargetsSelected;
ByteBuffer* m_effectExecuteData[MAX_SPELL_EFFECTS]; 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
}; };
namespace Acore namespace Acore