julianperrott / WowClassicGrindBot

WOW Classic Grind Bot, World of Warcraft Grind Bot - No DLL injection or memory watching, just screen capture and mouse and keyboard clicking.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NullPointerExceptions with custom path

pikachyu opened this issue · comments

Hi there,

I am getting NullPointer exceptions right after I start the bot.
I have recorded a custom path, edited the class file to use this file (path_etc.json).
I am in the same map as I recorded the path.

Log is filled with below;

[20:24:53 ERR] PerformAction on FollowRouteGoal
System.NullReferenceException: Object reference not set to an instance of an object.
   at PathingAPI.PPatherService.GetWorldLocation(Int32 uiMapId, Single v1, Single v2) in C:\Users\jpl\Documents\WowClassicGrindBot\PathingAPI\Search\PPatherService.cs:line 66
   at BlazorServer.LocalPathingApi.FindRoute(Int32 map, WowPoint fromPoint, WowPoint toPoint) in C:\Users\jpl\Documents\WowClassicGrindBot\BlazorServer\PathingApi\LocalPathingApi.cs:line 40
   at Libs.Goals.FollowRouteGoal.RefillRouteToNextWaypoint(Boolean forceUsePathing) in C:\Users\jpl\Documents\WowClassicGrindBot\Libs\Goals\FollowRouteGoal.cs:line 302
   at Libs.Goals.FollowRouteGoal.PerformAction() in C:\Users\jpl\Documents\WowClassicGrindBot\Libs\Goals\FollowRouteGoal.cs:line 136
   at Libs.Goals.GoalThread.GoapPerformGoal() in C:\Users\jpl\Documents\WowClassicGrindBot\Libs\Goals\GoalThread.cs:line 57

Thanks!

Barrens seems to be the issue, works in the other areas.

Could you do the following command in the chat window and tell me what it says.

/dump C_Map.GetBestMapForUnit("player")

[1]=1413
I just noticed that player dot is missing from the map.
1413 is in the csv

commented

I'm getting the same error message:

[10:13:56 ERR] PerformAction on FollowRouteGoal
System.NullReferenceException: Object reference not set to an instance of an object.
at PathingAPI.PPatherService.GetWorldLocation(Int32 uiMapId, Single v1, Single v2) in C:\Users\Leonard\Desktop\downloads\wowo2\WowClassicGrindBot3\PathingAPI\Search\PPatherService.cs:line 66
at BlazorServer.LocalPathingApi.FindRoute(Int32 map, WowPoint fromPoint, WowPoint toPoint) in C:\Users\Leonard\Desktop\downloads\wowo2\WowClassicGrindBot3\BlazorServer\PathingApi\LocalPathingApi.cs:line 40
at Libs.Goals.FollowRouteGoal.RefillRouteToNextWaypoint(Boolean forceUsePathing) in C:\Users\Leonard\Desktop\downloads\wowo2\WowClassicGrindBot3\Libs\Goals\FollowRouteGoal.cs:line 302
at Libs.Goals.FollowRouteGoal.PerformAction() in C:\Users\Leonard\Desktop\downloads\wowo2\WowClassicGrindBot3\Libs\Goals\FollowRouteGoal.cs:line 136
at Libs.Goals.GoalThread.GoapPerformGoal() in C:\Users\Leonard\Desktop\downloads\wowo2\WowClassicGrindBot3\Libs\Goals\GoalThread.cs:line 57

Also got [1]=1413 in Barrens.

https://github.com/julianperrott/WowClassicGrindBot/blob/master/PathingAPI/WorldToMap/WorldMapArea.json

{
    "ID": 11,
    "MapID": 1,
    "AreaID": 17,
    "AreaName": "Barrens",
    "LocLeft": 2622.9165,
    "LocRight": -7510.4165,
    "LocTop": 1612.49988,
    "LocBottom": -5143.75
},

https://github.com/julianperrott/WowClassicGrindBot/blob/master/PathingAPI/WorldToMap/uimap.csv

Name_lang ID ParentUiMapID Flags System Type LevelRangeMin LevelRangeMax BountySetID BountyDisplayLocation VisibilityPlayerConditionID HelpTextPosition BkgAtlasID
Azeroth 947 0 2304 0 1 0 0 0 0 0 0 0
Durotar 1411 1414 4 0 3 0 0 0 0 0 0 0
Mulgore 1412 1414 4 0 3 0 0 0 0 0 0 0
The Barrens 1413 1414 4 0 3 0 0 0 0 0 0 0

Not sure how the mapping is performed, but something should be changed in WorldMapArea.json maybe?

I'll debug it this weekend, will create PR.

Should be fixed in the latest code.