-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entry / exit locations for non-dungeon areas #414
Comments
The entry/exit for non dungeon areas is in a separate location to where I am grabbing the dungeon areas from. https://github.com/blacha/diablo2/blob/master/packages/map/map/d2_client.c#L334 this loop is looking over the objects in the map which has all the exits that are objects like stairs or caves. The near by object is never looped, so we are not currently exporting the "nearby" exits. To export the near by you would need to loop the something like for (int i = 0; i < pRoom2->dwRoomsNear; i++) {
if (pLevel->dwLevelNo != pRoom2->pRoom2Near[i]->pLevel->dwLevelNo){
int levelX = pRoom2->pRoom2Near[i]->pLevel->dwPosX * 5;
int levelY = pRoom2->pRoom2Near[i]->pLevel->dwPosY * 5 ;
int levelNumber = pRoom2->pRoom2Near[i]->pLevel->dwLevelNo;
json_object_start();
json_key_value("id", levelNumber);
json_key_value("type", "exit");
json_key_value("x", levelX);
json_key_value("y", levelY);
if (is_good_exit(pAct, pLevel, levelNumber)) json_key_value("isGoodExit", true);
json_object_end();
}
} |
Wow cool, will check out your PR and try it! |
It seams to me that in the json, only dungeon exits are included in the objects list. Is it possible to also include the exit and entry points of non-dungeon areas, such as Cold plains (entry from Blood moor, exit to Stony field)?
Thanks for a useful project.
The text was updated successfully, but these errors were encountered: