// Token: 0x060028EE RID: 10478 RVA: 0x000AD37F File Offset: 0x000AB57F
 private void OnBossGroupDefeatedServer(BossGroup bossGroup)
 {
     if (!this.expirationTimeStamp.hasPassed)
     {
         base.Grant();
     }
 }
Example #2
0
 public void SetHale(NetworkUser networkUser)
 {
     if (networkUser)
     {
         if (networkUsers.Contains(networkUser))
         {
             currentHale = networkUser;
             bossMemory  = new BossGroup.BossMemory()
             {
                 cachedMaster = currentHale.master,
                 cachedBody   = currentHale.GetCurrentBody()
             };
             combatSquad = new CombatSquad();
             combatSquad.AddMember(currentHale.master);
             bossGroup = new BossGroup()
             {
                 combatSquad          = this.combatSquad,
                 bestObservedName     = currentHale.userName,
                 bestObservedSubtitle = "The Boss",
             };
             bossGroup.AddBossMemory(currentHale.master);
             bossGroup.combatSquad = combatSquad;
         }
         else
         {
             Debug.LogError("Couldn't find NetworkUser" + networkUser + "in list of available NetworkUsers");
         }
     }
     else
     {
         Debug.LogError("NetworkUser " + networkUser + " does not exist!");
     }
 }
Example #3
0
 // Token: 0x060025E6 RID: 9702 RVA: 0x000AFE7A File Offset: 0x000AE07A
 private void OnBossGroupDefeatedServer(BossGroup bossGroup)
 {
     if (bossGroup.fixedAge <= 15f)
     {
         base.Grant();
     }
 }
Example #4
0
 private void BossGroup_DropRewards(On.RoR2.BossGroup.orig_DropRewards orig, BossGroup self)
 {
     if (self.dropPosition)
     {
         List <PickupIndex> list = Run.instance.availableTier2DropList;
         if (self.forceTier3Reward)
         {
             list = Run.instance.availableTier3DropList;
         }
         PickupIndex pickupIndex = self.rng.NextElementUniform <PickupIndex>(list);
         int         num         = 1 + self.bonusRewardCount;
         float       angle       = 360f / (float)num;
         Vector3     vector      = Quaternion.AngleAxis((float)UnityEngine.Random.Range(0, 360), Vector3.up) * (Vector3.up * 40f + Vector3.forward * 5f);
         Quaternion  rotation    = Quaternion.AngleAxis(angle, Vector3.up);
         int         i           = 0;
         while (i < num)
         {
             PickupIndex pickupIndex2 = pickupIndex;
             if (self.bossDrops.Count > 0 && self.rng.nextNormalizedFloat <= self.bossDropChance)
             {
                 pickupIndex2 = self.rng.NextElementUniform <PickupIndex>(self.bossDrops);
                 self.bossDrops.Remove(pickupIndex2);
             }
             PickupDropletController.CreatePickupDroplet(pickupIndex2, self.dropPosition.position, vector);
             i++;
             vector = rotation * vector;
         }
     }
 }
Example #5
0
        // Token: 0x06002324 RID: 8996 RVA: 0x00099ADC File Offset: 0x00097CDC
        private void OnClientDamageNotified(DamageDealtMessage damageDealtMessage)
        {
            if (!this.nextAllowedSourceUpdateTime.hasPassed)
            {
                return;
            }
            if (!damageDealtMessage.victim)
            {
                return;
            }
            CharacterBody component = damageDealtMessage.victim.GetComponent <CharacterBody>();

            if (!component)
            {
                return;
            }
            if (component.isBoss && damageDealtMessage.attacker == this.hud.targetBodyObject)
            {
                BossGroup bossGroup = BossGroup.FindBossGroup(component);
                if (bossGroup && bossGroup.shouldDisplayHealthBarOnHud)
                {
                    this.currentBossGroup            = bossGroup;
                    this.nextAllowedSourceUpdateTime = Run.TimeStamp.now + 1f;
                }
            }
        }
 // Token: 0x0600293D RID: 10557 RVA: 0x000ADA36 File Offset: 0x000ABC36
 private void OnBossGroupDefeatedServer(BossGroup bossGroup)
 {
     if (bossGroup.fixedTimeSinceEnabled <= 5f)
     {
         base.Grant();
     }
 }
