예제 #1
0
    public virtual void OnReplicationDeserialize_CJGenerated(P2PNetworkReader reader, bool initial_state)
    {
        int num = (int)reader.ReadPackedUInt32();

        if (this.m_ReplActiveElements_Repl == null || this.m_ReplActiveElements_Repl.Length != num)
        {
            this.m_ReplActiveElements_Repl = new bool[num];
        }
        for (int i = 0; i < num; i++)
        {
            this.m_ReplActiveElements_Repl[i] = reader.ReadBoolean();
        }
        if (initial_state)
        {
            int num2 = (int)reader.ReadPackedUInt32();
            if (this.m_ReplActiveElementsHash == null || this.m_ReplActiveElementsHash.Length != num2)
            {
                this.m_ReplActiveElementsHash = new int[num2];
            }
            for (int j = 0; j < num2; j++)
            {
                this.m_ReplActiveElementsHash[j] = reader.ReadInt32();
            }
        }
    }
    public virtual void OnReplicationDeserialize_CJGenerated(P2PNetworkReader reader, bool initial_state)
    {
        this.m_BestTriggerReplObj_Repl     = reader.ReadGameObject();
        this.m_ExecutedTriggerReplObj_Repl = reader.ReadGameObject();
        int num = (int)reader.ReadPackedUInt32();

        if (this.m_BestTriggerChildIdx_Repl == null || this.m_BestTriggerChildIdx_Repl.Count != num)
        {
            this.m_BestTriggerChildIdx_Repl = new List <int>(num);
        }
        for (int i = 0; i < num; i++)
        {
            if (this.m_BestTriggerChildIdx_Repl.Count != num)
            {
                int item = reader.ReadInt32();
                this.m_BestTriggerChildIdx_Repl.Add(item);
            }
            else
            {
                this.m_BestTriggerChildIdx_Repl[i] = reader.ReadInt32();
            }
        }
        int num2 = (int)reader.ReadPackedUInt32();

        if (this.m_ExecutedTriggerChildIdx_Repl == null || this.m_ExecutedTriggerChildIdx_Repl.Count != num2)
        {
            this.m_ExecutedTriggerChildIdx_Repl = new List <int>(num2);
        }
        for (int j = 0; j < num2; j++)
        {
            if (this.m_ExecutedTriggerChildIdx_Repl.Count != num2)
            {
                int item2 = reader.ReadInt32();
                this.m_ExecutedTriggerChildIdx_Repl.Add(item2);
            }
            else
            {
                this.m_ExecutedTriggerChildIdx_Repl[j] = reader.ReadInt32();
            }
        }
    }
예제 #3
0
 public override void OnReplicationDeserialize(P2PNetworkReader reader, bool initial_state)
 {
     if (!initial_state)
     {
         uint num  = reader.ReadPackedUInt32();
         int  num2 = 0;
         while ((long)num2 < (long)((ulong)num))
         {
             ReplicatedBalanceObjects.s_TmpObjHolder.Deserialize(reader);
             BalanceSystem20.Get().OnBalanceSystemObjectReplReceived(ReplicatedBalanceObjects.s_TmpObjHolder, false);
             num2++;
         }
         num = reader.ReadPackedUInt32();
         int num3 = 0;
         while ((long)num3 < (long)((ulong)num))
         {
             ReplicatedBalanceObjects.s_TmpObjHolder.Deserialize(reader);
             BalanceSystem20.Get().OnBalanceSystemObjectReplReceived(ReplicatedBalanceObjects.s_TmpObjHolder, true);
             num3++;
         }
     }
 }
예제 #4
0
 public override void OnReplicationDeserialize(P2PNetworkReader reader, bool initialState)
 {
     if (!initialState)
     {
         uint num  = reader.ReadPackedUInt32();
         int  num2 = 0;
         while ((long)num2 < (long)((ulong)num))
         {
             StaticObjectsManager.Get().ObjectDestroyed(reader.ReadVector3());
             num2++;
         }
     }
 }
    public virtual void OnReplicationDeserialize_CJGenerated(P2PNetworkReader reader, bool initial_state)
    {
        int num = (int)reader.ReadPackedUInt32();

        if (this.m_Rotation_Repl == null || this.m_Rotation_Repl.Length != num)
        {
            this.m_Rotation_Repl = new float[num];
        }
        for (int i = 0; i < num; i++)
        {
            this.m_Rotation_Repl[i] = reader.ReadFloat();
        }
    }
 public override void OnReplicationDeserialize(P2PNetworkReader reader, bool initial_state)
 {
     this.m_PlantDestroyed = reader.ReadBoolean();
     if (this.m_PlantDestroyed)
     {
         this.m_ActivateScripts = reader.ReadBoolean();
         this.m_DontDestroy     = reader.ReadBoolean();
         this.m_Layer           = reader.ReadInt32();
         uint num = reader.ReadPackedUInt32();
         if (num > 0u && this.m_DestroyOnReplace == null)
         {
             this.m_DestroyOnReplace = new List <ReplicatedGameObject>((int)num);
         }
         int num2 = 0;
         while ((long)num2 < (long)((ulong)num))
         {
             this.m_DestroyOnReplace.Add(reader.ReadReplicatedGameObject());
             num2++;
         }
     }
 }
    public override void OnReplicationDeserialize(P2PNetworkReader reader, bool initial_state)
    {
        base.OnReplicationDeserialize(reader, initial_state);
        this.Initialize();
        foreach (ReplicatedPlayerInjuries.ReplicatedWoundSlot replicatedWoundSlot in this.m_WoundSlots)
        {
            replicatedWoundSlot.m_IsValid = false;
        }
        int num = (int)reader.ReadPackedUInt32();

        for (int i = 0; i < num; i++)
        {
            InjuryType  injury_type  = (InjuryType)reader.ReadInt32();
            InjuryState injury_state = (InjuryState)reader.ReadInt32();
            int         num2         = reader.ReadInt32();
            this.m_WoundSlots[num2].m_IsValid = true;
            if (num2 >= 0 && num2 < this.m_WoundSlots.Count)
            {
                this.m_WoundSlots[num2].SetInjury(injury_type, injury_state);
            }
        }
    }
예제 #8
0
 public override void Deserialize(P2PNetworkReader reader)
 {
     this.value = (int)reader.ReadPackedUInt32();
 }