Ejemplo n.º 1
0
        protected override void ReadEntry(CsvEntry entry)
        {
            var info = new PropDropItemInfo();

            info.Type      = entry.ReadInt();
            info.ItemClass = entry.ReadInt();
            info.Amount    = entry.ReadUShort();
            info.Chance    = entry.ReadFloat();

            var ii = AuraData.ItemDb.Find(info.ItemClass);

            if (ii == null)
            {
                throw new Exception(string.Format("Unknown item id '{0}'.", info.ItemClass));
            }

            if (info.Amount > ii.StackMax)
            {
                info.Amount = ii.StackMax;
            }

            // The file contains PropDropItemInfo, here we organize it into PropDropInfo structs.
            if (!this.Entries.ContainsKey(info.Type))
            {
                this.Entries.Add(info.Type, new PropDropData(info.Type));
            }
            this.Entries[info.Type].Items.Add(info);
        }
Ejemplo n.º 2
0
        protected override void ReadEntry(CsvEntry entry)
        {
            var info = new MapData();

            info.Id   = entry.ReadInt();
            info.Name = entry.ReadString();

            this.Entries[info.Name] = info;
        }
Ejemplo n.º 3
0
        protected override void ReadEntry(CsvEntry entry)
        {
            // Replace previous values if there is more than 1 line.
            this.Entries = new List <ExpData>(entry.Count);

            while (!entry.End)
            {
                var info = new ExpData();
                info.Level = (entry.Pointer + 1);
                info.Exp   = entry.ReadInt();

                this.Entries.Add(info);
            }
        }
Ejemplo n.º 4
0
        protected override void ReadEntry(CsvEntry entry)
        {
            var info = new DropData();

            info.ItemId = entry.ReadInt(0);
            info.Chance = entry.ReadFloat(1);

            if (info.Chance > 100)
            {
                info.Chance = 100;
            }
            else if (info.Chance < 0)
            {
                info.Chance = 0;
            }

            this.Entries.Add(info);
        }
Ejemplo n.º 5
0
        protected override void ReadEntry(CsvEntry entry)
        {
            var info = new ShamalaData();

            info.Id       = entry.ReadInt();
            info.Name     = entry.ReadString();
            info.Category = entry.ReadString();
            info.Rank     = entry.ReadByte();
            info.Rate     = entry.ReadFloat();
            info.Required = entry.ReadByte();
            info.Size     = entry.ReadFloat();
            info.Color1   = entry.ReadUIntHex();
            info.Color2   = entry.ReadUIntHex();
            info.Color3   = entry.ReadUIntHex();

            var races = entry.ReadStringList();

            foreach (var race in races)
            {
                info.Races.Add(Convert.ToInt32(race));
            }

            this.Entries[info.Id] = info;
        }