YEA Battle System with HIME's Permastate

I'm not sure if I'm in the right forum or not, but well...

I'm using YEA Battle System with Hime's Permastate scripts. Both of them don't conflict with each other.
My issue is that, Hime's Permastate doesn't have a pop-up in Yanfly's script. It seems that Hime's script store permastate in a different place?(i dunno...)

Is there someone who can help me with this so that Permastate in hime's script can also pop up in Yanfly's battle system script?
Will this do? untested. Put below both scripts
Code:
class Game_Battler
  def add_permastate(state_id)
   @permastates |= [state_id]
   make_state_popup(state_id, :add_state)
  end
 
  def remove_permastate(state_id)
   @permastates -= [state_id]
   make_state_popup(state_id, :rem_state)
  end
end
Will this do? untested. Put below both scripts
Code:
class Game_Battler
  def add_permastate(state_id)
   @permastates |= [state_id]
   make_state_popup(state_id, :add_state)
  end
 
  def remove_permastate(state_id)
   @permastates -= [state_id]
   make_state_popup(state_id, :rem_state)
  end
end

Yes, it works! Thank you.

Also, I forgot that permastates' icons must show up in Enemy's info, too, so... I kinda brute force my little knowledge in ruby to this. I'll also post it here in case someone needs it since it also works.

Code:
class Game_BattlerBase
 
  def state_icons
    icons = states.collect {|state| state.icon_index }
    icons += permastates.collect {|state| state.icon_index }
    icons.delete(0)
    icons
  end
 
end

Original thread: https://forums.rpgmakerweb.com/threads/yea-battle-system-with-himes-permastate.92711/