Beispiel #1
0
        private void ParseTrappers(Internal.CommunicationStream message)
        {
            int n = message.ReadUnsignedByte();
            List <Creatures.Creature> trappers = new List <Creatures.Creature>();

            for (int i = 0; i < n; i++)
            {
                var creatureId = message.ReadUnsignedInt();
                var creature   = CreatureStorage.GetCreature(creatureId);
                if (creature)
                {
                    trappers.Add(creature);
                }
            }

            CreatureStorage.SetTrappers(trappers);
        }