Visual Bug in Yanfly Skill Restrictions

Hi guys,

I found a visual bug in Yanfly Skill Restrictions.

Whenever a battle ends, cooldowns are reset properly. However, they're still visible in skill menu. :LZSblush: Please take a look at the screenshot below.

Spoiler: Screenshot
Unbenannt.png

I think I need to fix it somewhere here, but the reset in def on_battle_start looks same as in def on_battle_end - there seems to be nothing wrong here. I can't figure out what to do here.

Code:
#--------------------------------------------------------------------------
  # alias method: on_battle_start
  #--------------------------------------------------------------------------
  alias game_battler_on_battle_start_srs on_battle_start
  def on_battle_start
    game_battler_on_battle_start_srs
    reset_cooldowns
    reset_times_used
  end
 
  #--------------------------------------------------------------------------
  # alias method: on_battle_end
  #--------------------------------------------------------------------------
  alias game_battler_on_battle_end_srs on_battle_end
  def on_battle_end
    game_battler_on_battle_end_srs
    reset_cooldowns
    reset_times_used
  end

May anyone help me? This is just a visual bug, but I bet this can be quite confusing for players.
May anyone help me? This is just a visual bug, but I bet this can be quite confusing for players.
So the countdown is always there?
Perhaps it got carried over since the skill is usable in battle and the menu.
But it is likely due to some other script you have that is not compatible in some way to cause this.

I think you are on the right track. What other scripts do you have that have the def on_battle_end
What other scripts do you have that have the def on_battle_end
I have just Yanfly and Pets and Summons Script by Vlue. I just tried putting Skill Restrictions before Pets and Summons and now it works apparently. Dunno why but that basically solved my problem. :LZSjoy: Thanks for giving me the hint.
Dunno why but that basically solved my problem
Just like I said, the pets and summons has a on_battle_end in the Game_Battler section
Code:
  def on_battle_end
    @pets = []
    pet_obe
  end
It should have worked since it is aliased, but somehow caused a problem.
I would be curious to know if the pets worked properly now.
If it didn't then combining the two would have been the compatibility needed. (probably)
Code:
  def on_battle_end
    @pets = []
    game_battler_on_battle_end_srs
    reset_cooldowns
    reset_times_used
  end

Original thread: https://forums.rpgmakerweb.com/threads/visual-bug-in-yanfly-skill-restrictions.154683/