コード例 #1
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Character             = (BasicCharacterObject)GameNetworkMessage.ReadObjectReferenceFromPacket(MBObjectManager.Instance, CompressionBasic.GUIDCompressionInfo, ref bufferReadValid);
            this.Monster               = (Monster)GameNetworkMessage.ReadObjectReferenceFromPacket(MBObjectManager.Instance, CompressionBasic.GUIDCompressionInfo, ref bufferReadValid);
            this.AgentIndex            = GameNetworkMessage.ReadAgentIndexFromPacket(CompressionMission.AgentCompressionInfo, ref bufferReadValid);
            this.MountAgentIndex       = GameNetworkMessage.ReadAgentIndexFromPacket(CompressionMission.AgentCompressionInfo, ref bufferReadValid);
            this.Peer                  = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid);
            this.SpawnEquipment        = new Equipment();
            this.SpawnMissionEquipment = new MissionEquipment();
            for (EquipmentIndex index = EquipmentIndex.WeaponItemBeginSlot; index < EquipmentIndex.NumAllWeaponSlots; ++index)
            {
                this.SpawnMissionEquipment[index] = ModuleNetworkData.ReadWeaponReferenceFromPacket(MBObjectManager.Instance, ref bufferReadValid);
            }
            for (EquipmentIndex equipmentIndex = EquipmentIndex.NumAllWeaponSlots; equipmentIndex < EquipmentIndex.NumEquipmentSetSlots; ++equipmentIndex)
            {
                this.SpawnEquipment.AddEquipmentToSlotWithoutAgent(equipmentIndex, ModuleNetworkData.ReadItemReferenceFromPacket(MBObjectManager.Instance, ref bufferReadValid));
            }
            this.IsPlayerAgent       = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            this.BodyPropertiesSeed  = !this.IsPlayerAgent ? GameNetworkMessage.ReadIntFromPacket(CompressionGeneric.RandomSeedCompressionInfo, ref bufferReadValid) : 0;
            this.BodyPropertiesValue = GameNetworkMessage.ReadBodyPropertiesFromPacket(ref bufferReadValid);
            this.IsFemale            = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            this.Team           = GameNetworkMessage.ReadTeamReferenceFromPacket(ref bufferReadValid);
            this.Position       = GameNetworkMessage.ReadVec3FromPacket(CompressionBasic.PositionCompressionInfo, ref bufferReadValid);
            this.Direction      = GameNetworkMessage.ReadVec2FromPacket(CompressionBasic.UnitVectorCompressionInfo, ref bufferReadValid).Normalized();
            this.FormationIndex = GameNetworkMessage.ReadIntFromPacket(CompressionOrder.FormationClassCompressionInfo, ref bufferReadValid);
            this.ClothingColor1 = GameNetworkMessage.ReadUintFromPacket(CompressionGeneric.ColorCompressionInfo, ref bufferReadValid);
            this.ClothingColor2 = GameNetworkMessage.ReadUintFromPacket(CompressionGeneric.ColorCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
コード例 #2
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Peer         = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid);
            this.VisualsIndex = GameNetworkMessage.ReadIntFromPacket(CompressionMission.AgentOffsetCompressionInfo, ref bufferReadValid);
            this.Character    = (BasicCharacterObject)GameNetworkMessage.ReadObjectReferenceFromPacket(MBObjectManager.Instance, CompressionBasic.GUIDCompressionInfo, ref bufferReadValid);
            this.Equipment    = new Equipment();
            bool flag = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);

            for (EquipmentIndex equipmentIndex = EquipmentIndex.WeaponItemBeginSlot; equipmentIndex < (flag ? EquipmentIndex.NumEquipmentSetSlots : EquipmentIndex.ArmorItemEndSlot); ++equipmentIndex)
            {
                EquipmentElement itemRosterElement = ModuleNetworkData.ReadItemReferenceFromPacket(MBObjectManager.Instance, ref bufferReadValid);
                if (bufferReadValid)
                {
                    this.Equipment.AddEquipmentToSlotWithoutAgent(equipmentIndex, itemRosterElement);
                }
                else
                {
                    break;
                }
            }
            this.BodyPropertiesSeed        = GameNetworkMessage.ReadIntFromPacket(CompressionGeneric.RandomSeedCompressionInfo, ref bufferReadValid);
            this.IsFemale                  = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            this.SelectedEquipmentSetIndex = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.MissionObjectIDCompressionInfo, ref bufferReadValid);
            this.TroopCountInFormation     = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.PlayerCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
コード例 #3
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Peer        = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid);
            this.ComponentId = GameNetworkMessage.ReadUintFromPacket(CompressionBasic.PeerComponentCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
コード例 #4
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Peer     = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid);
            this.Accepted = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            return(bufferReadValid);
        }
