Exemple #1
0
        public static void WriteEntityEquipableAbility(this NetworkWriter writer, EntityEquipableAbility equipableAbility)
        {
            writer.WriteInt32(equipableAbility.Ability.AbilityID);
            writer.WriteBoolean(equipableAbility.OverrideTrigger);
            if (equipableAbility.OverrideTrigger)
            {
                writer.WriteAbilityTriggerData(equipableAbility.TriggerData);
            }
            writer.WriteBoolean(equipableAbility.OverrideCooldown);
            if (equipableAbility.OverrideCooldown)
            {
                writer.WriteDouble(equipableAbility.Cooldown);
            }

            int abilitiesResourcesInfluencesLength = equipableAbility.AbilitiesResourcesInfluences == null ? 0 : equipableAbility.AbilitiesResourcesInfluences.Length;

            writer.WriteInt32(abilitiesResourcesInfluencesLength);
            for (int i = 0; i < abilitiesResourcesInfluencesLength; i++)
            {
                writer.EntityEquipableAbilityResourcesInfluences(equipableAbility.AbilitiesResourcesInfluences[i]);
            }
        }