private void UpdateLevelWave(On.RoR2.GlobalEventManager.orig_OnTeamLevelUp orig, TeamIndex teamIndex) { if (teamIndex == TeamIndex.Monster) { levelWave++; } }
private void GlobalEventManager_OnTeamLevelUp(On.RoR2.GlobalEventManager.orig_OnTeamLevelUp orig, TeamIndex teamIndex) { ReadOnlyCollection <TeamComponent> teamMembers = TeamComponent.GetTeamMembers(teamIndex); for (int i = 0; i < teamMembers.Count; i++) { TeamComponent teamComponent = teamMembers[i]; if (teamComponent) { CharacterBody characterBody = teamComponent.GetComponent <CharacterBody>(); if (characterBody) { CharacterMaster master = characterBody.master; if (master) { int nokiaItemCount = master.inventory.GetItemCount(Nokia.itemIndex); //int ancientItemCount = master.inventory.GetItemCount(BrokenScepter.itemIndex); if (nokiaItemCount > 0 && NetworkServer.active && Util.CheckRoll(50, master)) { NokiaCall(characterBody.transform, nokiaItemCount); } } } } } orig(teamIndex); }
private void RedOnLevelUp(On.RoR2.GlobalEventManager.orig_OnTeamLevelUp orig, TeamIndex teamIndex) { orig(teamIndex); if (levelWave % 5 == 0) { getNonForbiddenItem(ItemTier.Tier3); } }
private void WhiteOnLevelUp(On.RoR2.GlobalEventManager.orig_OnTeamLevelUp orig, TeamIndex teamIndex) { orig(teamIndex); if (teamIndex == TeamIndex.Monster) { getNonForbiddenItem(ItemTier.Tier1); } }
private void BossOnLevelUp(On.RoR2.GlobalEventManager.orig_OnTeamLevelUp orig, TeamIndex teamIndex) { orig(teamIndex); if (levelWave % 10 == 0) { if (teamIndex == TeamIndex.Monster) { getNonForbiddenItem(ItemTier.Boss); } } }