コード例 #5
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Player  = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid);
            this.Message = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid);
            return(bufferReadValid);
        }
コード例 #6
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Peer         = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid);
            this.VisualsIndex = GameNetworkMessage.ReadIntFromPacket(CompressionMission.AgentOffsetCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
コード例 #7
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Peer      = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid, true);
            this.PingValue = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.PingValueCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
コード例 #8
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Peer           = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid);
            this.FormationClass = (FormationClass)GameNetworkMessage.ReadIntFromPacket(CompressionOrder.FormationClassCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
コード例 #9
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Peer        = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid);
            this.BotAgent    = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.Health      = GameNetworkMessage.ReadIntFromPacket(CompressionMission.AgentHealthCompressionInfo, ref bufferReadValid);
            this.MountHealth = GameNetworkMessage.ReadIntFromPacket(CompressionMission.AgentHealthCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
コード例 #10
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Peer               = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid);
            this.PerkListIndex      = GameNetworkMessage.ReadIntFromPacket(CompressionMission.PerkListIndexCompressionInfo, ref bufferReadValid);
            this.PerkIndex          = GameNetworkMessage.ReadIntFromPacket(CompressionMission.PerkIndexCompressionInfo, ref bufferReadValid);
            this.SelectedTroopIndex = GameNetworkMessage.ReadIntFromPacket(CompressionMission.SelectedTroopIndexCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
コード例 #11
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.VictimPeer   = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid);
            this.AttackerPeer = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid);
            this.KillCount    = GameNetworkMessage.ReadIntFromPacket(CompressionMatchmaker.KillDeathAssistCountCompressionInfo, ref bufferReadValid);
            this.AssistCount  = GameNetworkMessage.ReadIntFromPacket(CompressionMatchmaker.KillDeathAssistCountCompressionInfo, ref bufferReadValid);
            this.DeathCount   = GameNetworkMessage.ReadIntFromPacket(CompressionMatchmaker.KillDeathAssistCountCompressionInfo, ref bufferReadValid);
            this.Score        = GameNetworkMessage.ReadIntFromPacket(CompressionMatchmaker.ScoreCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }
コード例 #12
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Peer      = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid);
            this.VotedType = (CultureVoteTypes)GameNetworkMessage.ReadIntFromPacket(CompressionMission.TeamSideCompressionInfo, ref bufferReadValid);
            int index = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.CultureIndexCompressionInfo, ref bufferReadValid);

            if (bufferReadValid)
            {
                MBReadOnlyList <BasicCultureObject> objectTypeList = MBObjectManager.Instance.GetObjectTypeList <BasicCultureObject>();
                this.VotedCulture = index < 0 ? (BasicCultureObject)null : objectTypeList[index];
            }
            return(bufferReadValid);
        }
コード例 #13
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Peer = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid);
            if (bufferReadValid)
            {
                this.Equipment = new Equipment();
                for (EquipmentIndex equipmentIndex = EquipmentIndex.WeaponItemBeginSlot; equipmentIndex < EquipmentIndex.NumEquipmentSetSlots; ++equipmentIndex)
                {
                    if (bufferReadValid)
                    {
                        this.Equipment.AddEquipmentToSlotWithoutAgent(equipmentIndex, ModuleNetworkData.ReadItemReferenceFromPacket(MBObjectManager.Instance, ref bufferReadValid));
                    }
                }
            }
            return(bufferReadValid);
        }
コード例 #14
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Peer = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid);
            ulong part1 = GameNetworkMessage.ReadUlongFromPacket(CompressionBasic.DebugULongNonCompressionInfo, ref bufferReadValid);
            ulong part2 = GameNetworkMessage.ReadUlongFromPacket(CompressionBasic.DebugULongNonCompressionInfo, ref bufferReadValid);
            ulong part3 = GameNetworkMessage.ReadUlongFromPacket(CompressionBasic.DebugULongNonCompressionInfo, ref bufferReadValid);
            ulong part4 = GameNetworkMessage.ReadUlongFromPacket(CompressionBasic.DebugULongNonCompressionInfo, ref bufferReadValid);

            this.BannerCode = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid);
            if (bufferReadValid)
            {
                this.ProvidedId = new PlayerId(part1, part2, part3, part4);
            }
            this.BodyProperties    = GameNetworkMessage.ReadBodyPropertiesFromPacket(ref bufferReadValid);
            this.ChosenBadgeIndex  = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.PlayerChosenBadgeCompressionInfo, ref bufferReadValid);
            this.ForcedAvatarIndex = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.ForcedAvatarIndexCompressionInfo, ref bufferReadValid);
            return(bufferReadValid);
        }