public override void OnDeactivePart(DeactivePartCmd cmd) { string[] array = cmd.args.get_stringParameter().Split(new char[] { ',' }); List <int> list = new List <int>(); for (int i = 0; i < array.Length; i++) { list.Add(int.Parse(array[i])); } Dictionary <long, EntityParent> dictionary = new Dictionary <long, EntityParent>(); if (cmd.args.get_intParameter() == 0 && (this.GetEntity() as EntityMonster).IsNoumenon) { using (Dictionary <long, EntityParent> .Enumerator enumerator = (this.GetEntity() as EntityMonster).AllParts.GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <long, EntityParent> current = enumerator.get_Current(); dictionary.Add(current.get_Key(), current.get_Value()); } } } else { dictionary.Add(this.GetEntity().ID, this.GetEntity()); } using (Dictionary <long, EntityParent> .Enumerator enumerator2 = dictionary.GetEnumerator()) { while (enumerator2.MoveNext()) { KeyValuePair <long, EntityParent> current2 = enumerator2.get_Current(); if (current2.get_Value() != null) { if (list.Contains(current2.get_Value().TypeID)) { EntityMonster entityMonster = current2.get_Value() as EntityMonster; if ((!entityMonster.IsNoumenon || entityMonster.IsNoumenonActive) && (!entityMonster.IsComponont || entityMonster.IsComponontActive)) { if (entityMonster.IsNoumenon) { (current2.get_Value() as EntityMonster).DeactiveNoumenon(); } else if (entityMonster.IsComponont) { (current2.get_Value() as EntityMonster).DeactiveComponont(); } } } } } } }
public virtual void OnDeactivePart(DeactivePartCmd cmd) { }