private void CharacterManager_LoadAiCharactersFromSave(On.CharacterManager.orig_LoadAiCharactersFromSave orig, CharacterManager self, CharacterSaveData[] _saves)
    {
        orig(self, _saves);
        if (self.PlayerCharacters.Count == 0)
        {
            return;
        }
        Character player = self.Characters[CharacterManager.Instance.PlayerCharacters.Values[0]];

        //OLogger.Log($"Engaged={ player.EngagedCharacters.Count}");
        for (int i = 0; i < self.Characters.Count; i++)
        {
            Character character = self.Characters.Values[i];
            //OLogger.Log($"AddChar={_char.Name} {_char.IsAlly(player)} {_char.IsDead}");
            if (!character.IsLocalPlayer && !character.IsAlly(player) && !character.IsDead)
            {
                //OLogger.Log($"Reset={character.Name} ({character.Health}/{character.Stats.MaxHealth})");
                character.ResetStats();
                character.StatusEffectMngr.RemoveShortStatuses(); // Remove debuffs
            }
        }
    }
Exemplo n.º 2
0
 private void CharacterManager_LoadAiCharactersFromSave(On.CharacterManager.orig_LoadAiCharactersFromSave orig, CharacterManager self, CharacterSaveData[] _saves)
 {
     // do nothing --> Enemies always respawn
 }