public static void AddContainedRabbitHolesToLot(ComboRabbitHole comboRH) { foreach (RabbitHole rH in comboRH.ContainedRabbitholes.Keys) { if (rH.LotCurrent == comboRH.LotCurrent) { return; } LotManager.AddObjectToLot(rH, rH.ObjectId, comboRH.LotCurrent.LotId, 0, 0, null); rH.AddToWorld(); comboRH.MetaAds.AddRange(rH.MetaAds); rH.MetaAds.Clear(); } }
public static void AddContainedRabbitHolesToLot(ComboRabbitHole comboRH) { if (comboRH == null) { return; } if (comboRH.ContainedRabbitholes == null) { return; } if (comboRH.LotCurrent == null) { return; } foreach (RabbitHole rH in comboRH.ContainedRabbitholes.Keys) { if (rH.LotCurrent == comboRH.LotCurrent) { return; } LotManager.AddObjectToLot(rH, rH.ObjectId, comboRH.LotCurrent.LotId, 0, 0, null); rH.AddToWorld(); if (comboRH.MetaAds == null) { comboRH.mMetaAds = new ArrayList(); } comboRH.MetaAds.AddRange(rH.MetaAds); rH.MetaAds.Clear(); if (rH is ITheatre) { MetaAutonomyTuning tuning = MetaAutonomyManager.GetTuning(MetaAutonomyVenueType.Theatre); if (tuning != null) { MethodInfo info = Type.GetType("NRaas.OverwatchSpace.Loadup.FixComboRabbitHoleMetaAds,NRaasOverwatch").GetMethod("IsShowing"); tuning.DesiredSimFunction = info; } } } }