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.Stop(); m_Table.Remove( fullname ); } ResistanceModTimer timertostart = new ResistanceModTimer( m, name, mods, duration ); timertostart.Start(); m_Table.Add( fullname, timertostart ); }
public static void AddMod(Mobile m, string name, ResistanceMod[] mods, TimeSpan duration) { var fullname = name + ":" + m.Serial; if (m_Table.ContainsKey(fullname)) { var timer = m_Table[fullname]; timer.End(); m_Table.Remove(fullname); } var timertostart = new ResistanceModTimer(m, name, mods, duration); timertostart.Start(); m_Table.Add(fullname, timertostart); }
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); } }