コード例 #1
0
        private static void TrackPlayer(MovementEventArgs e, bool Penalty)
        {
            Mobile from = e.Mobile;

            // Look to see if we are already tracking this player
            if (m_doissier.ContainsKey(from.Serial) == false)
            {
                // add it
                m_doissier.Add(from.Serial, new Dossier());
            }

            // okay process this player's Dossier
            Dossier dx = m_doissier[from.Serial];

            // check the timeout
            if (dx.Timeout == true)
            {   // start over with this guy.
                m_doissier.Remove(from.Serial);
                return;
            }

            // Mark the current time
            dx.MarkTime();

            // handle the exploit 3 strikes and you're out
            //  You get a Penalty point if you stepped off a porch onto a stack of > 3 items to begin with
            if ((++dx.InfractionCount + ((Penalty == true) ? 1 : 0)) >= 3)
            {
                BlockAndReport(e);
            }
        }