Compare commits

..

3 Commits

Author SHA1 Message Date
Ponk
d307eff71f Merge pull request #177 from LynxStar/patch/mini-dungeons #patch
Fix mini-dungeon portals for parties
2023-07-10 23:09:51 +02:00
Arthur Charlton
b935725096 Handle the potentially null portal based on the name.
Matches the behavior of warping a character to a named portal.
2023-07-10 17:01:48 -04:00
Arthur Charlton
3816e1c5bd Add the warp party function that the scripts use 2023-07-03 18:25:14 -04:00

View File

@@ -133,6 +133,23 @@ public class AbstractPlayerInteraction {
warpParty(id, portalId, mapid, mapid);
}
public void warpParty(int map, String portalName) {
int mapid = getMapId();
var warpMap = c.getChannelServer().getMapFactory().getMap(map);
var portal = warpMap.getPortal(portalName);
if (portal == null) {
portal = warpMap.getPortal(0);
}
var portalId = portal.getId();
warpParty(map, portalId, mapid, mapid);
}
public void warpParty(int id, int fromMinId, int fromMaxId) {
warpParty(id, 0, fromMinId, fromMaxId);
}