83117 {
83118
83119
83120
83121
83122
83123
83124
83125
83126
83127
83128
83129
83130
83131
83132
83133
83134
83135
83136
83137
83138
83139
83140
83141
83142
83143
83144
83145
83146
83147
83153 {
83155 }
83157 float num4 = 9999999
f;
83158 for (int i = 0; i < 255; i++)
83159 {
83160 Player player = Main.player[i];
83161 if (!player.active || player.dead || player.ghost)
83162 {
83163 continue;
83164 }
83165 float num5 = Vector2.Distance(
center, player.Center);
83166 num5 -= (float)player.aggro;
83167 bool flag2 = player.npcTypeNoAggro[
type];
83169 {
83171 }
83173 {
83177 }
83178 if (player.tankPet >= 0 && !
flag2)
83179 {
83180 num5 = Vector2.Distance(
center, Main.projectile[player.tankPet].Center);
83182 if (
num5 <
num4 &&
num5 < 200
f && Collision.CanHit(
base.Center, 0, 0, Main.projectile[player.tankPet].Center, 0, 0))
83183 {
83184 num2 = player.tankPet;
83186 }
83187 }
83188 }
83189 for (
int j = 0;
j < 200;
j++)
83190 {
83192 if (
nPC.active &&
nPC.type == 548)
83193 {
83196 {
83201 }
83202 }
83203 }
83204 if (
num4 == 9999999
f)
83205 {
83206 return;
83207 }
83209 {
83210 target = Main.npc[
num3].WhoAmIToTargettingIndex;
83214 return;
83215 }
83217 {
83222 return;
83223 }
83225 {
83227 }
83232 {
83234 }
83236 {
83240 {
83243 }
83244 }
83245 }
int width
The width of this Entity's hitbox, in pixels.
int height
The height of this Entity's hitbox, in pixels.
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....