예제 #1
0
 public static void MakeStinky(Mobile m, TimeSpan duration)
 {
     if (!Stinky.ContainsKey(m))
     {
         Stinky.Add(m, DateTime.UtcNow + duration);
     }
     else
     {
         Stinky[m] = DateTime.UtcNow + duration;
     }
 }
예제 #2
0
        public static bool CheckStinky(Mobile m)
        {
            if (Stinky.ContainsKey(m))
            {
                if (Stinky[m] >= DateTime.UtcNow)
                {
                    return(true);
                }

                Stinky.Remove(m);
            }

            return(false);
        }