private void PlaceElementsInZone(DOL.GS.Collections.Hashtable elements) { DOL.GS.Collections.DictionaryEntry currentEntry = null; ArrayList currentList = null; SubNodeElement currentStartElement = null; SubNodeElement currentElement = null; IEnumerator entryEnumerator = elements.GetEntryEnumerator(); while (entryEnumerator.MoveNext()) { currentEntry = (DOL.GS.Collections.DictionaryEntry)entryEnumerator.Current; currentStartElement = (SubNodeElement)currentEntry.key; currentList = (ArrayList)currentEntry.value; lock (currentStartElement) { for (int i = 0; i < currentList.Count; i++) { currentElement = (SubNodeElement)currentList[i]; currentStartElement.PushBack(currentElement); } } } }
private void PlaceElementsInOtherZones(DOL.GS.Collections.Hashtable elements) { DOL.GS.Collections.DictionaryEntry currentEntry = null; int currentType = 0; ArrayList currentList = null; Zone currentZone = null; SubNodeElement currentElement = null; IEnumerator entryEnumerator = elements.GetEntryEnumerator(); while (entryEnumerator.MoveNext()) { currentEntry = (DOL.GS.Collections.DictionaryEntry)entryEnumerator.Current; currentType = (int)currentEntry.key; currentList = (ArrayList)currentEntry.value; for (int i = 0; i < currentList.Count; i++) { currentElement = (SubNodeElement)currentList[i]; currentZone = ZoneRegion.GetZone(currentElement.data.X, currentElement.data.Y); if (currentZone != null) { currentZone.ObjectEnterZone((eGameObjectType)currentType, currentElement); } } } }