Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def handle_player_buff(buffer)
- param_id = buffer.read_byte
- buff_level = buffer.read_short
- if buff_level == 1
- $game_actors[1].add_buff(param_id, 0)
- elsif buff_level == -1
- $game_actors[1].add_debuff(param_id, 0)
- else
- $game_actors[1].remove_buff(param_id)
- end
- if $windows.has_key?(:states)
- $windows[:states].visible = $game_actors[1].result.status_affected?
- $windows[:states].refresh if $windows[:states].visible
- end
- # Se alterou o HP ou o MP máximo
- $windows[:hud].refresh if param_id < 2 && $windows.has_key?(:hud)
- $windows[:status].refresh if $windows.has_key?(:status) && $windows[:status].visible
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement