// Reads the buff and quest information public override void Read(byte _version, BinaryReader _br) { base.Read(_version, _br); strMyName = _br.ReadString(); Buffs.Read(_br); QuestJournal = new QuestJournal(); QuestJournal.Read(_br); PatrolCoordinates.Clear(); String strPatrol = _br.ReadString(); foreach (String strPatrolPoint in strPatrol.Split(';')) { Vector3 temp = ModGeneralUtilities.StringToVector3(strPatrolPoint); if (temp != Vector3.zero) { PatrolCoordinates.Add(temp); } } String strGuardPosition = _br.ReadString(); GuardPosition = ModGeneralUtilities.StringToVector3(strGuardPosition); factionId = _br.ReadByte(); GuardLookPosition = ModGeneralUtilities.StringToVector3(_br.ReadString()); }
public void ReadFormationUnitData(BinaryReader br) { IsHero = br.ReadBoolean(); Rank = br.ReadInt32(); Team = (Team)br.ReadInt32(); int statusCount = br.ReadInt32(); Character.InitializeBasicStatuses(Statuses); for (int i = 0; i < statusCount; i++) { var savedStatusType = (StatusType)br.ReadInt32(); Statuses[savedStatusType].ReadStatusData(br); } if (IsHero) { RosterId = br.ReadInt32(); CurrentMode = br.ReadString(); } else { IsCorpse = br.ReadBoolean(); OriginalClass = br.ReadString(); Class = br.ReadString(); Name = br.ReadString(); CurrentHp = br.ReadSingle(); Buffs.Read(br); } CombatInfo = new FormationUnitInfo(); CombatInfo.ReadCombatInfoData(br); }