*Replace a ton of switches with RAND(), and overload RAND() to support up to 16 parameters.

*Add a safety check to prevent knocking players off of transports, just in case they die while on one.
*Fix a couple incorrect spell defines.

--HG--
branch : trunk
This commit is contained in:
maximius committed 2009-09-26 02:09:26 -07:00
1 parent 2853aa1cd1
commit f8a6434fc0
22 files changed
+323 -248

No files matched your search

+1 -8
View File
@@ -354,14 +354,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
int32 temp = 0;
if (action.text.TextId2 && action.text.TextId3)
{
switch( rand()%3 )
{
case 0: temp = action.text.TextId1; break;
case 1: temp = action.text.TextId2; break;
case 2: temp = action.text.TextId3; break;
}
}
temp = RAND(action.text.TextId1,action.text.TextId2,action.text.TextId3);
else if (action.text.TextId2 && urand(0,1))
temp = action.text.TextId2;
else