Addition of quest related teleporter dialogs.

Contributed by NightBR.
This commit is contained in:
MobiusDevelopment
2019-04-11 12:48:04 +00:00
parent 167b4557d7
commit e5c1a7fdf3
42 changed files with 447 additions and 21 deletions

View File

@@ -21,6 +21,7 @@ import com.l2jmobius.gameserver.cache.HtmCache;
import com.l2jmobius.gameserver.handler.IBypassHandler;
import com.l2jmobius.gameserver.model.actor.Creature;
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import com.l2jmobius.gameserver.model.actor.instance.TeleporterInstance;
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
public class Link implements IBypassHandler
@@ -73,6 +74,23 @@ public class Link implements IBypassHandler
"teleporter/separatedsoul.htm",
"warehouse/clanwh.htm",
"warehouse/privatewh.htm",
// Quests
"teleporter/30006.htm",
"teleporter/30006-Q561.htm",
"teleporter/30006-Q561-1.htm",
"teleporter/30006-Q561-2.htm",
"teleporter/30134.htm",
"teleporter/30134-Q562.htm",
"teleporter/30134-Q562-1.htm",
"teleporter/30134-Q562-2.htm",
"teleporter/30256.htm",
"teleporter/30256-Q562.htm",
"teleporter/30256-Q562-1.htm",
"teleporter/30256-Q562-2.htm",
"teleporter/30848.htm",
"teleporter/30848-Q561-Q562.htm",
"teleporter/30848-Q561-Q562-1.htm",
"teleporter/30848-Q561-Q562-2.htm",
};
@Override
@@ -91,7 +109,12 @@ public class Link implements IBypassHandler
return false;
}
final String content = CommonUtil.contains(VALID_BYPASSES, htmlPath) ? HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath) : null;
String content = CommonUtil.contains(VALID_BYPASSES, htmlPath) ? HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath) : null;
// Precaution.
if (htmlPath.startsWith("teleporter/") && !(player.getTarget() instanceof TeleporterInstance))
{
content = null;
}
final NpcHtmlMessage html = new NpcHtmlMessage(target != null ? target.getObjectId() : 0);
if (content != null)
{