85762 {
85764 if (Main.netMode == 1)
85765 {
85766 NetMessage.SendData(71, -1, -1, null, x, y, Type, Style);
85767 }
85768 else if (Type >= 0 && (Main.npcCatchable[Type] ||
who == Main.myPlayer) &&
CanReleaseNPCs(
who))
85769 {
85770 switch (Type)
85771 {
85772 case 583:
85773 case 584:
85774 case 585:
85776 Main.npc[
num].releaseOwner = (short)
who;
85777 Main.npc[
num].ai[2] = 2
f;
85778 Main.npc[
num].TargetClosest();
85779 Main.npc[
num].ai[3] = 0
f;
85780 Main.npc[
num].netUpdate =
true;
85781 break;
85782 case 356:
85784 Main.npc[
num].ai[2] = Style;
85785 Main.npc[
num].releaseOwner = (short)
who;
85786 break;
85787 case 148:
85788 {
85789 int num3 = Type + Main.rand.Next(2);
85791 Main.npc[
num].releaseOwner = (short)
who;
85792 break;
85793 }
85794 case 614:
85795 {
85797 Main.npc[
num].releaseOwner = (short)
who;
85798 int num2 = Main.player[
who].direction;
85799 if (Style > 2)
85800 {
85801 Style -= 2;
85802 Main.npc[
num].SpawnedFromStatue =
true;
85803 Main.npc[
num].CanBeReplacedByOtherNPCs =
true;
85804 }
85805 if (Style == 1)
85806 {
85808 }
85809 if (Style == 2)
85810 {
85812 }
85813 Main.npc[
num].direction =
num2;
85814 Main.npc[
num].spriteDirection =
num2;
85815 Main.npc[
num].netUpdate =
true;
85816 break;
85817 }
85818 default:
85820 Main.npc[
num].releaseOwner = (short)
who;
85821 break;
85822 }
85823 }
85825 }
static bool CanReleaseNPCs(int who)
static int NewNPC(IEntitySource source, int X, int Y, int Type, int Start=0, float ai0=0f, float ai1=0f, float ai2=0f, float ai3=0f, int Target=255)
Spawns an NPC into the game world with the given type. This method should not be called on multipla...
static IEntitySource GetSpawnSource_NPCRelease(int whoReleasedIt)