Jump to content

Ordush

Elite user
  • Posts

    1167
  • Joined

  • Last visited

Bug Report Comments posted by Ordush

  1. @Droidz

    Okay so it works in a way. It shows the correct range now, however it does not do it based on the target size.
    My aciton bar is "white" meaning the game even thinks i'm far enough away. But with a mob with a big target size, you have to go further than 8 yards away to use ranged abilities.

    Is there any way i can get target size into my calculation?

  2. 1 hour ago, Droidz said:

    Hello,

    spell.IsDistanceGood (and distance check option in fightclasses editor) test only max distance (not min spell distance).

    I tested this code and he seem to works:

    
    float min = 8, max = 35;
    var cMin = ObjectManager.Target.GetDistance - ObjectManager.Target.CombatReach - ObjectManager.Me.CombatReach;
    var cMax = ObjectManager.Target.GetDistance + ObjectManager.Target.CombatReach + ObjectManager.Me.CombatReach;
    bool inRange = cMin >= min && cMax <= max;
    Logging.Write("cMin = " + cMin + " - cMax" + cMax + " - inRange= " + inRange);

     

    One line (for xml fightclass): 

    
    ((ObjectManager.Target.GetDistance - ObjectManager.Target.CombatReach - ObjectManager.Me.CombatReach) >= 8 && (ObjectManager.Target.GetDistance + ObjectManager.Target.CombatReach + ObjectManager.Me.CombatReach) <= 35)

     

    Cheers Droidz. I will test it out!
    Just another thing. WRobot thinks that hunter range is 5 yards. in Vanilla it's 8 yards. At least it was like that last i tested. :)

  3. On 2/16/2018 at 12:46 PM, Droidz said:

    This does not fix anything?
    The first one just tells if a auto-shot is in range, the other one checks attack.

    It's nice that we can check if a spell is in range. However, this does not give the range.
    We need the number (Range as a number).
    The methods listed above will make a shit ton of noise if you play with sound, and it uses lua which will slow down the fightclass.
    Also try and look at what i wrote above.. I wrote EXACTLY that code.

    Quote
    
    /run DEFAULT_CHAT_FRAME:AddMessage(IsActionInRange(1))

    To me it's clear that what is not working is the mob size calculator.

  4. It works fine in the way that i am using it.
    In my TBC profile, this works perfectly, no bugs etc.
    The issue here is the range being off, which is what i started saying. :)
    I think i've produced enough evidence. :)
    Also, the range needed for ranged attacks is set to 5 yards. in vanilla it's not 5 yards it's 8 yards. :)

  5. wManager.Events.FightEvents.OnFightLoop += (unit, cancelable) => {
    			var unitsAffectingMyCombat = ObjectManager.GetUnitAttackPlayer();
    			var unitsAttackMe = unitsAffectingMyCombat.Where(u => u != null && u.IsValid && u.IsTargetingMe).ToList();
    			LuaUtils.wrPrint("GetDistance:" +ObjectManager.Target.GetDistance);
    			LuaUtils.wrPrint("DistanceGood:" + _AutoShot.IsDistanceGood);
    			if (ObjectManager.Target.IsAttackable && unit.IsValid && !ObjectManager.Me.IsCast && ObjectManager.Target.GetDistance < 8 && !ObjectManager.Target.IsTargetingMe && !ObjectManager.Target.GetMove && unitsAttackMe.Count <= 0)
    			{
    				Move.Backward(Move.MoveAction.PressKey, 3000);
    			}
    		};

    However, it's not so much the refresh rate of the distance calculation, because as you can see in my screenshot, i am standing completely still at 7yard range from the mob, and WRobot thinks i'm 9 yards away.

    Edit: When a mob is melee hitting me WRobot thinks it's 3 yards away.

  6. Please @Droidz read this, and see my screenshot.

    5a539c7848fa9_buggedrange.png.31a4574c148ba3e8acd0e719b0f42cf7.png

    The code to print ObjectManager.Target.GetDistance i use is here:
     

    public static void wrPrint(float message)
    	{
    		{
    			Lua.LuaDoString("DEFAULT_CHAT_FRAME:AddMessage('" + message.ToString() + "')");
    		}
    	}

    Then you can just put wrPrint(ObjectManager.Target.GetDistance);
    Into a while loop or into wManager.Events.FightEvents.OnFightLoop += (unit, cancelable) => { }; if you only wanna spam your chat when actually shooting a mob or dummy.

    I need to be 13.3 yards away from the target, for it to be in range with a 8 yard spell (any ranged hunter attack). So when i am actually 8 yards away from the target, ObjectManager.Target.GetDistance thinks i'm 13.3 yards away. This is both with and without Calculate interact/combat distance by target size in general advanced settings.

    wrPrint("DistanceGood:" + _AutoShot.IsDistanceGood); This prints false under what ObjectManager.Target.GetDistance claims is 5 yards, above 5 yards it prints true.
    But in vanilla Auto Shot distance is not 5 Yards, it's 8 Yards.

    If you want to compare you IsDistanceGood with in-game "Is Distance Good" checker then you can do

    /run DEFAULT_CHAT_FRAME:AddMessage(IsActionInRange(1))

    then put whatever spell you wanna check against on action bar slot 1.
    Like Auto Shot

  7. 4 hours ago, Droidz said:

    Hello, try to disable option "auto calcul range..." in advanced general settings

    I don't see that anywhere in my settings, but i tried turning off Calculate interact/combat distance by target size.
    Did not help anything. :(

    Edit: It looks like the target size calculator is what is not working.

  8. 1 hour ago, Matenia said:

    If it has a timer known to you, then it is your own.

    So buffs in tbc cast by someone else than me does not have a timer?
    Because if that is the case then you could easily make a function for it either by adding it to the UnitBuff table allready made by blizzard, or by making your own function.

    -- Unit Buff by me
        function UnitBuffMe(unit, spellid)
        	for i=1,40 do 
                local buffName,buffRank,buffTexture,buffCount,buffDuration,buffExpiration=UnitBuff(unit,i);
                if buffDuration ~= nil and buffName == GetSpellInfo(spellid) then
                  return true
                end
            end
        	return false
        end

    then you could use UnitBuffMe("target", spellid) then replace spellid by either spell name or spell id.  (i'd suggest spell id for multiple client languages.)

    Example:
     

    -- Unit Buff by me
        function UnitBuffMe(unit, spellid)
        	for i=1,40 do 
                local buffName,buffRank,buffTexture,buffCount,buffDuration,buffExpiration=UnitBuff(unit,i);
                if buffDuration ~= nil and buffName == GetSpellInfo(spellid) then
                  return true
                end
            end
        	return false
        end
    
    if UnitBuffMe("target", 26981) == false then
      CastSpellByName(GetSpellInfo(26981), tar)
    end

    This would check if the target has the buff Rejuvenation cast by you, if not then it will apply it. :)

  9. 2 hours ago, Droidz said:

    Hello, you can use c# condition like:

    
    (ObjectManager.Me.FocusObj.IsValid && ObjectManager.Me.FocusObj.HaveBuff("SPELLNAME"))
    (ObjectManager.Me.FocusObj.IsValid && ObjectManager.Me.FocusObj.BuffTimeLeft("SPELLNAME") < 1000)
    (ObjectManager.Me.FocusObj.IsValid && ObjectManager.Me.FocusObj.HealthPercent <= 50)

     

    Hey Droidz!
    Yeah i'm aware, you can also use lua (all my fightclasses are made in lua). But it would be awesome to have them as a choice in the condition.
    That's just because i'm a perfectionist. :)

×
×
  • Create New...