예제 #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 TargetDummy.Place(x - 1, y - 2);
     NetMessage.SendTileSquare(Main.myPlayer, x - 1, y - 1, 3);
     NetMessage.SendData(87, -1, -1, "", x - 1, (float)(y - 2), 0.0f, 0.0f, 0, 0, 0);
     return -1;
 }
예제 #2
0
 public static void Kill(int x, int y)
 {
     for (int index = 0; index < 1000; ++index)
     {
         TargetDummy targetDummy = TargetDummy.dummies[index];
         if (targetDummy != null && (int)targetDummy.x == x && (int)targetDummy.y == y)
             TargetDummy.dummies[index] = (TargetDummy)null;
     }
 }
예제 #3
0
 public static int Hook_AfterPlacement(int x, int y, int type = 21, int style = 0, int direction = 1)
 {
     if (Main.netMode != 1)
     {
         return(TargetDummy.Place(x - 1, y - 2));
     }
     NetMessage.SendTileSquare(Main.myPlayer, x - 1, y - 1, 3);
     NetMessage.SendData((int)PacketTypes.PlaceTileEntity, -1, -1, "", x - 1, (float)(y - 2), 0f, 0f, 0, 0, 0);
     return(-1);
 }
예제 #4
0
 public static void Kill(int x, int y)
 {
     for (int i = 0; i < 1000; i++)
     {
         TargetDummy targetDummy = TargetDummy.dummies[i];
         if (targetDummy != null && targetDummy.x == x && targetDummy.y == y)
         {
             TargetDummy.dummies[i] = null;
         }
     }
 }
예제 #5
0
        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 TargetDummy(x, y);
            return(num);
        }