ReadNameString() private static method

private static ReadNameString ( BinaryReader bin ) : string
bin System.IO.BinaryReader
return string
Ejemplo n.º 1
0
 public unsafe LandData(OldLandTileDataMul mulstruct)
 {
     m_TexID = mulstruct.texID;
     m_Flags = (TileFlag)mulstruct.flags;
     m_Unk1  = 0;
     m_Name  = TileData.ReadNameString(mulstruct.name);
 }
Ejemplo n.º 2
0
 public unsafe LandData(NewLandTileDataMul mulstruct, TileData tileData)
 {
     m_TexID = mulstruct.texID;
     m_Flags = (TileFlag)mulstruct.flags;
     m_Unk1  = mulstruct.unk1;
     m_Name  = tileData.ReadNameString(mulstruct.name);
 }
Ejemplo n.º 3
0
 public unsafe LandData(OldLandTileDataMul mulStruct)
 {
     TextureID = mulStruct.texID;
     Flags     = (TileFlag)mulStruct.flags;
     Unk1      = 0;
     Name      = TileData.ReadNameString(mulStruct.name);
 }
Ejemplo n.º 4
0
        static TileData()
        {
            TileData.m_StringBuffer = new byte[20];
            string filePath = Client.GetFilePath("tiledata.mul");

            if (filePath == null)
            {
                throw new FileNotFoundException();
            }
            using (FileStream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read))
            {
                BinaryReader binaryReader = new BinaryReader(fileStream);
                TileData.m_LandData = new LandData[16384];
                for (int i = 0; i < 16384; i++)
                {
                    if ((i & 31) == 0)
                    {
                        binaryReader.ReadInt32();
                    }
                    TileFlag tileFlag = (TileFlag)binaryReader.ReadInt32();
                    binaryReader.ReadInt16();
                    TileData.m_LandData[i] = new LandData(TileData.ReadNameString(binaryReader), tileFlag);
                }
                TileData.m_ItemData    = new ItemData[16384];
                TileData.m_HeightTable = new int[16384];
                for (int j = 0; j < 16384; j++)
                {
                    if ((j & 31) == 0)
                    {
                        binaryReader.ReadInt32();
                    }
                    TileFlag tileFlag1 = (TileFlag)binaryReader.ReadInt32();
                    int      num       = binaryReader.ReadByte();
                    int      num1      = binaryReader.ReadByte();
                    binaryReader.ReadInt16();
                    binaryReader.ReadByte();
                    int num2 = binaryReader.ReadByte();
                    int num3 = binaryReader.ReadInt16();
                    binaryReader.ReadInt16();
                    binaryReader.ReadByte();
                    int num4 = binaryReader.ReadByte();
                    int num5 = binaryReader.ReadByte();
                    TileData.m_ItemData[j]    = new ItemData(TileData.ReadNameString(binaryReader), tileFlag1, num, num1, num2, num4, num5, num3);
                    TileData.m_HeightTable[j] = num5;
                }
            }
        }
Ejemplo n.º 5
0
        static TileData()
        {
            string filePath = Client.GetFilePath("tiledata.mul");

            if (filePath == null)
            {
                throw new FileNotFoundException();
            }
            using (FileStream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read))
            {
                BinaryReader bin = new BinaryReader((Stream)fileStream);
                TileData.m_LandData = new LandData[16384];
                for (int index = 0; index < 16384; ++index)
                {
                    if ((index & 31) == 0)
                    {
                        bin.ReadInt32();
                    }
                    TileFlag flags = (TileFlag)bin.ReadInt32();
                    int      num   = (int)bin.ReadInt16();
                    TileData.m_LandData[index] = new LandData(TileData.ReadNameString(bin), flags);
                }
                TileData.m_ItemData    = new ItemData[16384];
                TileData.m_HeightTable = new int[16384];
                for (int index = 0; index < 16384; ++index)
                {
                    if ((index & 31) == 0)
                    {
                        bin.ReadInt32();
                    }
                    TileFlag flags    = (TileFlag)bin.ReadInt32();
                    int      weight   = (int)bin.ReadByte();
                    int      quality  = (int)bin.ReadByte();
                    int      num1     = (int)bin.ReadInt16();
                    int      num2     = (int)bin.ReadByte();
                    int      quantity = (int)bin.ReadByte();
                    int      anim     = (int)bin.ReadInt16();
                    int      num3     = (int)bin.ReadInt16();
                    int      num4     = (int)bin.ReadByte();
                    int      num5     = (int)bin.ReadByte();
                    int      height   = (int)bin.ReadByte();
                    TileData.m_ItemData[index]    = new ItemData(TileData.ReadNameString(bin), flags, weight, quality, quantity, num5, height, anim);
                    TileData.m_HeightTable[index] = height;
                }
            }
        }
Ejemplo n.º 6
0
 public unsafe ItemData(OldItemTileDataMul mulstruct)
 {
     m_Name        = TileData.ReadNameString(mulstruct.name);
     m_Flags       = (TileFlag)mulstruct.flags;
     m_Unk1        = 0;
     m_Weight      = mulstruct.weight;
     m_Quality     = mulstruct.quality;
     m_Quantity    = mulstruct.quantity;
     m_Value       = mulstruct.value;
     m_Height      = mulstruct.height;
     m_Animation   = mulstruct.anim;
     m_Hue         = mulstruct.hue;
     m_StackOffset = mulstruct.stackingoffset;
     m_MiscData    = mulstruct.miscdata;
     m_Unk2        = mulstruct.unk2;
     m_Unk3        = mulstruct.unk3;
 }