Small improvement for Link buypass.

This commit is contained in:
MobiusDev
2016-10-09 19:21:15 +00:00
parent 8d396c902e
commit f3249daaca
10 changed files with 18 additions and 18 deletions

View File

@@ -16,6 +16,7 @@
*/
package handlers.bypasshandlers;
import com.l2jmobius.gameserver.cache.HtmCache;
import com.l2jmobius.gameserver.handler.IBypassHandler;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
@@ -44,10 +45,9 @@ public class Link implements IBypassHandler
return false;
}
final String filename = "data/html/" + htmlPath;
final String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/" + htmlPath);
final NpcHtmlMessage html = new NpcHtmlMessage(target != null ? target.getObjectId() : 0);
html.setFile(activeChar.getHtmlPrefix(), filename);
html.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0));
html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0)));
activeChar.sendPacket(html);
return true;
}