Example #7
0
 private void BossGroup_onBossGroupStartServer(BossGroup obj)
 {
     map = new Dictionary <string, float>();
     totalDamageDealt = 0;
     bossName         = null;
     ttk.Reset();
     ttk.Start();
 }
        /// <summary>
        /// 关闭
        /// </summary>
        public async void Close()
        {
            await BoundChannel.CloseAsync();

            await BossGroup.ShutdownGracefullyAsync(TimeSpan.FromMilliseconds(100), TimeSpan.FromSeconds(1));

            await WorkerGroup.ShutdownGracefullyAsync(TimeSpan.FromMilliseconds(100), TimeSpan.FromSeconds(1));
        }
Example #9
0
            // Token: 0x060025F1 RID: 9713 RVA: 0x000B1A6C File Offset: 0x000AFC6C
            private void OnBossGroupDefeatedServer(BossGroup bossGroup)
            {
                CharacterBody currentBody = base.GetCurrentBody();

                if (currentBody && currentBody.healthComponent && currentBody.healthComponent.alive && TeleporterInteraction.instance && this.CheckTeleporter(bossGroup, TeleporterInteraction.instance))
                {
                    base.Grant();
                }
            }
Example #10
0
 private void BossGroup_OnDefeatedServer(On.RoR2.BossGroup.orig_OnDefeatedServer orig, BossGroup self)
 {
     orig(self);
     TeleporterInteraction.instance.remainingChargeTimer = 0f;
     if (BossGroup.GetTotalBossCount() == 0)
     {
         isTeleporterBossDead = true;
     }
     StartCoroutine(Coroutine_SpawnTripleShops());
 }
Example #11
0
        public async Task Stop()
        {
            await Task.WhenAll(Sockets.Select(s => s.Disconnect()));

            await Channel.CloseAsync();

            await BossGroup.ShutdownGracefullyAsync();

            await WorkerGroup.ShutdownGracefullyAsync();
        }
Example #12
0
        /// <summary>
        ///     Shutdown all workers of netty
        /// </summary>
        /// <returns></returns>
        public async Task ShutdownWorkers()
        {
            await WorkerGroup.ShutdownGracefullyAsync();

            await BossGroup.ShutdownGracefullyAsync();

            await ClusterWorkerGroup.ShutdownGracefullyAsync();

            await ClusterBossGroup.ShutdownGracefullyAsync();
        }
Example #13
0
        private void BossGroup_DropRewards(On.RoR2.BossGroup.orig_DropRewards orig, BossGroup self)
        {
            orig(self);
            var teleporter = TeleporterInteraction.instance;

            if (teleporter && self == teleporter.bossGroup)
            {
                SayMountainShrineAmount();
            }
        }
Example #14
0
        public async Task StopAsync()
        {
            Logger.LogInformation("Stopping uragano server...");
            await Channel.CloseAsync();

            await BossGroup.ShutdownGracefullyAsync(TimeSpan.FromMilliseconds(100), TimeSpan.FromSeconds(1));

            await WorkerGroup.ShutdownGracefullyAsync(TimeSpan.FromMilliseconds(100), TimeSpan.FromSeconds(1));

            Logger.LogInformation("The uragano server has stopped.");
        }
Example #15
0
        //public virtual string Name { get; } = "Unnamed Boss";


        protected void CreateBossGroup()
        {
            BossGroup bossGroup = new BossGroup()
            {
                shouldDisplayHealthBarOnHud = true,

                bestObservedName     = Name,
                bestObservedSubtitle = Subtitle,
                bossMemoryCount      = InitialBossCount
            };
        }
