Ordush
-
Posts
1167 -
Joined
-
Last visited
Content Type
Forums
Articles
Bug Tracker
Downloads
Store
Bug Report Comments posted by Ordush
-
-
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. :) -
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.
-
On 1/18/2018 at 3:43 PM, Droidz said:
Try
var dist = ObjectManager.Target.GetDistance - ObjectManager.Target.CombatReach;
@Droidz Sorry bout the late answer, i was hospitalized.
This prints 11,3342 as range, when it's 8 yard range. So not better. =/ -
Still no word? @Droidz
-
@Droidz
Pretty please look into this <3 -
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. :) -
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. -
Please @Droidz read this, and see my screenshot.
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 -
@Droidz
It should be very easy to reproduce, because i am using the code you supplied in another thread. :) -
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.
-
I even tried telling it to walk away if !_AutoShoot.IsDistanceGood , same problem (_AutoShot is Spell "Auto Shot")
-
Any chance that @Droidz will comment on this? :)
-
Yeah, the way to make it work with raid, is what i wrote above. :P
Will it be added, or will i have to manually rewrite all my code to use lua instead? -
I am sure you could use this to make the function in the fight class editor work with tbc @Droidz
-
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. :)
-
I see that it is marked as not a bug. Is this something that will change? Or will this just remain impossible in TBC?
-
This is a problem because if you play with other hunters, you won't be able to use Serpent Sting. Just imagine being a resto druid with another resto druid in party. ;)
-
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. :)
Range Calculater for WoW Vanilla is off
in Bug Tracker
Posted · Edited by Ordush
@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?