private void deleteReferenceFromAll(System.Object reference) { int i = 0; while (i < allReferencesDataControl.Count) { ElementContainer element = allReferencesDataControl[i]; if (!element.isPlayer() && element.getErdc().getContent() == reference) { allReferencesDataControl.RemoveAt(i); } else { i++; } } }
public void addElement(ElementContainer element) { if (element.getErdc().getType() == Controller.ITEM_REFERENCE) { itemReferencesList.Add((ElementReference)element.getErdc().getContent()); } else if (element.getErdc().getType() == Controller.ATREZZO_REFERENCE) { atrezzoReferencesList.Add((ElementReference)element.getErdc().getContent()); } else if (element.getErdc().getType() == Controller.NPC_REFERENCE) { npcReferencesList.Add((ElementReference)element.getErdc().getContent()); } allReferencesDataControl.Insert(element.getLayer(), element); reassignLayerAllReferencesDataControl(element.getLayer()); }