Пример #1
0
            protected override void Deserialize(NetworkReader reader, ref LightningOrb orb)
            {
                base.Deserialize(reader, ref orb);
                orb.speed            = reader.ReadSingle();
                orb.damageValue      = reader.ReadSingle();
                orb.attacker         = reader.ReadGameObject();
                orb.inflictor        = reader.ReadGameObject();
                orb.bouncesRemaining = reader.ReadInt32();

                //Needs null checks
                var c = reader.ReadInt32();

                orb.bouncedObjects = new(c);
                for (Int32 i = 0; i < c; i++)
                {
                    orb.bouncedObjects.Add(reader.ReadNetworkIdentity().GetComponent <CharacterBody>().healthComponent);
                }

                orb.teamIndex                  = reader.ReadTeamIndex();
                orb.isCrit                     = reader.ReadBoolean();
                orb.procChainMask              = reader.ReadProcChainMask();
                orb.procCoefficient            = reader.ReadSingle();
                orb.damageColorIndex           = reader.ReadDamageColorIndex();
                orb.range                      = reader.ReadSingle();
                orb.damageCoefficientPerBounce = reader.ReadSingle();
                orb.targetsToFindPerBounce     = reader.ReadInt32();
                orb.damageType                 = reader.ReadDamageType();
                orb.lightningType              = reader.ReadBits <LightningOrb.LightningType>();
            }
Пример #2
0
            public void Deserialize(NetworkReader reader)
            {
                var tgto = reader.ReadGameObject();

                if (!tgto)
                {
                    TinkersSatchelPlugin._logger.LogError("Received MsgHealTargetAndSelf for nonexistent target object");
                    return;
                }
                if (!tgto.TryGetComponent <HealthComponent>(out _target))
                {
                    TinkersSatchelPlugin._logger.LogError("Received MsgHealTargetAndSelf for target object with no HealthComponent");
                    return;
                }
                var selfo = reader.ReadGameObject();

                if (!selfo)
                {
                    TinkersSatchelPlugin._logger.LogWarning("Received MsgHealTargetAndSelf for nonexistent self object");
                    _self = null;
                }
                else if (!selfo.TryGetComponent <HealthComponent>(out _self))
                {
                    TinkersSatchelPlugin._logger.LogWarning("Received MsgHealTargetAndSelf for self object with no HealthComponent");
                    _self = null;
                }
                _adjustedCount = reader.ReadSingle();
                _pcm           = reader.ReadProcChainMask();
            }
            // Token: 0x060017DD RID: 6109 RVA: 0x00067D84 File Offset: 0x00065F84
            public override void Deserialize(NetworkReader reader)
            {
                base.Deserialize(reader);
                this.attacker         = reader.ReadGameObject();
                this.inflictor        = reader.ReadGameObject();
                this.damage           = reader.ReadSingle();
                this.isCrit           = reader.ReadBoolean();
                this.procChainMask    = reader.ReadProcChainMask();
                this.procCoefficient  = reader.ReadSingle();
                this.damageColorIndex = reader.ReadDamageColorIndex();
                this.damageType       = reader.ReadDamageType();
                this.forceVector      = reader.ReadVector3();
                this.pushAwayForce    = reader.ReadSingle();
                this.overlapInfoList.Clear();
                int i   = 0;
                int num = (int)reader.ReadPackedUInt32();

                while (i < num)
                {
                    OverlapAttack.OverlapInfo item = default(OverlapAttack.OverlapInfo);
                    GameObject gameObject          = reader.ReadHurtBoxReference().ResolveGameObject();
                    item.hurtBox       = ((gameObject != null) ? gameObject.GetComponent <HurtBox>() : null);
                    item.hitPosition   = reader.ReadVector3();
                    item.pushDirection = reader.ReadVector3();
                    this.overlapInfoList.Add(item);
                    i++;
                }
            }
Пример #4
0
 // Token: 0x0600047D RID: 1149 RVA: 0x000121F3 File Offset: 0x000103F3
 public override void Deserialize(NetworkReader reader)
 {
     base.Deserialize(reader);
     this.subjectNetworkUserObject       = reader.ReadGameObject();
     this.subjectCharacterBodyGameObject = reader.ReadGameObject();
     this.baseToken = reader.ReadString();
 }
Пример #5
0
 public void Deserialize(NetworkReader reader)
 {
     _victim           = reader.ReadGameObject();
     _attacker         = reader.ReadGameObject();
     _dotIndex         = (DotController.DotIndex)reader.ReadPackedIndex32();
     _duration         = reader.ReadSingle();
     _damageMultiplier = reader.ReadSingle();
 }
 protected static void InvokeCmdCmdRecallPlayer(NetworkBehaviour obj, NetworkReader reader)
 {
     if (!NetworkServer.active)
     {
         Debug.LogError("Command CmdRecallPlayer called on client.");
         return;
     }
     ((Scp049PlayerScript)obj).CmdRecallPlayer(reader.ReadGameObject(), reader.ReadGameObject());
 }
 // Token: 0x06001029 RID: 4137 RVA: 0x00051370 File Offset: 0x0004F570
 public override void Deserialize(NetworkReader reader)
 {
     base.Deserialize(reader);
     this.victim           = reader.ReadGameObject();
     this.damage           = reader.ReadSingle();
     this.attacker         = reader.ReadGameObject();
     this.position         = reader.ReadVector3();
     this.crit             = reader.ReadBoolean();
     this.damageType       = reader.ReadDamageType();
     this.damageColorIndex = reader.ReadDamageColorIndex();
 }
Пример #8
0
 protected static void InvokeUserCode_CmdPlayCard(
     NetworkBehaviour obj,
     NetworkReader reader,
     NetworkConnectionToClient senderConnection)
 {
     if (!NetworkServer.active)
     {
         Debug.LogError((object)"Command CmdPlayCard called on client.");
     }
     else
     {
         ((PlayerManager)obj).UserCode_CmdPlayCard(reader.ReadGameObject(), reader.ReadGameObject());
     }
 }
Пример #9
0
            public override void Deserialize(NetworkReader reader)
            {
                damage                  = new DamageInfo();
                damage.attacker         = reader.ReadGameObject();
                damage.crit             = reader.ReadBoolean();
                damage.damage           = reader.ReadSingle();
                damage.damageColorIndex = reader.ReadDamageColorIndex();
                damage.damageType       = reader.ReadDamageType();
                damage.force            = reader.ReadVector3();
                damage.procCoefficient  = reader.ReadSingle();
                damage.position         = reader.ReadVector3();

                // gameob
                enemyGO = reader.ReadGameObject();
            }
        // Token: 0x06001EC3 RID: 7875 RVA: 0x0009146C File Offset: 0x0008F66C
        public override void OnDeserialize(NetworkReader reader, bool initialState)
        {
            if (initialState)
            {
                this.___syncVictimNetId = reader.ReadNetworkId();
                this.hitHurtboxIndex    = (sbyte)reader.ReadPackedUInt32();
                this.localPosition      = reader.ReadVector3();
                this.localRotation      = reader.ReadQuaternion();
                return;
            }
            int num = (int)reader.ReadPackedUInt32();

            if ((num & 1) != 0)
            {
                this.syncVictim = reader.ReadGameObject();
            }
            if ((num & 2) != 0)
            {
                this.hitHurtboxIndex = (sbyte)reader.ReadPackedUInt32();
            }
            if ((num & 4) != 0)
            {
                this.localPosition = reader.ReadVector3();
            }
            if ((num & 8) != 0)
            {
                this.localRotation = reader.ReadQuaternion();
            }
        }
