public void Decode(ByteStream stream) { this.m_allianceWarHeader = new AllianceWarHeader(); this.m_allianceWarHeader.Decode(stream); int memberCount = stream.ReadInt(); if (memberCount >= 0) { Debugger.DoAssert(memberCount < 1000, "Too many alliance war member entries in AllianceWarEntry"); this.m_allianceWarMemberList = new LogicArrayList <AllianceWarMemberEntry>(); this.m_allianceWarMemberList.EnsureCapacity(memberCount); for (int i = 0; i < memberCount; i++) { AllianceWarMemberEntry allianceWarMemberEntry = new AllianceWarMemberEntry(); allianceWarMemberEntry.Decode(stream); this.m_allianceWarMemberList.Add(allianceWarMemberEntry); } } this.m_ended = stream.ReadBoolean(); stream.ReadBoolean(); int expMapCount = stream.ReadInt(); if (expMapCount >= 0) { Debugger.DoAssert(expMapCount <= 50, "Too many entries in the alliance exp map"); this.m_allianceExpMap = new LogicArrayList <int>(); this.m_allianceExpMap.EnsureCapacity(expMapCount); for (int i = 0; i < expMapCount; i++) { this.m_allianceExpMap.Add(stream.ReadInt()); } } this.m_warState = stream.ReadInt(); this.m_warStateRemainingSeconds = stream.ReadInt(); stream.ReadInt(); stream.ReadInt(); stream.ReadInt(); stream.ReadInt(); this.m_allianceWarLootBonusPecentWin = stream.ReadInt(); this.m_allianceWarLootBonusPecentDraw = stream.ReadInt(); this.m_allianceWarLootBonusPecentLose = stream.ReadInt(); }
public override void Decode() { base.Decode(); int count = this.m_stream.ReadInt(); if (count >= 0) { this.m_warMemberEntryList = new LogicArrayList <AllianceWarMemberEntry>(); this.m_warMemberEntryList.EnsureCapacity(count); for (int i = 0; i < count; i++) { AllianceWarMemberEntry warMemberEntry = new AllianceWarMemberEntry(); warMemberEntry.Decode(this.m_stream); this.m_warMemberEntryList.Add(warMemberEntry); } } }