Ejemplo n.º 1
0
        public void ProcessChunk(MapChunk chunk)
        {
            var layerDoodads  = new List <string[]>();
            var groundEffects = new List <IDataStorageRecord>();

            for (var i = 0; i < 4; ++i)
            {
                if (i >= chunk.Layers.Length || chunk.Layers[i].EffectId < 0)
                {
                    layerDoodads.Add(new string[0]);
                    groundEffects.Add(null);
                    continue;
                }

                var row = Storage.DbcStorage.GroundEffectTexture.GetRowById(chunk.Layers[i].EffectId);
                if (row == null)
                {
                    layerDoodads.Add(new string[0]);
                    groundEffects.Add(null);
                    continue;
                }

                layerDoodads.Add(GetDoodads(chunk.Layers[i].EffectId, row));
                groundEffects.Add(row);
            }

            var step           = Metrics.ChunkSize / 24.0f;
            var hasDoodadsList = layerDoodads.Select(s => s.Any(d => d != null)).ToList();

            for (var i = 0; i < 64; ++i)
            {
                var layer = chunk.GroundEffectLayer[i];
                if (layer < 0 || layer >= 4)
                {
                    continue;
                }

                if (hasDoodadsList[layer] == false)
                {
                    continue;
                }

                var texRow = groundEffects[layer];

                var ix = i / 64;
                var iy = i % 64;
            }
        }
Ejemplo n.º 2
0
 public abstract bool Intersect(ref Ray ray, out MapChunk chunk, out float distance);
Ejemplo n.º 3
0
 public abstract bool Intersect(ref Ray ray, out MapChunk chunk, out float distance);