public GameRolePlayGroupMonsterInformations(bool keyRingBonus, bool hasHardcoreDrop, bool hasAVARewardToken, GroupMonsterStaticInformations staticInfos, double creationTime, int ageBonusRate, byte lootShare, byte alignmentSide) { m_keyRingBonus = keyRingBonus; m_hasHardcoreDrop = hasHardcoreDrop; m_hasAVARewardToken = hasAVARewardToken; m_staticInfos = staticInfos; m_creationTime = creationTime; m_ageBonusRate = ageBonusRate; m_lootShare = lootShare; m_alignmentSide = alignmentSide; }
public override void Serialize(IDataWriter writer) { base.Serialize(writer); writer.WriteShort(((short)(m_alternatives.Count))); int alternativesIndex; for (alternativesIndex = 0; (alternativesIndex < m_alternatives.Count); alternativesIndex = (alternativesIndex + 1)) { GroupMonsterStaticInformations objectToSend = m_alternatives[alternativesIndex]; writer.WriteUShort(((ushort)(objectToSend.TypeID))); objectToSend.Serialize(writer); } writer.WriteByte(m_nbWaves); }
public override void Deserialize(IDataReader reader) { base.Deserialize(reader); m_nbWaves = reader.ReadByte(); int alternativesCount = reader.ReadUShort(); int alternativesIndex; m_alternatives = new System.Collections.Generic.List<GroupMonsterStaticInformations>(); for (alternativesIndex = 0; (alternativesIndex < alternativesCount); alternativesIndex = (alternativesIndex + 1)) { GroupMonsterStaticInformations objectToAdd = ProtocolTypeManager.GetInstance<GroupMonsterStaticInformations>((short)reader.ReadUShort()); objectToAdd.Deserialize(reader); m_alternatives.Add(objectToAdd); } }
public override void Deserialize(IDataReader reader) { base.Deserialize(reader); byte flag = reader.ReadByte(); m_keyRingBonus = BooleanByteWrapper.GetFlag(flag, 0); m_hasHardcoreDrop = BooleanByteWrapper.GetFlag(flag, 1); m_hasAVARewardToken = BooleanByteWrapper.GetFlag(flag, 2); m_staticInfos = ProtocolTypeManager.GetInstance <GroupMonsterStaticInformations>((short)reader.ReadUShort()); m_staticInfos.Deserialize(reader); m_creationTime = reader.ReadDouble(); m_ageBonusRate = reader.ReadInt(); m_lootShare = reader.ReadByte(); m_alignmentSide = reader.ReadByte(); }