Handle the potentially null portal based on the name.

Matches the behavior of warping a character to a named portal.
This commit is contained in:
Arthur Charlton
2023-07-10 17:01:48 -04:00
parent 3816e1c5bd
commit b935725096

View File

@@ -137,9 +137,16 @@ public class AbstractPlayerInteraction {
int mapid = getMapId();
var warpMap = c.getChannelServer().getMapFactory().getMap(map);
var portal = warpMap.getPortal(portalName).getId();
warpParty(map, portal, mapid, mapid);
var portal = warpMap.getPortal(portalName);
if (portal == null) {
portal = warpMap.getPortal(0);
}
var portalId = portal.getId();
warpParty(map, portalId, mapid, mapid);
}