TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ SetWorldSpecificMonstersByWorldID()

static void Terraria.NPC.SetWorldSpecificMonstersByWorldID ( )
inlinestatic

Definition at line 13034 of file NPC.cs.

13035 {
13036 UnifiedRandom unifiedRandom = new UnifiedRandom(Main.worldID);
13037 int num = unifiedRandom.Next(3);
13038 int num2 = unifiedRandom.Next(3);
13039 while (num == num2)
13040 {
13041 num = unifiedRandom.Next(3);
13042 }
13043 for (int i = 0; i < 2; i++)
13044 {
13045 int num3 = num;
13046 if (i == 1)
13047 {
13048 num3 = num2;
13049 }
13050 for (int j = 0; j < 3; j++)
13051 {
13052 switch (num3)
13053 {
13054 case 0:
13055 cavernMonsterType[i, j] = unifiedRandom.Next(494, 496);
13056 break;
13057 case 1:
13058 cavernMonsterType[i, j] = unifiedRandom.Next(496, 498);
13059 break;
13060 default:
13061 cavernMonsterType[i, j] = unifiedRandom.Next(498, 507);
13062 break;
13063 }
13064 }
13065 }
13066 }
static int[,] cavernMonsterType
Definition NPC.cs:1221

References Terraria.NPC.cavernMonsterType, and Terraria.Main.worldID.

Referenced by Terraria.IO.WorldFile.LoadWorld().

+ Here is the caller graph for this function: