85530 {
85531
85532
85533
85534
85535
85536
85537
85538
85539
85540 if (!Main.npc[i].active)
85541 {
85542 return;
85543 }
85545 {
85546 who = Main.myPlayer;
85547 }
85548 if (Main.netMode == 1)
85549 {
85550 Main.npc[i].active = false;
85551 NetMessage.SendData(70, -1, -1,
null, i,
who);
85552 }
85553 else if (Main.npc[i].catchItem > 0)
85554 {
85555 if (Main.npc[i].type == 687)
85556 {
85557 Main.npc[i].TryTeleportingCaughtMysticFrog();
85558 }
85559 else if (Main.npc[i].SpawnedFromStatue)
85560 {
85561 Vector2
vector = Main.npc[i].Center -
new Vector2(20
f);
85562 Utils.PoofOfSmoke(
vector);
85563 Main.npc[i].active = false;
85564 NetMessage.SendData(23, -1, -1, null, i);
85565 NetMessage.SendData(106, -1, -1,
null, (
int)
vector.X,
vector.Y);
85566 }
85567 else
85568 {
85569 int itemWhoAmI = Item.NewItem(
GetSpawnSource_NPCCatch(
who, Main.npc[i]), (
int)Main.player[
who].Center.X, (
int)Main.player[
who].Center.Y, 0, 0, Main.npc[i].catchItem, 1,
noBroadcast:
true, 0, noGrabDelay:
true);
85570 NetMessage.SendData(21, -1, -1,
null,
itemWhoAmI, 1
f);
85571 Main.npc[i].active = false;
85572 NetMessage.SendData(23, -1, -1, null, i);
85573 }
85574 }
85575 }
static IEntitySource GetSpawnSource_NPCCatch(int whoCaughtIt, Entity caughtEntity)