Exemple #1
0
 internal static void ReadArmorStandData(BinaryReader reader, ArmorTables tables)
 {
     int i = reader.ReadInt32();
     while (i > 0)
     {
         int j = reader.ReadInt32();
         int position = reader.ReadByte();
         int slot = reader.ReadUInt16();
         Tile left = Main.tile[i, j];
         Tile right = Main.tile[i + 1, j];
         if (left.active() && right.active() && (left.type == TileID.Mannequin || left.type == TileID.Womannequin)
             && left.type == right.type && (left.frameX == 0 || left.frameX == 36) && right.frameX == left.frameX + 18
             && left.frameY / 18 == position && left.frameY == right.frameY)
         {
             if (position == 0)
             {
                 slot = tables.headSlots[slot];
             }
             else if (position == 1)
             {
                 slot = tables.bodySlots[slot];
             }
             else if (position == 2)
             {
                 slot = tables.legSlots[slot];
             }
             left.frameX += (short)(100 * slot);
         }
         i = reader.ReadInt32();
     }
 }
Exemple #2
0
 internal static ArmorTables Create()
 {
     ArmorTables tables = new ArmorTables();
     tables.headSlots = new Dictionary<int, int>();
     tables.bodySlots = new Dictionary<int, int>();
     tables.legSlots = new Dictionary<int, int>();
     return tables;
 }