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

◆ PrefixItemFromOptions()

static void Terraria.WorldGen.PrefixItemFromOptions ( Item item,
int[] options )
inlinestaticprivate

Definition at line 18349 of file WorldGen.cs.

18350 {
18351 int prefix = item.prefix;
18352 if (!item.Prefix(-3))
18353 {
18354 return;
18355 }
18356 List<int> list = new List<int>(options);
18357 while (list.Count > 0)
18358 {
18359 int index = _genRand.Next(list.Count);
18360 int num = list[index];
18361 item.Prefix(num);
18362 if (item.prefix == num)
18363 {
18364 return;
18365 }
18366 list.RemoveAt(index);
18367 }
18368 item.Prefix(prefix);
18369 }
static UnifiedRandom _genRand
Definition WorldGen.cs:1249

References Terraria.Utilities.UnifiedRandom.Next(), Terraria.Item.prefix, and Terraria.Item.Prefix().

+ Here is the call graph for this function: