Definition at line 13811 of file NPC.cs.
13812 {
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823 int num = (int)
base.Center.X / 16;
13824 int num2 = (int)
base.Center.Y / 16;
13829 {
13832 }
13833 Rectangle
rectangle =
default(Rectangle);
13835 {
13839 {
13841 {
13842 continue;
13843 }
13845 if ((
type == 32 || (
type >= 281 &&
type <= 286)) && !Main.wallDungeon[Main.tile[
num5, i - 1].wall])
13846 {
13848 {
13850 }
13851 }
13852 else if (Main.tile[
num5, i - 1].lava())
13853 {
13855 }
13857 {
13858 continue;
13859 }
13862 for (
int j = 0;
j < Main.player.Length;
j++)
13863 {
13864 Player player = Main.player[
j];
13865 if (player != null && player.active && !player.DeadOrGhost)
13866 {
13867 Rectangle
value = player.Hitbox;
13868 Rectangle
value2 =
value.Modified((
int)(player.velocity.X *
num4), (
int)(player.velocity.Y *
num4), 0, 0);
13871 {
13874 break;
13875 }
13876 }
13877 }
13879 {
13882 }
13883 break;
13884 }
13885 }
13887 }
float value
How many copper coins the NPC will drop when killed (100 copper coins = 1 silver coin etc....
static bool AnyNPCs(int Type)
Returns true if there are any active NPC in the world of the given NPC type (F:Terraria....
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....
References Terraria.Entity.active, Terraria.NPC.AnyNPCs(), Terraria.Player.DeadOrGhost, Terraria.Entity.Hitbox, Terraria.Main.player, Terraria.Main.rand, Terraria.Collision.SolidTiles(), Terraria.Main.tile, Terraria.Main.tileSolid, Terraria.NPC.type, Terraria.NPC.value, and Terraria.Main.wallDungeon.
Referenced by Terraria.NPC.AI_003_Fighters(), and Terraria.NPC.VanillaAI_Inner().