Esempio n. 1
0
        public override void Serialize(ICustomDataOutput writer)
        {
            byte flag = new byte();

            BooleanByteWrapper.SetFlag(0, flag, m_sex);
            BooleanByteWrapper.SetFlag(1, flag, m_isRideable);
            BooleanByteWrapper.SetFlag(2, flag, m_isWild);
            BooleanByteWrapper.SetFlag(3, flag, m_isFecondationReady);
            BooleanByteWrapper.SetFlag(4, flag, m_useHarnessColors);
            writer.WriteByte(flag);
            writer.WriteDouble(m_ObjectId);
            writer.WriteVarUhInt(m_model);
            writer.WriteShort(((short)(m_ancestor.Count)));
            int ancestorIndex;

            for (ancestorIndex = 0; (ancestorIndex < m_ancestor.Count); ancestorIndex = (ancestorIndex + 1))
            {
                writer.WriteInt(m_ancestor[ancestorIndex]);
            }
            writer.WriteShort(((short)(m_behaviors.Count)));
            int behaviorsIndex;

            for (behaviorsIndex = 0; (behaviorsIndex < m_behaviors.Count); behaviorsIndex = (behaviorsIndex + 1))
            {
                writer.WriteInt(m_behaviors[behaviorsIndex]);
            }
            writer.WriteUTF(m_name);
            writer.WriteInt(m_ownerId);
            writer.WriteVarUhLong(m_experience);
            writer.WriteVarUhLong(m_experienceForLevel);
            writer.WriteDouble(m_experienceForNextLevel);
            writer.WriteByte(m_level);
            writer.WriteVarUhInt(m_maxPods);
            writer.WriteVarUhInt(m_stamina);
            writer.WriteVarUhInt(m_staminaMax);
            writer.WriteVarUhInt(m_maturity);
            writer.WriteVarUhInt(m_maturityForAdult);
            writer.WriteVarUhInt(m_energy);
            writer.WriteVarUhInt(m_energyMax);
            writer.WriteInt(m_serenity);
            writer.WriteInt(m_aggressivityMax);
            writer.WriteVarUhInt(m_serenityMax);
            writer.WriteVarUhInt(m_love);
            writer.WriteVarUhInt(m_loveMax);
            writer.WriteInt(m_fecondationTime);
            writer.WriteInt(m_boostLimiter);
            writer.WriteDouble(m_boostMax);
            writer.WriteInt(m_reproductionCount);
            writer.WriteVarUhInt(m_reproductionCountMax);
            writer.WriteVarUhShort(m_harnessGID);
            writer.WriteShort(((short)(m_effectList.Count)));
            int effectListIndex;

            for (effectListIndex = 0; (effectListIndex < m_effectList.Count); effectListIndex = (effectListIndex + 1))
            {
                ObjectEffectInteger objectToSend = m_effectList[effectListIndex];
                objectToSend.Serialize(writer);
            }
        }
Esempio n. 2
0
 public override void Serialize(ICustomDataOutput writer)
 {
     Bonus.Serialize(writer);
 }