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

◆ SpawnAllowed_ArmsDealer()

static bool Terraria.NPC.SpawnAllowed_ArmsDealer ( )
inlinestatic

Definition at line 1937 of file NPC.cs.

1938 {
1940 {
1941 return true;
1942 }
1943 for (int i = 0; i < 255; i++)
1944 {
1945 Player player = Main.player[i];
1946 if (!player.active)
1947 {
1948 continue;
1949 }
1950 for (int j = 0; j < 58; j++)
1951 {
1952 Item item = player.inventory[j];
1953 if (item != null && item.stack > 0 && (item.ammo == AmmoID.Bullet || item.useAmmo == AmmoID.Bullet))
1954 {
1955 return true;
1956 }
1957 }
1958 }
1959 return false;
1960 }
static int Bullet
Definition AmmoID.cs:143
AmmoID entries represent ammo types. Ammo items that share the same AmmoID value assigned to F:Terrar...
Definition AmmoID.cs:11
static bool unlockedArmsDealerSpawn
Definition NPC.cs:772

References Terraria.Entity.active, Terraria.Item.ammo, Terraria.ID.AmmoID.Bullet, Terraria.Player.inventory, Terraria.Main.player, Terraria.Item.stack, Terraria.NPC.unlockedArmsDealerSpawn, and Terraria.Item.useAmmo.

Referenced by Terraria.Main.UpdateTime_SpawnTownNPCs().

+ Here is the caller graph for this function: