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

◆ BloodNautilus_CallForHelp()

void Terraria.NPC.BloodNautilus_CallForHelp ( )
inlineprivate

Definition at line 49515 of file NPC.cs.

49516 {
49517 //IL_003b: Unknown result type (might be due to invalid IL or missing references)
49518 //IL_005b: Unknown result type (might be due to invalid IL or missing references)
49519 //IL_0060: Unknown result type (might be due to invalid IL or missing references)
49520 //IL_0065: Unknown result type (might be due to invalid IL or missing references)
49521 //IL_0066: Unknown result type (might be due to invalid IL or missing references)
49522 //IL_0067: Unknown result type (might be due to invalid IL or missing references)
49523 //IL_0089: Unknown result type (might be due to invalid IL or missing references)
49524 //IL_0091: Unknown result type (might be due to invalid IL or missing references)
49525 //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
49526 //IL_00af: Unknown result type (might be due to invalid IL or missing references)
49527 //IL_00c2: Unknown result type (might be due to invalid IL or missing references)
49528 //IL_00f9: Unknown result type (might be due to invalid IL or missing references)
49529 //IL_00cf: Unknown result type (might be due to invalid IL or missing references)
49530 //IL_0105: Unknown result type (might be due to invalid IL or missing references)
49531 //IL_00dc: Unknown result type (might be due to invalid IL or missing references)
49532 //IL_0111: Unknown result type (might be due to invalid IL or missing references)
49533 //IL_00e9: Unknown result type (might be due to invalid IL or missing references)
49534 //IL_011d: Unknown result type (might be due to invalid IL or missing references)
49535 //IL_0190: Unknown result type (might be due to invalid IL or missing references)
49536 //IL_01a3: Unknown result type (might be due to invalid IL or missing references)
49537 if (Main.netMode == 1 || !Main.player[target].active || Main.player[target].dead || Distance(Main.player[target].Center) > 2000f || CountNPCS(619) >= 3)
49538 {
49539 return;
49540 }
49541 Point point = base.Center.ToTileCoordinates();
49542 Point point2 = point;
49543 int num = 20;
49544 int num2 = 3;
49545 int num3 = 8;
49546 int num4 = 2;
49547 int num5 = 0;
49548 bool flag = false;
49549 while (!flag && num5 < 100)
49550 {
49551 num5++;
49552 int num6 = Main.rand.Next(point2.X - num, point2.X + num + 1);
49553 int num7 = Main.rand.Next(point2.Y - num, point2.Y + num + 1);
49555 {
49556 bool flag2 = true;
49557 if (flag2 && Main.tile[num6, num7].lava())
49558 {
49559 flag2 = false;
49560 }
49561 if (flag2 && Collision.SolidTiles(num6 - num4, num6 + num4, num7 - num4, num7 + num4))
49562 {
49563 flag2 = false;
49564 }
49565 if (flag2 && !Collision.CanHitLine(base.Center, 0, 0, Main.player[target].Center, 0, 0))
49566 {
49567 flag2 = false;
49568 }
49569 if (flag2)
49570 {
49571 Projectile.NewProjectile(GetSpawnSource_ForProjectile(), num6 * 16 + 8, num7 * 16 + 8, 0f, 0f, 813, 0, 0f, Main.myPlayer);
49572 flag = true;
49573 break;
49574 }
49575 }
49576 }
49577 }
float Distance(Vector2 Other)
Definition Entity.cs:275
static int CountNPCS(int Type)
Returns the number of active NPC in the world of the given NPC type (F:Terraria.NPC....
Definition NPC.cs:106585
IEntitySource GetSpawnSource_ForProjectile()
Definition NPC.cs:107558
int target
Definition NPC.cs:1019

References Terraria.Collision.CanHitLine(), Terraria.NPC.CountNPCS(), Terraria.Entity.Distance(), Terraria.NPC.GetSpawnSource_ForProjectile(), Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.Projectile.NewProjectile(), Terraria.Main.player, Terraria.Main.rand, Terraria.Collision.SolidTiles(), Terraria.NPC.target, and Terraria.Main.tile.

Referenced by Terraria.NPC.AI_117_BloodNautilus().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: