aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureAIImpl.h
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-27 23:33:21 -0500
committermegamage <none@none>2009-05-27 23:33:21 -0500
commitd2fe68bfef79fc1ef3ae727058439779c0d2a962 (patch)
tree6a74ea46f3c92f4c098c4658aa4afd4a94de2211 /src/game/CreatureAIImpl.h
parente81d3acda7202cc28122eb12661d25b9edef4885 (diff)
*Some improvement of DK start zone quests (no new quest fixed)
--HG-- branch : trunk
Diffstat (limited to 'src/game/CreatureAIImpl.h')
-rw-r--r--src/game/CreatureAIImpl.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/game/CreatureAIImpl.h b/src/game/CreatureAIImpl.h
index c7ce3198584..e48ef516b2c 100644
--- a/src/game/CreatureAIImpl.h
+++ b/src/game/CreatureAIImpl.h
@@ -61,7 +61,22 @@ 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)
+ switch(rand()%5)
+ {
+ default:
+ case 0: return v1;
+ case 1: return v2;
+ case 2: return v3;
+ case 3: return v4;
+ case 4: return v5;
+ }
+}
+
+template<class T>
+inline
+const T& RAND(const T& v1, const T& v2, const T& v3, const T& v4, const T& v5, const T& v6)
+{
+ switch(rand()%6)
{
default:
case 0: return v1;
@@ -69,6 +84,7 @@ const T& RAND(const T& v1, const T& v2, const T& v3, const T& v4, const T& v5)
case 2: return v3;
case 3: return v4;
case 4: return v5;
+ case 5: return v6;
}
}