RangeFinder for CanAttack #619


  • New
  • Enhancment
Open
Assigned to ckknight
  • _ForgeUser2593853 created this issue Oct 10, 2009

    Hi, while leveling an alt I encountered the following problem:

    The current check methods are not sufficient for neutral, i. e. "yellow", mobs.

    If I use 'class' I almost have to stand next to the mob for its unit frame to fade in.
    If I use 'custom_spell' with a harmful spell, e.g. "Fireball", the target unit frame will be faded in correctly, but the player frame will always be faded.

    @ Solution @

    Add

    can_attack = L['Can attack']
    

    to

    PitBull4_RangeFader:SetLayoutOptionsFunction
    

    Add

    elseif check_method == "can_attack" then
      		if UnitCanAttack("player", unit) then
      			if enemy_is_in_range(unit) then
      				return 1
      			elseif enemy_is_in_long_range(unit) then
      				return (db.out_of_range_opacity + frame.layout_db.opacity_max) / 2
      			else
      				return db.out_of_range_opacity
      			end
      		else
      			return db.out_of_range_opacity
      		end
    

    before the

    else -- class
    

    statement in

    PitBull4_RangeFader:GetOpacity
    
  • _ForgeUser2593853 added the tags New Enhancment Oct 10, 2009
  • _ForgeUser3183016 posted a comment Oct 13, 2009
    The custom spell option would be much more useful if different spells could be listed for helpful, attackable, and other. bossmansmith is having trouble with that on the main Pitbull page comments, and I've wanted to be able to fade my target frame differently by hostility too.

To post a comment, please login or register a new account.