private void DoEffect( object state )
{
if ( Deleted )
return;
object[] states = (object[])state;
Point3D p = (Point3D)states[0];
int index = (int)states[1];
Mobile from = (Mobile)states[2];
states[1] = ++index;
if ( index == 1 )
{
Effects.SendLocationEffect( p, Map, 0x352D, 16, 4 );
Effects.PlaySound( p, Map, 0x364 );
}
else if ( index <= 7 || index == 14 )
{
if ( RequireDeepWater )
{
for ( int i = 0; i < 3; ++i )
{
int x, y;
switch ( Utility.Random( 8 ) )
{
default:
case 0: x = -1; y = -1; break;
case 1: x = -1; y = 0; break;
case 2: x = -1; y = +1; break;
case 3: x = 0; y = -1; break;
case 4: x = 0; y = +1; break;
case 5: x = +1; y = -1; break;
case 6: x = +1; y = 0; break;
case 7: x = +1; y = +1; break;
}
Effects.SendLocationEffect( new Point3D( p.X + x, p.Y + y, p.Z ), Map, 0x352D, 16, 4 );
}
}
else
{
Effects.SendLocationEffect( p, Map, 0x352D, 16, 4 );
}
if ( Utility.RandomBool() )
Effects.PlaySound( p, Map, 0x364 );
if ( index == 14 )
FinishEffect( p, Map, from );
else
this.Z -= 1;
}
}