コード例 #1
0
ファイル: MultiLoader.cs プロジェクト: xoozyx/ClassicUO
        public unsafe void GetMultiData(int index, ushort g, bool uopValid, out ushort graphic, out short x, out short y, out short z, out bool add)
        {
            if (_file is UOFileUop)
            {
                graphic = _reader.ReadUShort();

                x = _reader.ReadShort();
                y = _reader.ReadShort();
                z = _reader.ReadShort();
                ushort flags = _reader.ReadUShort();

                uint clilocsCount = _reader.ReadUInt();

                if (clilocsCount != 0)
                {
                    _reader.Skip((int)(clilocsCount * 4));
                }

                add = flags == 0;
            }
            else
            {
                MultiBlock *block = (MultiBlock *)(_file.PositionAddress + index * _itemOffset);

                graphic = block->ID;
                x       = block->X;
                y       = block->Y;
                z       = block->Z;
                uint flags = block->Flags;

                add = flags != 0;
            }
        }
コード例 #2
0
        public static unsafe MultiBlock GetMulti(int index)
        {
            MultiBlock *pbm = (MultiBlock *)(_file.StartAddress + _file.Position + (index * _itemOffset));

            return(pbm[0]);
        }