Ignore:
Timestamp:
Aug 30, 2014, 3:47:59 PM (10 years ago)
Author:
alloc
Message:

Fixes

Location:
binary-improvements/7dtd-server-fixes/src/PersistentData
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/7dtd-server-fixes/src/PersistentData/KnownPlayers.cs

    r142 r143  
    44namespace AllocsFixes.PersistentData
    55{
    6         [Serializable()]
    7         public class KnownPlayers : ISerializable
     6        [Serializable]
     7        public class KnownPlayers
    88        {
    99                private int entityId;
     
    1616                public KnownPlayers (SerializationInfo info, StreamingContext ctxt)
    1717                {
    18                         this.entityId = info.GetInt32("entityId");
    19                         this.name = info.GetString("name");
     18                        this.entityId = info.GetInt32 ("entityId");
     19                        this.name = info.GetString ("name");
    2020                }
    21 
    22                 public void GetObjectData (SerializationInfo info, StreamingContext context)
    23                 {
    24                         info.AddValue("name", this.name);
    25                 }
    26 }
     21        }
    2722}
    2823
  • binary-improvements/7dtd-server-fixes/src/PersistentData/PersistentContainer.cs

    r142 r143  
    77namespace AllocsFixes.PersistentData
    88{
    9         [Serializable()]
    10         public class PersistentContainer : ISerializable
     9        [Serializable]
     10        public class PersistentContainer
    1111        {
    1212                public Dictionary<string, KnownPlayers> players = new Dictionary<string, KnownPlayers> ();
     
    4949                }
    5050
    51                 public PersistentContainer (SerializationInfo info, StreamingContext ctxt)
    52                 {
    53                         this.players = (Dictionary<string, KnownPlayers>)info.GetValue ("players", typeof(Dictionary<string, KnownPlayers>));
    54                 }
    55 
    56                 public void GetObjectData (SerializationInfo info, StreamingContext context)
    57                 {
    58                         info.AddValue ("players", this.players);
    59                 }
    60 
    6151        }
    6252}
Note: See TracChangeset for help on using the changeset viewer.