It seems that the 'range' calculator for Vanilla is off by a few yards.
If i tell the bot to walk away from mobs if they are less than 8 yards range from me (to be able to use ranged abilities as hunter), the bot does not walk far enough away (it walks less then 8 yards away).
If i set it to 12 yards instead of 8, then it will walk far enough away for the mob to be more then 8 yards range from me)
This works totally fine in TBC, but not in Vanilla.
QuoteI even tried telling it to walk away if !_AutoShoot.IsDistanceGood , same problem (_AutoShot is Spell "Auto Shot")
Hello, try to disable option "auto calcul range..." in advanced general settings
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.
Edited January 5 by Ordush@Droidz
It should be very easy to reproduce, because i am using the code you supplied in another thread. :)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.
Edited January 8 by Ordush
Like Auto ShotI even tried telling it to walk away if !_AutoShoot.IsDistanceGood , same problem (_AutoShot is Spell "Auto Shot")
Are you walking away by doing the "button press" logic that move during combat plugin does? I had problems with that and the refresh rate of the calculation of target distance before.
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.
Edited January 9 by Ordush
Edit: When a mob is melee hitting me WRobot thinks it's 3 yards away.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.I tried this code out, while useful, it seems to only "tap" the back button, I did reproduce the range calculation being off though...
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. :)@Droidz
Pretty please look into this <3Still no word? @Droidz
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 ShotTry
var dist = ObjectManager.Target.GetDistance - ObjectManager.Target.CombatReach;
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./run DEFAULT_CHAT_FRAME:AddMessage(IsActionInRange(1))To me it's clear that what is not working is the mob size calculator.
Edited February 19 by OrdushHey, as mangos emu is the only vanilla server software around these day i fuge most likely all of the private servers run on it (more or less modified).
So here is the table containing the npc hitbox-radii and combat-reaches from the default mangos database. of cause they may have been modified on some servers.
ttps://github.com/mangoszero/database/blob/master/World/Setup/FullDB/creature_model_info.sqlBut as it is now the hitbox data Wrobot reads from the wow client ist absolutely unreliable.
Is the hitbox size even sent to the wow client? or is it just handled server-wise?I tried to dig into mangos server code a little to find out if it sends the info to the client, so that it could be read with the right opcode.
But i'm to lazy to trac the networklogic down to that point, this might be the funktion that sets it internally, no idea if that is then send or not:
https://github.com/mangoszero/server/blob/52454825c7e1435ff53f32f9edf9fe7dca10ec08/src/game/Object/Unit.cpp#L8836
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now