private void FillProcessorMap() { if (this.processorMap.Count > 0) { Service.Get <StaRTSLogger>().Error("Attempting to fill an already-full processorMap!"); } CurrentPlayer currentPlayer = Service.Get <CurrentPlayer>(); string planetId = currentPlayer.PlanetId; if (currentPlayer.Objectives.ContainsKey(planetId)) { ObjectiveGroup objectiveGroup = currentPlayer.Objectives[planetId]; int i = 0; int count = objectiveGroup.ProgressObjects.Count; while (i < count) { ObjectiveProgress objectiveProgress = objectiveGroup.ProgressObjects[i]; if (objectiveProgress.State == ObjectiveState.Active) { AbstractObjectiveProcessor processor = ObjectiveFactory.GetProcessor(objectiveProgress.VO, this); this.processorMap.Add(processor, objectiveProgress); } i++; } } }
public unsafe static long $Invoke0(long instance, long *args) { return(GCHandledObjects.ObjectToGCHandle(ObjectiveFactory.GetProcessor((ObjectiveVO)GCHandledObjects.GCHandleToObject(*args), (ObjectiveManager)GCHandledObjects.GCHandleToObject(args[1])))); }