Example #16
0
        static BossGroup CurrentBossGroup(BossGroup inp)
        {
            if (!InstanceTracker.Any <BossGroup>())
            {
                return(null);
            }
            BossGroup        a             = null;
            List <BossGroup> instancesList = InstanceTracker.GetInstancesList <BossGroup>();
            int num = 0;

            //if (instancesList.Count == 0)
            //{
            //    bossInfo = null;
            //    return;
            //}

            for (int i = 0; i < instancesList.Count; i++)
            {
                if (instancesList[i].shouldDisplayHealthBarOnHud)
                {
                    num++;
                }
            }
            if (inp)
            {
                if (!inp.shouldDisplayHealthBarOnHud)
                {
                    a = null;
                }
            }
            if (num > 0)
            {
                if (num != 1 && inp != null)
                {
                    a = null;
                }
                for (int i = 0; i < instancesList.Count; i++)
                {
                    if (instancesList[i].shouldDisplayHealthBarOnHud)
                    {
                        a = instancesList[i];
                        break;
                    }
                }
            }
            else
            {
                a = null;
            }

            return(a);
        }
Example #17
0
 private void BossGroup_onBossGroupStartServer(BossGroup bossGroup)
 {
     if (!bossGroup.GetComponent <BossDamageTracker>())
     {
         var bdt = bossGroup.gameObject.AddComponent <BossDamageTracker>();
         bdt.bossGroup = bossGroup;
     }
     if (activeBossGroups.Count == 0)
     {
         Subscribe(true);
         //Chat.AddMessage($"Bossgroup Count: {currentBossGroupCount}");
     }
     activeBossGroups.Add(bossGroup);
 }
Example #18
0
        private void BossGroup_onBossGroupDefeatedServer(BossGroup obj)
        {
            ttk.Stop();
            foreach (KeyValuePair <string, float> kvp in map)
            {
                float   temp = (kvp.Value / totalDamageDealt) * 100;
                decimal dec  = new decimal(temp);
                Message.SendColoured(kvp.Key + " dealt " + dec + " % of " + bossName + " HP.", Colours.Red);
            }
            TimeSpan ts          = ttk.Elapsed;
            string   elapsedTime = String.Format("{0:00} minutes and {1:00} seconds",
                                                 ts.Minutes, ts.Seconds);

            Message.SendColoured("Killed " + bossName + " in: " + elapsedTime + " .", Colours.Red);
        }
 public void OnServerBossAdded(BossGroup _, CharacterMaster characterMaster)
 {
     if (IsOnVIPSelectionStage)
     {
         // FIXME: Need to kill BossGroup too
         Debug.Log("Killing boss in VIP selection stage");
         //BaseAI baseAI = characterMaster.gameObject.GetComponent<BaseAI>();
         //if (baseAI)
         //{
         //    Destroy(baseAI);
         //}
         characterMaster.DestroyBody();
         Destroy(characterMaster);
     }
 }
Example #20
0
        private void BossGroup_onBossGroupDefeatedServer(BossGroup bossGroup)
        {
            activeBossGroups.Remove(bossGroup);
            var bdt = bossGroup.gameObject.GetComponent <BossDamageTracker>();

            if (bdt)
            {
                bdt.AnnounceResults();
            }
            if (activeBossGroups.Count == 0)
            {
                Subscribe(false);
                //Chat.AddMessage("No more bossgroups!");
            }
        }
