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

◆ FindArenaHitbox()

static void Terraria.GameContent.Events.DD2Event.FindArenaHitbox ( )
inlinestatic

Definition at line 771 of file DD2Event.cs.

772 {
773 //IL_011d: Unknown result type (might be due to invalid IL or missing references)
774 //IL_0127: Unknown result type (might be due to invalid IL or missing references)
775 //IL_012c: Unknown result type (might be due to invalid IL or missing references)
776 //IL_012d: Unknown result type (might be due to invalid IL or missing references)
777 //IL_012e: Unknown result type (might be due to invalid IL or missing references)
778 //IL_012f: Unknown result type (might be due to invalid IL or missing references)
779 //IL_0134: Unknown result type (might be due to invalid IL or missing references)
780 //IL_0135: Unknown result type (might be due to invalid IL or missing references)
781 //IL_0136: Unknown result type (might be due to invalid IL or missing references)
782 //IL_0137: Unknown result type (might be due to invalid IL or missing references)
783 //IL_013c: Unknown result type (might be due to invalid IL or missing references)
784 //IL_013d: Unknown result type (might be due to invalid IL or missing references)
785 //IL_013e: Unknown result type (might be due to invalid IL or missing references)
786 //IL_013f: Unknown result type (might be due to invalid IL or missing references)
787 //IL_0144: Unknown result type (might be due to invalid IL or missing references)
788 //IL_014a: Unknown result type (might be due to invalid IL or missing references)
789 //IL_015b: Unknown result type (might be due to invalid IL or missing references)
790 //IL_016c: Unknown result type (might be due to invalid IL or missing references)
791 //IL_017d: Unknown result type (might be due to invalid IL or missing references)
792 //IL_007d: Unknown result type (might be due to invalid IL or missing references)
793 //IL_0082: Unknown result type (might be due to invalid IL or missing references)
794 //IL_0084: Unknown result type (might be due to invalid IL or missing references)
795 //IL_008a: Unknown result type (might be due to invalid IL or missing references)
796 //IL_00a1: Unknown result type (might be due to invalid IL or missing references)
797 //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
798 //IL_0095: Unknown result type (might be due to invalid IL or missing references)
799 //IL_00c0: Unknown result type (might be due to invalid IL or missing references)
800 //IL_00c5: Unknown result type (might be due to invalid IL or missing references)
801 //IL_00c7: Unknown result type (might be due to invalid IL or missing references)
802 //IL_00cd: Unknown result type (might be due to invalid IL or missing references)
803 //IL_00b2: Unknown result type (might be due to invalid IL or missing references)
804 //IL_00e4: Unknown result type (might be due to invalid IL or missing references)
805 //IL_00ea: Unknown result type (might be due to invalid IL or missing references)
806 //IL_00d8: Unknown result type (might be due to invalid IL or missing references)
807 //IL_00f5: Unknown result type (might be due to invalid IL or missing references)
809 {
811 return;
812 }
814 Vector2 vector = default(Vector2);
815 ((Vector2)(ref vector))._002Ector(float.MaxValue, float.MaxValue);
816 Vector2 vector2 = default(Vector2);
817 ((Vector2)(ref vector2))._002Ector(0f, 0f);
818 for (int i = 0; i < 200; i++)
819 {
820 NPC nPC = Main.npc[i];
821 if (nPC.active && (nPC.type == 549 || nPC.type == 548))
822 {
823 Vector2 topLeft = nPC.TopLeft;
824 if (vector.X > topLeft.X)
825 {
826 vector.X = topLeft.X;
827 }
828 if (vector.Y > topLeft.Y)
829 {
830 vector.Y = topLeft.Y;
831 }
832 topLeft = nPC.BottomRight;
833 if (vector2.X < topLeft.X)
834 {
835 vector2.X = topLeft.X;
836 }
837 if (vector2.Y < topLeft.Y)
838 {
839 vector2.Y = topLeft.Y;
840 }
841 }
842 }
843 Vector2 vector3 = new Vector2(16f, 16f) * 50f;
844 vector -= vector3;
845 vector2 += vector3;
846 Vector2 vector4 = vector2 - vector;
847 ArenaHitbox.X = (int)vector.X;
848 ArenaHitbox.Y = (int)vector.Y;
849 ArenaHitbox.Width = (int)vector4.X;
850 ArenaHitbox.Height = (int)vector4.Y;
851 }

References Terraria.GameContent.Events.DD2Event._arenaHitboxingCooldown, and Terraria.Main.npc.

Referenced by Terraria.Player.Update(), and Terraria.NPC.VanillaAI_Inner().

+ Here is the caller graph for this function: