82980 {
82981 if (Main.netMode == 1 || !Main.hardMode)
82982 {
82983 return false;
82984 }
82985 int num = Chest.FindChest(x, y);
82987 {
82988 return false;
82989 }
82993 for (int i = 0; i < 40; i++)
82994 {
82995 ushort
num5 = Main.tile[Main.chest[
num].x, Main.chest[
num].y].type;
82996 int num6 = Main.tile[Main.chest[
num].x, Main.chest[
num].y].frameX / 36;
82998 {
82999 if (Main.chest[
num].item[i].type == 3092)
83000 {
83001 num2 += Main.chest[
num].item[i].stack;
83002 }
83003 else if (Main.chest[
num].item[i].type == 3091)
83004 {
83005 num3 += Main.chest[
num].item[i].stack;
83006 }
83007 else
83008 {
83010 }
83011 }
83012 }
83014 {
83017 {
83018 if (Main.tile[x, y].frameX % 36 != 0)
83019 {
83020 x--;
83021 }
83022 if (Main.tile[x, y].frameY % 36 != 0)
83023 {
83024 y--;
83025 }
83026 int number = Chest.FindChest(x, y);
83027 for (
int j = 0;
j < 40;
j++)
83028 {
83029 Main.chest[
num].item[
j] =
new Item();
83030 }
83031 Chest.DestroyChest(x, y);
83032 for (
int k = x;
k <= x + 1;
k++)
83033 {
83034 for (
int l = y;
l <= y + 1;
l++)
83035 {
83037 {
83038 Main.tile[
k,
l].ClearTile();
83039 }
83040 }
83041 }
83043 if (Main.tile[x, y].type == 467)
83044 {
83046 }
83048 {
83050 }
83051 NetMessage.SendData(34, -1, -1,
null,
number2, x, y, 0
f,
number, Main.tile[x, y].type);
83052 NetMessage.SendTileSquare(-1, x, y, 3);
83053 }
83056 {
83058 }
83059 int num8 =
NewNPC(
user.GetNPCSource_TileInteraction(x, y), x * 16 + 16, y * 16 + 32,
num7);
83061 NetMessage.SendData(23, -1, -1,
null,
num8);
83062 Main.npc[
num8].BigMimicSpawnSmoke();
83063 }
83064 return false;
83065 }
static readonly ushort Count
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...