Example #21
0
        private void BossGroup_onBossGroupDefeatedServer(BossGroup obj)
        {
            if (isRoboBallBoss)
            {
                isRoboBallBoss = false;
                return;
            }

            if (InstantCharge.Value)
            {
                timeSaved = TeleporterInteraction.instance.remainingChargeTimer;
                TeleporterInteraction.instance.remainingChargeTimer = 0;
            }
            else
            {
                runUpdate = new GameObject().AddComponent <TeleportChargeMultiplier>().gameObject;
            }
        }
            void DropRewards(On.RoR2.BossGroup.orig_DropRewards orig, BossGroup bossGroup)
            {
                System.Reflection.FieldInfo info     = typeof(BossGroup).GetField("bossDrops", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
                ICollection        collection        = info.GetValue(bossGroup) as ICollection;
                List <PickupIndex> bossDrops         = new List <PickupIndex>();
                List <PickupIndex> bossDropsAdjusted = new List <PickupIndex>();

                foreach (object bossDrop in collection)
                {
                    PickupIndex pickupIndex = (PickupIndex)bossDrop;
                    bossDrops.Add(pickupIndex);
                    if (PickupCatalog.GetPickupDef(pickupIndex).itemIndex != ItemIndex.None && playerItems.Contains(pickupIndex))
                    {
                        bossDropsAdjusted.Add(pickupIndex);
                    }
                }
                int normalCount = Run.instance.availableTier2DropList.Count;

                if (bossGroup.forceTier3Reward)
                {
                    normalCount = Run.instance.availableTier3DropList.Count;
                }
                if (normalCount != 0 || bossDropsAdjusted.Count != 0)
                {
                    float bossDropChanceOld = bossGroup.bossDropChance;
                    if (normalCount == 0)
                    {
                        DropList.SetDropLists(new List <PickupIndex>(), new List <PickupIndex>(), new List <PickupIndex>(), new List <PickupIndex>());
                        bossGroup.bossDropChance = 1;
                    }
                    else if (bossDropsAdjusted.Count == 0)
                    {
                        bossGroup.bossDropChance = 0;
                    }
                    info.SetValue(bossGroup, bossDropsAdjusted);
                    orig(bossGroup);
                    info.SetValue(bossGroup, bossDrops);
                    bossGroup.bossDropChance = bossDropChanceOld;
                    if (normalCount == 0)
                    {
                        DropList.RevertDropLists();
                    }
                }
            }
Example #23
0
        public void Awake()
        {
            On.RoR2.BossGroup.Awake += (orig, self) => {
                if (BossGroup.instance == null)
                {
                    orig(self);
                }
                else
                {
                    BossGroup instance = BossGroup.instance;

                    orig(self);

                    get_instance.SetValue(null, instance);
                    List <BossGroup> temp = (List <BossGroup>)get_instancesList.GetValue(null);
                    temp.Remove(self);
                    get_instancesList.SetValue(null, temp);
                }
            };

            On.RoR2.TeleporterInteraction.OnInteractionBegin += (orig, self, interactor) => {
                orig(self, interactor);
            };

            On.RoR2.Chat.CCSay += (orig, self) => {
                orig(self);
                SetupCombatDirector();
                //Utilities.Generic.PrintFields(typeof(CombatDirector), TeleporterInteraction.instance.bossDirector);

                Utilities.Generic.PrintFields(typeof(CombatDirector), uberDirector);
                //Debug.Log( TeleporterInteraction.instance.bossDirector.moneyWaveIntervals);
                uberDirector.enabled            = true;
                uberDirector.monsterCredit     += (float)((int)(600f * Mathf.Pow(Run.instance.compensatedDifficultyCoefficient, 0.5f) * (float)(1)));
                uberDirector.currentSpawnTarget = TeleporterInteraction.instance?.gameObject;

                uberDirector.SetNextSpawnAsBoss();
                //List<BossGroup> _instancesList = (List<BossGroup>)get_instancesList.GetValue(null);
                //_instancesList.Remove(uberDirector.bossGroup);
                //get_instancesList.SetValue(null, _instancesList);
                //get_instance.SetValue(null, _instancesList[0]);
                Utilities.Generic.PrintFields(typeof(CombatDirector), uberDirector);
            };
        }
Example #24
0
            static bool Prefix(
                BossGroup __instance,
                DamageReport damageReport,
                ref List <PickupIndex> ___bossDrops,
                ref List <CharacterMaster> ___membersList,
                ref bool ___defeated,
                ref Xoroshiro128Plus ___rng
                )
            {
                if (!NetworkServer.active)
                {
                    Debug.LogWarning("[Server] function 'System.Void RoR2.BossGroup::OnCharacterDeathCallback(RoR2.DamageReport)' called on client");
                    return(false);
                }
                DamageInfo    damageInfo = damageReport.damageInfo;
                GameObject    gameObject = damageReport.victim.gameObject;
                CharacterBody component  = gameObject.GetComponent <CharacterBody>();

                if (!component)
                {
                    return(false);
                }
                CharacterMaster master = component.master;

                if (!master)
                {
                    return(false);
                }
                DeathRewards component2 = gameObject.GetComponent <DeathRewards>();

                if (component2)
                {
                    PickupIndex pickupIndex = (PickupIndex)component2.bossPickup;
                    if (pickupIndex != PickupIndex.none)
                    {
                        ___bossDrops.Add(pickupIndex);
                    }
                }
                GameObject victimMasterGameObject = master.gameObject;
                int        num = ___membersList.FindIndex((CharacterMaster x) => x.gameObject == victimMasterGameObject);

                if (num >= 0)
                {
                    typeof(BossGroup).GetMethod("RemoveMemberAt", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(__instance, new object[] { num });
                    if (!___defeated && ___membersList.Count == 0)
                    {
                        Run.instance.OnServerBossKilled(true);
                        if (component)
                        {
                            int participatingPlayerCount = Run.instance.participatingPlayerCount;
                            if (participatingPlayerCount != 0 && __instance.dropPosition)
                            {
                                ItemIndex  itemIndex = Run.instance.availableTier2DropList[___rng.RangeInt(0, Run.instance.availableTier2DropList.Count)].itemIndex;
                                int        num2      = TeleAwardInVar.Value * participatingPlayerCount * (1 + (TeleporterInteraction.instance ? TeleporterInteraction.instance.shrineBonusStacks : 0));
                                float      angle     = 360f / (float)num2;
                                Vector3    vector    = Quaternion.AngleAxis((float)UnityEngine.Random.Range(0, 360), Vector3.up) * (Vector3.up * 40f + Vector3.forward * 5f);
                                Quaternion rotation  = Quaternion.AngleAxis(angle, Vector3.up);
                                int        i         = 0;
                                while (i < num2)
                                {
                                    PickupIndex pickupIndex2 = new PickupIndex(itemIndex);
                                    if (___bossDrops.Count > 0 && ___rng.nextNormalizedFloat <= __instance.bossDropChance)
                                    {
                                        pickupIndex2 = ___bossDrops[___rng.RangeInt(0, ___bossDrops.Count)];
                                    }
                                    PickupDropletController.CreatePickupDroplet(pickupIndex2, __instance.dropPosition.position, vector);
                                    i++;
                                    vector = rotation * vector;
                                }
                            }
                        }
                        ___defeated = true;
                        typeof(BossGroup).Raise("onBossGroupDefeatedServer", __instance);
                        return(false);
                    }
                    else
                    {
                        Run.instance.OnServerBossKilled(false);
                    }
                }
                return(false);
            }
Example #25
0
        // Token: 0x06002062 RID: 8290 RVA: 0x00098894 File Offset: 0x00096A94
        private void Update()
        {
            this.fpsStopwatch        += Time.unscaledDeltaTime;
            this.fpsDisplayStopwatch += Time.unscaledDeltaTime;
            float num = 1f / Time.unscaledDeltaTime;

            if (this.fpsStopwatch >= 1f / this.fpsAverageFrequency)
            {
                this.fpsStopwatch = 0f;
                DebugStats.fpsTimestamps.Enqueue(num);
                if (DebugStats.fpsTimestamps.Count > this.fpsTimestampCount)
                {
                    DebugStats.fpsTimestamps.Dequeue();
                }
            }
            if (this.fpsDisplayStopwatch > this.fpsAverageDisplayUpdateFrequency)
            {
                this.fpsDisplayStopwatch = 0f;
                float averageFPS = this.GetAverageFPS();
                this.fpsAverageText.text = string.Concat(new string[]
                {
                    "FPS: ",
                    Mathf.Round(num).ToString(),
                    " (",
                    averageFPS.ToString(),
                    ")"
                });
                TextMeshProUGUI textMeshProUGUI = this.fpsAverageText;
                textMeshProUGUI.text = string.Concat(new string[]
                {
                    textMeshProUGUI.text,
                    "\n ms: ",
                    (Mathf.Round(100000f / num) / 100f).ToString(),
                    "(",
                    (Mathf.Round(100000f / averageFPS) / 100f).ToString(),
                    ")"
                });
            }
            this.budgetStopwatch        += Time.unscaledDeltaTime;
            this.budgetDisplayStopwatch += Time.unscaledDeltaTime;
            float num2 = (float)VFXBudget.totalCost;

            if (this.budgetStopwatch >= 1f / this.budgetAverageFrequency)
            {
                this.budgetStopwatch = 0f;
                DebugStats.budgetTimestamps.Enqueue(num2);
                if (DebugStats.budgetTimestamps.Count > this.budgetTimestampCount)
                {
                    DebugStats.budgetTimestamps.Dequeue();
                }
            }
            if (this.budgetDisplayStopwatch > 1f)
            {
                this.budgetDisplayStopwatch = 0f;
                float averageParticleCost = this.GetAverageParticleCost();
                this.budgetAverageText.text = string.Concat(new string[]
                {
                    "Particle Cost: ",
                    Mathf.Round(num2).ToString(),
                    " (",
                    averageParticleCost.ToString(),
                    ")"
                });
            }
            if (this.teamText)
            {
                string str  = "Allies: " + TeamComponent.GetTeamMembers(TeamIndex.Player).Count + "\n";
                string str2 = "Enemies: " + TeamComponent.GetTeamMembers(TeamIndex.Monster).Count + "\n";
                string str3 = "Bosses: " + BossGroup.GetTotalBossCount() + "\n";
                string text = "Directors:";
                foreach (CombatDirector combatDirector in CombatDirector.instancesList)
                {
                    string text2 = "\n==[" + combatDirector.gameObject.name + "]==";
                    if (combatDirector.enabled)
                    {
                        string text3 = "\n - Credit: " + combatDirector.monsterCredit.ToString();
                        string text4 = "\n - Target: " + (combatDirector.currentSpawnTarget ? combatDirector.currentSpawnTarget.name : "null");
                        string text5 = "\n - Last Spawn Card: ";
                        if (combatDirector.lastAttemptedMonsterCard != null && combatDirector.lastAttemptedMonsterCard.spawnCard)
                        {
                            text5 += combatDirector.lastAttemptedMonsterCard.spawnCard.name;
                        }
                        string text6 = "\n - Reroll Timer: " + Mathf.Round(combatDirector.monsterSpawnTimer);
                        text2 = string.Concat(new string[]
                        {
                            text2,
                            text3,
                            text4,
                            text5,
                            text6
                        });
                    }
                    else
                    {
                        text2 += " (Off)";
                    }
                    text = text + text2 + "\n \n";
                }
                this.teamText.text = str + str2 + str3 + text;
            }
        }
Example #26
0
 private static void BossGroup_DropRewards(On.RoR2.BossGroup.orig_DropRewards orig, BossGroup self)
 {
     ItemDropAPI.BossDropParticipatingPlayerCount = BossItems;
     orig(self);
 }
Example #27
0
 private void BossGroup_OnDefeatedServer(On.RoR2.BossGroup.orig_OnDefeatedServer orig, BossGroup self)
 {
     orig(self);
     TeleporterInteraction.instance.remainingChargeTimer = 0f;
 }
Example #28
0
        private void BossGroup_DropRewards(On.RoR2.BossGroup.orig_DropRewards orig, BossGroup self)
        {
            if (Run.instance.participatingPlayerCount > 0 && self.dropPosition)
            {
                Stack <PickupIndex> itemDrops = new Stack <PickupIndex>();                                                                                  //one entry per item to be dropped.
                int baseDropCount             = (1 + self.bonusRewardCount) * (self.scaleRewardsByPlayerCount ? Run.instance.participatingPlayerCount : 1); //base drop count

                //Add items to the drop table;

                PickupIndex t1, t2, t3, tboss;
                t1 = self.rng.NextElementUniform <PickupIndex>(Run.instance.availableTier1DropList);
                t2 = self.rng.NextElementUniform <PickupIndex>(Run.instance.availableTier2DropList);
                t3 = self.rng.NextElementUniform <PickupIndex>(Run.instance.availableTier3DropList);
                if (self.bossDrops.Count > 0)   //Boss drops not guaranteed.
                {
                    tboss = self.rng.NextElementUniform <PickupIndex>(self.bossDrops);
                }
                else
                {
                    tboss = t2;
                }

#if DEBUG
                Logger.LogWarning($"TELEPDROP::BossGroup..()| t1.Value: {t1.pickupDef.nameToken}");
                Logger.LogWarning($"TELEPDROP::BossGroup..()| t2.Value: {t2.pickupDef.nameToken}");
                Logger.LogWarning($"TELEPDROP::BossGroup..()| t3.Value: {t3.pickupDef.nameToken}");
                Logger.LogWarning($"TELEPDROP::BossGroup..()| tboss.Value: {tboss.pickupDef.nameToken}");
#endif

                if (TeleporterConfig.DropUniformity)    //only one item type
                {
#if DEBUG
                    Logger.LogWarning($"TELEPDROP::BossGroup..()| Using DropUniformity");
#endif
                    PickupIndex itemPI;
                    int         mult = 0;
                    switch (GetWeightedChance(WeightedTiers))
                    {
                    case ItemTier.Tier1:
                        itemPI = t1;
                        mult   = TeleporterConfig.Tier1DropMultiplier;
                        break;

                    case ItemTier.Tier2:
                        itemPI = t2;
                        mult   = TeleporterConfig.Tier2DropMultiplier;
                        break;

                    case ItemTier.Tier3:
                        itemPI = t3;
                        mult   = TeleporterConfig.Tier3DropMultiplier;
                        break;

                    case ItemTier.Boss:
                        itemPI = tboss;
                        mult   = TeleporterConfig.TierBossDropMultiplier;
                        break;

                    default:
                        itemPI = t2;
                        mult   = TeleporterConfig.Tier2DropMultiplier;
                        break;
                    }


                    for (int i = 0; i < baseDropCount * mult; i++)
                    {
                        itemDrops.Push(itemPI);
                    }
                }
                else
                {
#if DEBUG
                    Logger.LogWarning($"TELEPDROP::BossGroup...()| Not-using DropUniformity.");
#endif
                    for (int i = 0; i < baseDropCount; i++)
                    {
                        PickupIndex itemPI;
                        int         mult = 0;
                        switch (GetWeightedChance(WeightedTiers))
                        {
                        case ItemTier.Tier1:
                            itemPI = t1;
                            mult   = TeleporterConfig.Tier1DropMultiplier;
                            break;

                        case ItemTier.Tier2:
                            itemPI = t2;
                            mult   = TeleporterConfig.Tier2DropMultiplier;
                            break;

                        case ItemTier.Tier3:
                            itemPI = t3;
                            mult   = TeleporterConfig.Tier3DropMultiplier;
                            break;

                        case ItemTier.Boss:
                            itemPI = tboss;
                            mult   = TeleporterConfig.TierBossDropMultiplier;
                            break;

                        default:
                            itemPI = t2;
                            mult   = TeleporterConfig.Tier2DropMultiplier;
                            break;
                        }
                        for (int j = 0; j < mult; j++)
                        {
                            itemDrops.Push(itemPI);
                        }
                    }
                }

                float      angle    = 360f / (float)itemDrops.Count;
                Vector3    vector   = Quaternion.AngleAxis((float)UnityEngine.Random.Range(0, 360), Vector3.up) * (Vector3.up * 40f + Vector3.forward * 5f);
                Quaternion rotation = Quaternion.AngleAxis(angle, Vector3.up);

                while (itemDrops.Count > 0)
                {
#if DEBUG
                    Logger.LogWarning($"TELEPDROP::BossGroup...()| Item to spawn: {itemDrops.Peek().pickupDef.nameToken}");
#endif
                    PickupDropletController.CreatePickupDroplet(itemDrops.Pop(), self.dropPosition.position, vector);
                    vector = rotation * vector;
                }
            }
        }
 // Token: 0x060028EC RID: 10476 RVA: 0x000AD34F File Offset: 0x000AB54F
 private void OnBossGroupStartServer(BossGroup bossGroup)
 {
     this.listenForBossDamage.SetActive(true);
 }
        private void OnServerBossDefeated(Run.orig_OnServerBossDefeated orig, RoR2.Run self, BossGroup bossGroup)
        {
            var remainingChargeTimer = RoR2.TeleporterInteraction.instance.remainingChargeTimer;

            if (remainingChargeTimer > 0)
            {
                var diff = (float)(remainingChargeTimer * 0.1);

                self.fixedTime += diff;
                self.time      += diff;
                TeleporterInteraction.instance.remainingChargeTimer = diff;
            }
        }