public static int Hook_AfterPlacement(int i, int j, int type, int style, int direction)
 {
     if (Main.netMode == NetmodeID.MultiplayerClient)
     {
         NetMessage.SendTileRange(Main.myPlayer, i, j, 1, 1);
         NetHelper.SendSearchAndRefresh(i, j);
         return(0);
     }
     TEStorageComponent.SearchAndRefreshNetwork(new Point16(i, j));
     return(0);
 }
 public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
 {
     if (fail || effectOnly)
     {
         return;
     }
     TStorageComponent.killTile = new Point16(i, j);
     if (Main.netMode == NetmodeID.MultiplayerClient)
     {
         NetHelper.SendSearchAndRefresh(TStorageComponent.killTile.X, TStorageComponent.killTile.Y);
         MagicStorageTwo.Instance.guiM.Refresh();
     }
     else
     {
         TEStorageComponent.SearchAndRefreshNetwork(TStorageComponent.killTile);
     }
     TStorageComponent.killTile = new Point16(-1, -1);
 }
Beispiel #3
0
        public override void KillMultiTile(int i, int j, int frameX, int frameY)
        {
            Item.NewItem(i * 16, j * 16, 32, 32, ItemType(frameX, frameY));
            killTile = new Point16(i, j);
            ModTileEntity tileEntity = GetTileEntity();

            if (tileEntity != null)
            {
                tileEntity.Kill(i, j);
            }
            else
            {
                if (Main.netMode == NetmodeID.MultiplayerClient)
                {
                    NetHelper.SendSearchAndRefresh(killTile.X, killTile.Y);
                }
                else
                {
                    TEStorageComponent.SearchAndRefreshNetwork(killTile);
                }
            }
            killTile = new Point16(-1, -1);
        }