*Update creature AI functions

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-06 00:05:54 -05:00
parent e69d2cbed9
commit f4e8654337
3 changed files with 55 additions and 14 deletions
@@ -13,6 +13,55 @@
#define HEROIC(n,h) (HeroicMode ? h : n)
template<class T>
inline
const T& RAND(const T& v1, const T& v2)
{
return rand()%2 ? v1 : v2;
}
template<class T>
inline
const T& RAND(const T& v1, const T& v2, const T& v3)
{
switch(rand()%3)
{
default:
case 0: return v1;
case 1: return v2;
case 2: return v3;
}
}
template<class T>
inline
const T& RAND(const T& v1, const T& v2, const T& v3, const T& v4)
{
switch(rand()%4)
{
default:
case 0: return v1;
case 1: return v2;
case 2: return v3;
case 3: return v4;
}
}
template<class T>
inline
const T& RAND(const T& v1, const T& v2, const T& v3, const T& v4, const T& v5)
{
switch(rand()%4)
{
default:
case 0: return v1;
case 1: return v2;
case 2: return v3;
case 3: return v4;
case 4: return v5;
}
}
float GetSpellMaxRangeForHostile(uint32 id);
class SummonList : private std::list<uint64>