public void Read(CryptoDataBuffer reader) { reader.ReadBlockStart(BLOCK); int version = reader.ReadCryptoIntUnchecked(); //if (version != VERSION) // throw new FormatException("ERR_UNSUPPORTED_VERSION"); Level = reader.ReadCryptoIntUnchecked(); Experience = reader.ReadCryptoIntUnchecked(); ModifierPoints = reader.ReadCryptoIntUnchecked(); SkillPoints = reader.ReadCryptoIntUnchecked(); DevotionPoints = reader.ReadCryptoIntUnchecked(); TotalDevotion = reader.ReadCryptoIntUnchecked(); TotalStrength = reader.ReadCryptoFloatUnchecked(); TotalAgility = reader.ReadCryptoFloatUnchecked(); TotalIntelligence = reader.ReadCryptoFloatUnchecked(); Health = reader.ReadCryptoFloatUnchecked(); Energy = reader.ReadCryptoFloatUnchecked(); // end marker reader.ReadBlockEnd(); }
private void ReadCharacterInfo() { bool isInMainQuest; bool hasBeenInGame; byte difficulty; byte greatestCampaignDifficulty; uint money; byte greatestCrucibleDifficulty; int tributes; reader.ReadBlockStart(Constants.BLOCK); int version = reader.ReadCryptoIntUnchecked(); //if ((version != Constants.VERSION_3) && (version != Constants.VERSION_4)) { // throw new FormatException("ERR_UNSUPPORTED_VERSION"); //} reader.ReadCryptoBool(out isInMainQuest); charisInMainQuest = isInMainQuest; reader.ReadCryptoBool(out hasBeenInGame); charhasBeenInGame = hasBeenInGame; //reader.ReadCryptoByte(out difficulty); //charDiff = difficulty; reader.ReadCryptoByte(out greatestCampaignDifficulty); charGreatestDiff = greatestCampaignDifficulty; reader.ReadCryptoUInt(out money); charMoney = money; //if (version == Constants.VERSION_4) { // reader.ReadCryptoByte(out greatestCrucibleDifficulty); // reader.ReadCryptoInt(out tributes); //} //byte compassState = reader.ReadCryptoByteUnchecked(); //int lootMode = reader.ReadCryptoIntUnchecked(); //byte skillWindowHelp = reader.ReadCryptoByteUnchecked(); //byte alternateConfig = reader.ReadCryptoByteUnchecked(); //byte alternateConfigEnabled = reader.ReadCryptoByteUnchecked(); //string texture = reader.ReadCryptoStringUnchecked(); reader.ReadBlockEnd(); }