Esempio n. 1
0
 public bool SerializeFrom(UnityUtility.CStream msgStream)
 {
     m_petID     = msgStream.ReadUInt();
     m_petTPID   = msgStream.ReadUInt();
     m_petStatus = (EPetStatus)msgStream.ReadUInt();
     m_leftTime  = msgStream.ReadUInt();
     return(true);
 }
Esempio n. 2
0
 public bool SerializeFrom(UnityUtility.CStream msgStream)
 {
     m_petID               = msgStream.ReadUInt();
     m_petTPID             = msgStream.ReadUInt();
     m_petFriendlyLevel    = msgStream.ReadUInt();
     m_petFriendlyValue    = msgStream.ReadUInt();
     m_maxPetFriendlyValue = msgStream.ReadUInt();
     m_petStatus           = (EPetStatus)msgStream.ReadUInt();
     m_hotSpringType       = (EHotSpringType)msgStream.ReadUInt();
     m_petTaskType         = (EHotSpringTaskStatus)msgStream.ReadUInt();
     m_hotSpringTaskType   = (EHotSpringTaskType)msgStream.ReadUInt();
     m_leftTime            = msgStream.ReadUInt();
     m_petBattleAttribute.SerializeFrom(msgStream);
     m_petGrowUpAttribute.SerializeFrom(msgStream);
     // 战斗力公式 i.	战斗力=攻击力*2 + 防御力 + 生命值/5 + 命中/5 + 闪避/2 + 暴击/2 + 抗暴/5
     m_combat = m_petBattleAttribute.Atk * 2
                + m_petBattleAttribute.Def
                + m_petBattleAttribute.MaxHP / 5
                + m_petBattleAttribute.AtkCrift / 2
                + m_petBattleAttribute.DefCrift / 5
                + m_petBattleAttribute.HitRate / 5
                + m_petBattleAttribute.MissRate / 2;
     return(true);
 }