Exemplo n.º 1
0
        public void SerializeFrom(UnityUtility.CStream msgStream)
        {
            UInt16 count = msgStream.ReadUShort();

            for (UInt16 i = 0; i < count; ++i)
            {
                CMonsterBatch monsterBatch = new CMonsterBatch();
                monsterBatch.SerializeFrom(msgStream);
                m_monsterBatches.Add(monsterBatch);
            }
            bool hasElite = msgStream.ReadBoolean();

            if (hasElite)
            {
                m_randomElite = new CMonster();
                m_randomElite.SerializeFrom(msgStream);
            }
        }
Exemplo n.º 2
0
        public void SerializeFrom(UnityUtility.CStream msgStream)
        {
            m_index = msgStream.ReadInt();
            UInt16 count = msgStream.ReadUShort();

            for (UInt16 i = 0; i < count; ++i)
            {
                CMonster monster = new CMonster();
                monster.SerializeFrom(msgStream);
                if (monster.m_type == EMonsterType.RandomDropMonster)
                {
                    m_randomMonster.Add(monster);
                }
                else if (monster.m_type == EMonsterType.CertainlyDropMonster)
                {
                    m_certainlyMonster.Add(monster);
                }
                else if (monster.m_type == EMonsterType.Boss)
                {
                    m_boss = monster;
                }
            }
        }