public override void Parse(GameBitBuffer buffer) { Field0 = buffer.ReadInt(32); Field1 = buffer.ReadInt(32); Field2 = buffer.ReadInt(32); Field3 = buffer.ReadInt(32); PlayerFlags = buffer.ReadInt(30); PlayerSavedData = new PlayerSavedData(); PlayerSavedData.Parse(buffer); QuestRewardHistoryEntriesCount = buffer.ReadInt(32); tQuestRewardHistory = new PlayerQuestRewardHistoryEntry[buffer.ReadInt(7)]; for(int i = 0;i < _tQuestRewardHistory.Length;i++) { _tQuestRewardHistory[i] = new PlayerQuestRewardHistoryEntry(); _tQuestRewardHistory[i].Parse(buffer); } }
public void FileRead(MpqFileStream stream, long offset) { stream.Position = offset + 0; Field0 = stream.ReadValueS32(); stream.Position = offset + 4; Field1 = stream.ReadValueS32(); stream.Position = offset + 8; Field2 = stream.ReadValueS32(); stream.Position = offset + 12; Field3 = stream.ReadValueS32(); stream.Position = offset + 16; _PlayerFlags = stream.ReadValueS32(); stream.Position = offset + 20; PlayerSavedData = new PlayerSavedData(); PlayerSavedData.FileRead(stream, stream.Position); stream.Position = offset + 2436; QuestRewardHistoryEntriesCount = stream.ReadValueS32(); stream.Position = offset + 2440; tQuestRewardHistory = new PlayerQuestRewardHistoryEntry[100]; for(int loop12=0; loop12 < 100; loop12++ ) { PlayerQuestRewardHistoryEntry temp12_tQuestRewardHistory; temp12_tQuestRewardHistory = new PlayerQuestRewardHistoryEntry(); temp12_tQuestRewardHistory.FileRead(stream, stream.Position); _tQuestRewardHistory[loop12] = temp12_tQuestRewardHistory; } }