コード例 #1
0
 public ClientPositionHitResults(Component context, ref IBitStream stream)
 {
     m_effectsToStart    = AbilityResultsUtils.DeSerializeEffectsToStartFromStream(context, ref stream);
     m_barriersToStart   = AbilityResultsUtils.DeSerializeBarriersToStartFromStream(context, ref stream);
     m_effectsToRemove   = AbilityResultsUtils.DeSerializeEffectsForRemovalFromStream(ref stream);
     m_barriersToRemove  = AbilityResultsUtils.DeSerializeBarriersForRemovalFromStream(ref stream);
     m_sequencesToEnd    = AbilityResultsUtils.DeSerializeSequenceEndDataListFromStream(ref stream);
     m_reactionsOnPosHit =
         AbilityResultsUtils.DeSerializeClientMovementResultsListFromStream(context, ref stream);
     ExecutedHit = false;
 }
コード例 #2
0
        public ClientActorHitResults(Component context, ref IBitStream stream)
        {
            byte bitField1 = 0;

            stream.Serialize(ref bitField1);
            ServerClientUtils.GetBoolsFromBitfield(bitField1, out m_hasDamage, out m_hasHealing, out m_hasTechPointGain,
                                                   out m_hasTechPointLoss, out m_hasTechPointGainOnCaster, out m_hasKnockback,
                                                   out m_targetInCoverWrtDamage, out m_canBeReactedTo);
            byte bitField2 = 0;

            stream.Serialize(ref bitField2);
            ServerClientUtils.GetBoolsFromBitfield(bitField2, out m_damageBoosted, out m_damageReduced,
                                                   out m_updateCasterLastKnownPos, out m_updateTargetLastKnownPos, out m_updateEffectHolderLastKnownPos,
                                                   out m_updateOtherLastKnownPos, out m_isPartOfHealOverTime, out m_triggerCasterVisOnHitVisualOnly);
            short num1 = 0;
            short num2 = 0;
            short num3 = 0;
            short num4 = 0;
            short num5 = 0;

            if (m_hasDamage)
            {
                stream.Serialize(ref num1);
                m_finalDamage = num1;
            }

            if (m_hasHealing)
            {
                stream.Serialize(ref num2);
                m_finalHealing = num2;
            }

            if (m_hasTechPointGain)
            {
                stream.Serialize(ref num3);
                m_finalTechPointsGain = num3;
            }

            if (m_hasTechPointLoss)
            {
                stream.Serialize(ref num4);
                m_finalTechPointsLoss = num4;
            }

            if (m_hasTechPointGainOnCaster)
            {
                stream.Serialize(ref num5);
                m_finalTechPointGainOnCaster = num5;
            }

            if (m_hasKnockback)
            {
                short invalidActorIndex = (short)ActorData.s_invalidActorIndex;
                stream.Serialize(ref invalidActorIndex);
                m_knockbackSourceActor = (int)invalidActorIndex == ActorData.s_invalidActorIndex
                    ? null
                    : context.GameFlowData.FindActorByActorIndex(invalidActorIndex);
            }

            if ((!m_hasDamage || !m_targetInCoverWrtDamage ? (m_hasKnockback ? 1 : 0) : 1) != 0)
            {
                float num6 = 0.0f;
                float num7 = 0.0f;
                stream.Serialize(ref num6);
                stream.Serialize(ref num7);
                m_damageHitOrigin.X = num6;
                m_damageHitOrigin.Y = 0.0f;
                m_damageHitOrigin.Z = num7;
            }

            if (m_updateEffectHolderLastKnownPos)
            {
                short invalidActorIndex = (short)ActorData.s_invalidActorIndex;
                stream.Serialize(ref invalidActorIndex);
                m_effectHolderActor = (int)invalidActorIndex == ActorData.s_invalidActorIndex
                    ? null
                    : context.GameFlowData.FindActorByActorIndex(invalidActorIndex);
            }

            if (m_updateOtherLastKnownPos)
            {
                byte num6 = 0;
                stream.Serialize(ref num6);
                m_otherActorsToUpdateVisibility = new List <ActorData>(num6);
                for (int index = 0; index < (int)num6; ++index)
                {
                    short invalidActorIndex = (short)ActorData.s_invalidActorIndex;
                    stream.Serialize(ref invalidActorIndex);
                    if (invalidActorIndex != ActorData.s_invalidActorIndex)
                    {
                        ActorData actorByActorIndex = context.GameFlowData.FindActorByActorIndex(invalidActorIndex);
                        if (actorByActorIndex != null)
                        {
                            m_otherActorsToUpdateVisibility.Add(actorByActorIndex);
                        }
                    }
                }
            }

            bool out0_1    = false;
            bool out1_1    = false;
            bool out2_1    = false;
            bool out2_2    = false;
            bool out3_1    = false;
            bool out4      = false;
            bool out5      = false;
            bool out6      = false;
            bool out7      = false;
            bool out0_2    = false;
            bool out1_2    = false;
            bool out3_2    = false;
            byte bitField3 = 0;
            byte bitField4 = 0;

            stream.Serialize(ref bitField3);
            stream.Serialize(ref bitField4);
            ServerClientUtils.GetBoolsFromBitfield(bitField3, out out0_1, out out1_1, out out2_2, out out3_1, out out4,
                                                   out out5, out out6, out out7);
            ServerClientUtils.GetBoolsFromBitfield(bitField4, out out0_2, out out1_2, out out2_1, out out3_2);
            m_effectsToStart = !out0_1
                ? new List <ClientEffectStartData>()
                : AbilityResultsUtils.DeSerializeEffectsToStartFromStream(context, ref stream);
            m_effectsToRemove = !out1_1
                ? new List <int>()
                : AbilityResultsUtils.DeSerializeEffectsForRemovalFromStream(ref stream);
            m_barriersToAdd = !out2_1
                ? new List <ClientBarrierStartData>()
                : AbilityResultsUtils.DeSerializeBarriersToStartFromStream(context, ref stream);
            m_barriersToRemove = !out2_2
                ? new List <int>()
                : AbilityResultsUtils.DeSerializeBarriersForRemovalFromStream(ref stream);
            m_sequencesToEnd = !out3_1
                ? new List <ServerClientUtils.SequenceEndData>()
                : AbilityResultsUtils.DeSerializeSequenceEndDataListFromStream(ref stream);
            m_reactions = !out4
                ? new List <ClientReactionResults>()
                : AbilityResultsUtils.DeSerializeClientReactionResultsFromStream(context, ref stream);
            m_powerupsToRemove =
                !out5 ? new List <int>() : AbilityResultsUtils.DeSerializePowerupsToRemoveFromStream(ref stream);
            m_powerupsToSteal =
                !out6
                    ? new List <ClientPowerupStealData>()
                    : AbilityResultsUtils.DeSerializePowerupsToStealFromStream(context, ref stream);
            m_directPowerupHits =
                !out7
                    ? new List <ClientMovementResults>()
                    : AbilityResultsUtils.DeSerializeClientMovementResultsListFromStream(context, ref stream);
            m_gameModeEvents = !out0_2
                ? new List <ClientGameModeEvent>()
                : AbilityResultsUtils.DeSerializeClientGameModeEventListFromStream(context, ref stream);
            m_overconIds = !out3_2
                ? new List <int>()
                : AbilityResultsUtils.DeSerializeClientOverconListFromStream(ref stream);
            m_isCharacterSpecificAbility = out1_2;
            IsMovementHit = false;
            ExecutedHit   = false;
        }