コード例 #1
0
        public static bool Prefix(CombatGameState __instance)
        {
            RepairHelper.Clear();
            HashSet <string> clearComponents = new HashSet <string>();

            foreach (var avfx in ComponentVFXHelper.componentsVFXObjects)
            {
                clearComponents.Add(avfx.Key);
            }
            foreach (var compGUID in clearComponents)
            {
                if (ComponentVFXHelper.componentsVFXObjects.ContainsKey(compGUID))
                {
                    ComponentVFXHelper.componentsVFXObjects[compGUID].Clean();
                }
            }
            ComponentVFXHelper.componentsVFXObjects.Clear();
            CAEAuraHelper.ClearBubbles();
            CombatHUDWeaponPanelExHelper.Clear();
            CombatHUDEquipmentPanel.Clear();
            ActivatableComponent.Clear();
            CombatHUDEquipmentSlotEx.Clear();
            CombatHUDEquipmentPanel.Clear();
            AbstractActor_InitAbstractActor.Clear();
            C3Helper.Clear();
            //DamageHelpers.DamageHelper.Clear();
            return(true);
        }
コード例 #2
0
        public static void RecalcEncounterFlag(this StatisticEffect __instance)
        {
            if (__instance.Target == null)
            {
                return;
            }
            if (__instance.EffectData.statisticData.statName.StartsWith(ADD_ENCOUNTER_FLAG_STAT_ID) == false)
            {
                return;
            }
            string encounter_flag_name = __instance.EffectData.statisticData.statName.Substring(ADD_ENCOUNTER_FLAG_STAT_ID.Length);

            Log.Debug?.WL(1, "encounter flag name:" + encounter_flag_name);
            Statistic encStat = __instance.Target.StatCollection.GetStatistic(__instance.EffectData.statisticData.statName);

            if (encStat == null)
            {
                return;
            }
            if (encStat.Value <float>() > Core.Epsilon)
            {
                Log.Debug?.TWL(0, "Add encounter flag by statistic " + __instance.Target.PilotableActorDef.ChassisID + " " + encounter_flag_name);
                __instance.Target.EncounterTags.Add(encounter_flag_name);
            }
            else
            {
                Log.Debug?.TWL(0, "Remove encounter flag by statistic " + __instance.Target.PilotableActorDef.ChassisID + " " + encounter_flag_name);
                __instance.Target.EncounterTags.Remove(encounter_flag_name);
            }
            __instance.Target.UpdateAuras(false);
            if (Core.Settings._C3NetworkEncounterTags.Contains(encounter_flag_name))
            {
                C3Helper.Clear();
            }
        }