Пример #11
0
            // Token: 0x060019CF RID: 6607 RVA: 0x0007B424 File Offset: 0x00079624
            public void Read(NetworkReader reader)
            {
                this.bodyIndex       = reader.ReadBodyIndex();
                this.killerBodyIndex = reader.ReadBodyIndex();
                GameObject gameObject = reader.ReadGameObject();

                this.master = (gameObject ? gameObject.GetComponent <CharacterMaster>() : null);
                this.statSheet.Read(reader);
                int newSize = (int)reader.ReadPackedUInt32();

                Array.Resize <ItemIndex>(ref this.itemAcquisitionOrder, newSize);
                for (int i = 0; i < this.itemAcquisitionOrder.Length; i++)
                {
                    ItemIndex itemIndex = reader.ReadItemIndex();
                    this.itemAcquisitionOrder[i] = itemIndex;
                }
                reader.ReadItemStacks(this.itemStacks);
                int newSize2 = (int)reader.ReadPackedUInt32();

                Array.Resize <EquipmentIndex>(ref this.equipment, newSize2);
                for (int j = 0; j < this.equipment.Length; j++)
                {
                    EquipmentIndex equipmentIndex = reader.ReadEquipmentIndex();
                    this.equipment[j] = equipmentIndex;
                }
                this.ResolveLocalInformation();
            }
Пример #12
0
 public void Deserialize(NetworkReader reader)
 {
     Body     = reader.ReadGameObject().GetComponent <CharacterBody>();
     DropType = reader.ReadInt32();
     Index    = reader.ReadInt32();
     Angle    = reader.ReadSingle();
 }
Пример #13
0
        public void Deserialize(NetworkReader reader)
        {
            Util.LogSerialization(this, true);

            NetUser = reader.ReadGameObject().GetComponent <PlayerCharacterMasterController>().networkUser;
            Util.LogVariable(NetUser.userName, nameof(NetUser));
        }
Пример #14
0
 // Token: 0x06000959 RID: 2393 RVA: 0x00028C9C File Offset: 0x00026E9C
 public override void OnDeserialize(NetworkReader reader, bool initialState)
 {
     if ((reader.ReadByte() & 1) > 0)
     {
         for (int i = 0; i < this.membersList.Count; i++)
         {
             CharacterMaster characterMaster = this.membersList[i];
             if (characterMaster)
             {
                 Action <CharacterMaster> action = this.onMemberLost;
                 if (action != null)
                 {
                     action(characterMaster);
                 }
             }
         }
         this.membersList.Clear();
         byte b = reader.ReadByte();
         for (byte b2 = 0; b2 < b; b2 += 1)
         {
             GameObject      gameObject       = reader.ReadGameObject();
             CharacterMaster characterMaster2 = gameObject ? gameObject.GetComponent <CharacterMaster>() : null;
             this.membersList.Add(characterMaster2);
             if (characterMaster2)
             {
                 Action <CharacterMaster> action2 = this.onMemberDiscovered;
                 if (action2 != null)
                 {
                     action2(characterMaster2);
                 }
             }
         }
     }
 }
            // Token: 0x06001FA8 RID: 8104 RVA: 0x00089944 File Offset: 0x00087B44
            public override void Deserialize(NetworkReader reader)
            {
                base.Deserialize(reader);
                byte b    = reader.ReadByte();
                bool flag = (b & CharacterNetworkTransformManager.CharacterUpdateMessage.nonIdentityRotationBit) > 0;

                this.isGrounded   = ((b & CharacterNetworkTransformManager.CharacterUpdateMessage.isGroundedBit) > 0);
                this.timestamp    = reader.ReadSingle();
                this.gameObject   = reader.ReadGameObject();
                this.newPosition  = reader.ReadVector3();
                this.aimDirection = reader.ReadPackedUnitVector3().Unpack();
                this.moveVector   = reader.ReadVector3();
                if (flag)
                {
                    this.rotation = reader.ReadQuaternion();
                }
                else
                {
                    this.rotation = Quaternion.identity;
                }
                if (this.isGrounded)
                {
                    this.groundNormal = reader.ReadPackedUnitVector3().Unpack();
                }
            }
