Beispiel #1
0
 public bool Write(DAIIO io, bool skiplength = false)
 {
     try
     {
         if (!skiplength)
         {
             io.WriteBits(Length, LengthBits);
         }
         io.WriteBits(WorldStateManager.Length + 0x18, 0x18);
         WorldStateManager.Write(io);
         io.WriteBits(PartyManager.Length + 0x18, 0x18);
         PartyManager.Write(io);
         io.WriteBits(PlotSaveGameAgent.Length + 0x18, 0x18);
         PlotSaveGameAgent.Write(io);
         LootManager.Write(io);
         SpawnerCreateManager.Write(io);
         io.WriteBits(MapManager.Length + 0x18, 0x18);
         MapManager.Write(io);
         io.WriteBits(MissionManager.Length + 0x18, 0x18);
         MissionManager.Write(io);
         SpawnerInits.Write(io);
         Terrain.Write(io);
         StoreInventoryManager.Write(io);
         io.WriteBits(PartyInventory.Length + 0x18, 0x18);
         PartyInventory.Write(io);
         JournalManager.Write(io);
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Beispiel #2
0
 public AgentEntity Read(DAIIO io)
 {
     xLength = io.ReadBit2(LengthBits);
     WorldStateManagerLength = io.ReadBit2(0x18);
     WorldStateManager       = new WorldStateManager(SStructure).Read(io);
     PartyManagerLength      = io.ReadBit2(0x18);
     PartyManager            = new PartyManager().Read(io);
     PlotSaveGameAgentLength = io.ReadBit2(0x18);
     PlotSaveGameAgent       = new PlotSaveGame().Read(io);
     LootManager             = new LootManager(SStructure).Read(io);
     SpawnerCreateManager    = new SpawnerCreateManager().Read(io);
     MapManagerLength        = io.ReadBit2(0x18);
     MapManager           = new BWMapManager(SStructure).Read(io);
     MissionManagerLength = io.ReadBit2(0x18);
     MissionManager       = new MissionManager(SStructure);
     MissionManager.Read(io);
     SpawnerInits             = new SpawnerInits().Read(io);
     Terrain                  = new TerrainManager(SStructure).Read(io);
     StoreInventoryManager    = new StoreInventoryManager(SStructure).Read(io);
     PartyPlayerManagerLength = io.ReadBit2(0x18);
     PartyInventory           = new PartyPlayerManager(SStructure).Read(io);
     JournalManager           = new JournalManager().Read(io);
     return(this);
 }