コード例 #1
0
ファイル: TimedResistanceMod.cs プロジェクト: pallop/Servuo
        public static void AddMod(Mobile m, string name, ResistanceMod[] mods, TimeSpan duration)
        {
            string fullname = name + ":" + m.Serial.ToString();

            if (m_Table.ContainsKey(fullname))
            {
                ResistanceModTimer timer = m_Table[fullname];
                timer.End();
                m_Table.Remove(fullname);
            }

            ResistanceModTimer timertostart = new ResistanceModTimer(m, name, mods, duration);

            timertostart.Start();
            m_Table.Add(fullname, timertostart);
        }
コード例 #2
0
ファイル: TimedResistanceMod.cs プロジェクト: pallop/Servuo
        public static void RemoveMod(Mobile m, string name)
        {
            string fullname = name + ":" + m.Serial.ToString();

            if (m_Table.ContainsKey(fullname))
            {
                ResistanceModTimer t = m_Table[fullname];

                if (t != null)
                {
                    t.End();
                }

                m_Table.Remove(fullname);
            }
        }