Esempio n. 1
0
 // Token: 0x0600056D RID: 1389 RVA: 0x000160D8 File Offset: 0x000142D8
 private static void RegisterElite(EliteIndex eliteIndex, EliteDef eliteDef)
 {
     if (eliteIndex < EliteIndex.Count)
     {
         eliteDef.name = eliteIndex.ToString();
     }
     eliteDef.eliteIndex = eliteIndex;
     EliteCatalog.eliteList.Add(eliteIndex);
     EliteCatalog.eliteDefs[(int)eliteIndex] = eliteDef;
 }
Esempio n. 2
0
        private static void CCNextBoss(ConCommandArgs args)
        {
            //Log.MessageNetworked("This feature is currently not working. We'll hopefully provide an update to this soon.", args);
            //return;
            Log.MessageNetworked(Lang.PARTIALIMPLEMENTATION_WARNING, args, LogLevel.MessageClientOnly);
            if (args.Count == 0)
            {
                Log.MessageNetworked(Lang.NEXTBOSS_ARGS, args);
            }
            StringBuilder s = new StringBuilder();

            if (args.Count >= 1)
            {
                try
                {
                    nextBoss = StringFinder.Instance.GetDirectorCardFromPartial(args[0]);
                    s.AppendLine($"Next boss is: {nextBoss.spawnCard.name}. ");
                    if (args.Count >= 2)
                    {
                        if (!int.TryParse(args[1], out nextBossCount))
                        {
                            Log.MessageNetworked(Lang.COUNTISNUMERIC, args, LogLevel.MessageClientOnly);
                            nextBossCount = 1;
                        }
                        else
                        {
                            if (nextBossCount > 6)
                            {
                                nextBossCount = 6;
                            }
                            else if (nextBossCount <= 0)
                            {
                                nextBossCount = 1;
                            }
                            s.Append($"Count:  {nextBossCount}. ");
                            if (args.Count >= 3)
                            {
                                nextBossElite = StringFinder.GetEnumFromPartial <EliteIndex>(args[2]);
                                s.Append("Elite: " + nextBossElite.ToString());
                            }
                        }
                    }
                    On.RoR2.CombatDirector.SetNextSpawnAsBoss += Hooks.CombatDirector_SetNextSpawnAsBoss;
                    Log.MessageNetworked(s.ToString(), args);
                }
                catch (Exception ex)
                {
                    Log.MessageNetworked(Lang.OBJECT_NOTFOUND + args[0], args, LogLevel.ErrorClientOnly);
                    Log.MessageNetworked(ex.ToString(), args, LogLevel.ErrorClientOnly);
                }
            }
        }
Esempio n. 3
0
 private static void CCNextBoss(ConCommandArgs args)
 {
     Log.Message(MagicVars.PARTIAL_IMPLEMENTATION);
     if (args.Count == 0)
     {
         Log.Message(MagicVars.NEXTBOSS_ARGS);
     }
     if (args.Count >= 1)
     {
         try
         {
             RoR2Cheats.nextBoss = Alias.Instance.GetDirectorCardFromPartial(args[0]);
             Log.Message($"Next boss is: {RoR2Cheats.nextBoss.spawnCard.name}");
             if (args.Count >= 2)
             {
                 if (!int.TryParse(args[1], out nextBossCount))
                 {
                     Log.Message(MagicVars.COUNTISNUMERIC);
                     return;
                 }
                 else
                 {
                     if (nextBossCount > 6)
                     {
                         nextBossCount = 6;
                     }
                     else if (nextBossCount <= 0)
                     {
                         nextBossCount = 1;
                     }
                     Log.Message("Count: " + nextBossCount);
                     if (args.Count >= 3)
                     {
                         nextBossElite = Alias.GetEnumFromPartial <EliteIndex>(args[2]);
                         Log.Message("Elite: " + nextBossElite.ToString());
                     }
                 }
             }
             nextBossSet = true;
         }
         catch (Exception ex)
         {
             Log.Message(MagicVars.OBJECT_NOTFOUND + args[0]);
             Log.Message(ex);
         }
     }
 }