Пример #16
0
 // Token: 0x06000BC5 RID: 3013 RVA: 0x0004CE24 File Offset: 0x0004B024
 public override void OnDeserialize(NetworkReader reader, bool initialState)
 {
     if ((reader.ReadByte() & 1) > 0)
     {
         for (int i = 0; i < this.membersList.Count; i++)
         {
             if (this.membersList[i])
             {
                 this.membersList[i].isBoss = false;
             }
         }
         this.membersList.Clear();
         byte b = reader.ReadByte();
         for (byte b2 = 0; b2 < b; b2 += 1)
         {
             GameObject      gameObject      = reader.ReadGameObject();
             CharacterMaster characterMaster = gameObject ? gameObject.GetComponent <CharacterMaster>() : null;
             this.membersList.Add(characterMaster);
             if (characterMaster)
             {
                 characterMaster.isBoss = true;
             }
         }
         BossGroup.totalBossCountDirty = true;
     }
 }
 // Token: 0x06000ABD RID: 2749 RVA: 0x00035150 File Offset: 0x00033350
 public static DamageInfo ReadDamageInfo(this NetworkReader reader)
 {
     return(new DamageInfo
     {
         damage = reader.ReadSingle(),
         crit = reader.ReadBoolean(),
         attacker = reader.ReadGameObject(),
         inflictor = reader.ReadGameObject(),
         position = reader.ReadVector3(),
         force = reader.ReadVector3(),
         procChainMask = reader.ReadProcChainMask(),
         procCoefficient = reader.ReadSingle(),
         damageType = (DamageType)reader.ReadByte(),
         damageColorIndex = (DamageColorIndex)reader.ReadByte()
     });
 }
Пример #18
0
 public void Deserialize(NetworkReader reader)
 {
     _body     = reader.ReadGameObject().GetComponent <CharacterBody>();
     _buff     = reader.ReadBuffIndex();
     _stacks   = reader.ReadInt32();
     _duration = reader.ReadSingle();
 }
Пример #19
0
        public static Container.StoredItem ReadStoredItem(this NetworkReader reader)
        {
            var        item     = reader.ReadGameObject().GetComponent <Item>();
            Vector2Int position = reader.ReadVector2Int();

            return(new Container.StoredItem(item, position));
        }
Пример #20
0
 // Token: 0x06001762 RID: 5986 RVA: 0x0006F130 File Offset: 0x0006D330
 public override VoteController.UserVote DeserializeItem(NetworkReader reader)
 {
     return(new VoteController.UserVote
     {
         networkUserObject = reader.ReadGameObject(),
         voteChoiceIndex = (int)reader.ReadPackedUInt32()
     });
 }
Пример #21
0
		// Token: 0x060027A5 RID: 10149 RVA: 0x000B8AA4 File Offset: 0x000B6CA4
		public static HurtBoxReference _ReadHurtBoxReference_None(NetworkReader reader)
		{
			return new HurtBoxReference
			{
				rootObject = reader.ReadGameObject(),
				hurtBoxIndexPlusOne = (byte)reader.ReadPackedUInt32()
			};
		}
Пример #22
0
            public override void Deserialize(NetworkReader reader)
            {
                // buff
                buff = (BuffIndex)Enum.Parse(typeof(BuffIndex), reader.ReadString());

                buffDuration = reader.ReadSingle();
                body         = reader.ReadGameObject().GetComponent <CharacterBody>();
            }
