Advertisement
jbrocky

Untitled

Jun 3rd, 2018
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.78 KB | None | 0 0
  1.     recastable_buffs = @buff_spells
  2.                        .select { |_name, data| data['recast'] || data['recast_every'] || data['expire'] }
  3.                        .select { |_name, data| data['expire'] ? Flags["ct-#{data['abbrev']}"] : true }
  4.                        .select { |name, _data| check_buff_conditions?(name, game_state) }
  5.  
  6.     name, data = recastable_buffs.find do |name, data|
  7.       if data['pet_type']
  8.         check_spell_timer?(data) && DRRoom.npcs.include?(data['pet_type'])
  9.       elsif data['recast_every']
  10.         check_spell_timer?(data)
  11.       elsif data['expire']
  12.         true
  13.       else
  14.         !DRSpells.active_spells[name] || DRSpells.active_spells[name].to_i <= data['recast']
  15.       end
  16.     end
  17.  
  18.     echo("found buff missing: #{name}") if $debug_mode_ct && name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement