Ejemplo n.º 1
0
 public static int Hook_AfterPlacement(int x, int y, int type = 21, int style = 0, int direction = 1)
 {
     if (Main.netMode != 1)
     {
         return(DeprecatedClassLeftInForLoading.Place(x - 1, y - 2));
     }
     NetMessage.SendTileSquare(Main.myPlayer, x - 1, y - 1, 3, TileChangeType.None);
     NetMessage.SendData(87, -1, -1, (NetworkText)null, x - 1, (float)(y - 2), 0.0f, 0.0f, 0, 0, 0);
     return(-1);
 }
Ejemplo n.º 2
0
 public static void Kill(int x, int y)
 {
     for (int index = 0; index < 1000; ++index)
     {
         DeprecatedClassLeftInForLoading dummy = DeprecatedClassLeftInForLoading.dummies[index];
         if (dummy != null && (int)dummy.x == x && (int)dummy.y == y)
         {
             DeprecatedClassLeftInForLoading.dummies[index] = (DeprecatedClassLeftInForLoading)null;
         }
     }
 }
 public static void Kill(int x, int y)
 {
     for (int i = 0; i < 1000; i++)
     {
         DeprecatedClassLeftInForLoading deprecatedClassLeftInForLoading = dummies[i];
         if (deprecatedClassLeftInForLoading != null && deprecatedClassLeftInForLoading.x == x && deprecatedClassLeftInForLoading.y == y)
         {
             dummies[i] = null;
         }
     }
 }
        public static int Place(int x, int y)
        {
            int num = -1;

            for (int i = 0; i < 1000; i++)
            {
                if (dummies[i] == null)
                {
                    num = i;
                    break;
                }
            }
            if (num == -1)
            {
                return(num);
            }
            dummies[num] = new DeprecatedClassLeftInForLoading(x, y);
            return(num);
        }