Пример #23
0
 // Token: 0x06001279 RID: 4729 RVA: 0x0005A6DC File Offset: 0x000588DC
 protected static void InvokeCmdCmdSubmitVote(NetworkBehaviour obj, NetworkReader reader)
 {
     if (!NetworkServer.active)
     {
         Debug.LogError("Command CmdSubmitVote called on client.");
         return;
     }
     ((NetworkUser)obj).CmdSubmitVote(reader.ReadGameObject(), (int)reader.ReadPackedUInt32());
 }
 protected static void InvokeRpcRpcMovePlayer(NetworkBehaviour obj, NetworkReader reader)
 {
     if (!NetworkClient.active)
     {
         Debug.LogError("RPC RpcMovePlayer called on server.");
         return;
     }
     ((Scp106PlayerScript)obj).RpcMovePlayer(reader.ReadGameObject());
 }
 protected static void InvokeCmdCmdMovePlayer(NetworkBehaviour obj, NetworkReader reader)
 {
     if (!NetworkServer.active)
     {
         Debug.LogError("Command CmdMovePlayer called on client.");
         return;
     }
     ((Scp106PlayerScript)obj).CmdMovePlayer(reader.ReadGameObject(), (int)reader.ReadPackedUInt32());
 }
Пример #26
0
 protected static void InvokeCmdCmdShoot(NetworkBehaviour obj, NetworkReader reader)
 {
     if (!NetworkServer.active)
     {
         Debug.LogError("Command CmdShoot called on client.");
         return;
     }
     ((WeaponManager)obj).CmdShoot(reader.ReadString(), reader.ReadGameObject(), reader.ReadVector3(), reader.ReadVector3(), reader.ReadString());
 }
 public static QueryProcessor.PlayerInfo _ReadPlayerInfo_QueryProcessor(NetworkReader reader)
 {
     return(new QueryProcessor.PlayerInfo
     {
         address = reader.ReadString(),
         instance = reader.ReadGameObject(),
         time = reader.ReadString()
     });
 }
Пример #28
0
 protected static void InvokeCmdCmdSetTransmit(NetworkBehaviour obj, NetworkReader reader)
 {
     if (!NetworkServer.active)
     {
         Debug.LogError("Command CmdSetTransmit called on client.");
         return;
     }
     ((Intercom)obj).CmdSetTransmit(reader.ReadGameObject());
 }
Пример #29
0
 protected static void InvokeCmdCmdOpenDoor(NetworkBehaviour obj, NetworkReader reader)
 {
     if (!NetworkServer.active)
     {
         Debug.LogError("Command CmdOpenDoor called on client.");
         return;
     }
     ((PlayerInteract)obj).CmdOpenDoor(reader.ReadGameObject());
 }
Пример #30
0
 protected static void InvokeRpcRpcDenied(NetworkBehaviour obj, NetworkReader reader)
 {
     if (!NetworkClient.active)
     {
         Debug.LogError("RPC RpcDenied called on server.");
         return;
     }
     ((PlayerInteract)obj).RpcDenied(reader.ReadGameObject());
 }
Пример #31
0
            public override void Deserialize(NetworkReader reader)
            {
                name = reader.ReadString();

                var isNull = reader.ReadBoolean();
                if (isNull){
                    value = null;
                    return;
                }

                var typeName = reader.ReadString();
                var t = System.Type.GetType(typeName);

                if (t == typeof(string)){
                    value = reader.ReadString();
                    return;
                }
                if (t == typeof(bool)){
                    value = reader.ReadBoolean();
                    return;
                }
                if (t == typeof(int)){
                    value = reader.ReadInt32();
                    return;
                }
                if (t == typeof(float)){
                    value = reader.ReadSingle();
                    return;
                }
                if (t == typeof(Color)){
                    value = reader.ReadColor();
                    return;
                }
                if (t == typeof(Vector2)){
                    value = reader.ReadVector2();
                    return;
                }
                if (t == typeof(Vector3)){
                    value = reader.ReadVector3();
                    return;
                }
                if (t == typeof(Vector4)){
                    value = reader.ReadVector4();
                    return;
                }
                if (t == typeof(Quaternion)){
                    value = reader.ReadQuaternion();
                    return;
                }
                if (t == typeof(GameObject)){
                    value = reader.ReadGameObject();
                    return;
                }
                if (typeof(Component).RTIsAssignableFrom(t)){
                    var go = reader.ReadGameObject();
                    if (go != null){
                        value = go.GetComponent(t);
                    }
                    return;
                }
            }