Reload html option for custom CB to avoid timeouts.
This commit is contained in:
parent
f6beb2a072
commit
213e4608f0
@ -5,9 +5,9 @@
|
|||||||
<br>
|
<br>
|
||||||
<br1> <!-- add code after this comment -->
|
<br1> <!-- add code after this comment -->
|
||||||
<img src="l2ui.bbs_lineage2" width="128" height="16" ><br>
|
<img src="l2ui.bbs_lineage2" width="128" height="16" ><br>
|
||||||
<button action="bypass _bbsmultisell;2010" value="Shop Test" width=200 height=31 back="L2UI_CT1.OlympiadWnd_DF_Reward_Down" fore="L2UI_CT1.OlympiadWnd_DF_Reward"><br>
|
<button action="bypass _bbsmultisell;2010:test" value="Shop Test" width=200 height=31 back="L2UI_CT1.OlympiadWnd_DF_Reward_Down" fore="L2UI_CT1.OlympiadWnd_DF_Reward"><br>
|
||||||
<button action="bypass _bbsteleport;83421:148008:-3408" value="Teleport Test" width=200 height=31 back="L2UI_CT1.OlympiadWnd_DF_Reward_Down" fore="L2UI_CT1.OlympiadWnd_DF_Reward"><br>
|
<button action="bypass _bbsteleport;83421:148008:-3408:test" value="Teleport Test" width=200 height=31 back="L2UI_CT1.OlympiadWnd_DF_Reward_Down" fore="L2UI_CT1.OlympiadWnd_DF_Reward"><br>
|
||||||
<button action="bypass _bbsbuff;1323:1" value="Buff Test" width=200 height=31 back="L2UI_CT1.OlympiadWnd_DF_Reward_Down" fore="L2UI_CT1.OlympiadWnd_DF_Reward"><br>
|
<button action="bypass _bbsbuff;1323:1:test" value="Buff Test" width=200 height=31 back="L2UI_CT1.OlympiadWnd_DF_Reward_Down" fore="L2UI_CT1.OlympiadWnd_DF_Reward"><br>
|
||||||
</center>
|
</center>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -82,16 +82,22 @@ public final class HomeBoard implements IParseBoardHandler
|
|||||||
}
|
}
|
||||||
else if (Config.CUSTOM_CB_ENABLED && command.startsWith("_bbsmultisell"))
|
else if (Config.CUSTOM_CB_ENABLED && command.startsWith("_bbsmultisell"))
|
||||||
{
|
{
|
||||||
final int multisell = Integer.valueOf(command.replace("_bbsmultisell;", ""));
|
final String fullBypass = command.replace("_bbsmultisell;", "");
|
||||||
MultisellData.getInstance().separateAndSend(multisell, activeChar, null, false);
|
final String[] buypassOptions = fullBypass.split(":");
|
||||||
|
final int multisellId = Integer.parseInt(buypassOptions[0]);
|
||||||
|
final String page = buypassOptions[1];
|
||||||
|
MultisellData.getInstance().separateAndSend(multisellId, activeChar, null, false);
|
||||||
|
final String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/Custom/" + page + ".html");
|
||||||
|
CommunityBoardHandler.separateAndSend(html, activeChar);
|
||||||
}
|
}
|
||||||
else if (Config.CUSTOM_CB_ENABLED && command.startsWith("_bbsteleport"))
|
else if (Config.CUSTOM_CB_ENABLED && command.startsWith("_bbsteleport"))
|
||||||
{
|
{
|
||||||
final String fullBypass = command.replace("_bbsteleport;", "");
|
final String fullBypass = command.replace("_bbsteleport;", "");
|
||||||
final String[] teleportBypass = fullBypass.split(":");
|
final String[] buypassOptions = fullBypass.split(":");
|
||||||
final int x = Integer.parseInt(teleportBypass[0]);
|
final int x = Integer.parseInt(buypassOptions[0]);
|
||||||
final int y = Integer.parseInt(teleportBypass[1]);
|
final int y = Integer.parseInt(buypassOptions[1]);
|
||||||
final int z = Integer.parseInt(teleportBypass[2]);
|
final int z = Integer.parseInt(buypassOptions[2]);
|
||||||
|
final String page = buypassOptions[3];
|
||||||
if (activeChar.getInventory().getInventoryItemCount(Config.COMMUNITYBOARD_CURRENCY, -1) < Config.COMMUNITYBOARD_TELEPORT_PRICE)
|
if (activeChar.getInventory().getInventoryItemCount(Config.COMMUNITYBOARD_CURRENCY, -1) < Config.COMMUNITYBOARD_TELEPORT_PRICE)
|
||||||
{
|
{
|
||||||
activeChar.sendMessage("Not enough currency!");
|
activeChar.sendMessage("Not enough currency!");
|
||||||
@ -99,20 +105,27 @@ public final class HomeBoard implements IParseBoardHandler
|
|||||||
}
|
}
|
||||||
activeChar.getInventory().destroyItemByItemId("CB_Teleport", Config.COMMUNITYBOARD_CURRENCY, Config.COMMUNITYBOARD_TELEPORT_PRICE, activeChar, activeChar);
|
activeChar.getInventory().destroyItemByItemId("CB_Teleport", Config.COMMUNITYBOARD_CURRENCY, Config.COMMUNITYBOARD_TELEPORT_PRICE, activeChar, activeChar);
|
||||||
activeChar.teleToLocation(x, y, z, 0);
|
activeChar.teleToLocation(x, y, z, 0);
|
||||||
|
final String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/Custom/" + page + ".html");
|
||||||
|
CommunityBoardHandler.separateAndSend(html, activeChar);
|
||||||
}
|
}
|
||||||
else if (Config.CUSTOM_CB_ENABLED && command.startsWith("_bbsbuff"))
|
else if (Config.CUSTOM_CB_ENABLED && command.startsWith("_bbsbuff"))
|
||||||
{
|
{
|
||||||
final String fullBypass = command.replace("_bbsbuff;", "");
|
final String fullBypass = command.replace("_bbsbuff;", "");
|
||||||
final String[] buffBypass = fullBypass.split(":");
|
final String[] buypassOptions = fullBypass.split(":");
|
||||||
final int buffId = Integer.parseInt(buffBypass[0]);
|
final int buffId = Integer.parseInt(buypassOptions[0]);
|
||||||
final int buffLevel = Integer.parseInt(buffBypass[1]);
|
final int buffLevel = Integer.parseInt(buypassOptions[1]);
|
||||||
|
final String page = buypassOptions[2];
|
||||||
if (activeChar.getInventory().getInventoryItemCount(Config.COMMUNITYBOARD_CURRENCY, -1) < Config.COMMUNITYBOARD_BUFF_PRICE)
|
if (activeChar.getInventory().getInventoryItemCount(Config.COMMUNITYBOARD_CURRENCY, -1) < Config.COMMUNITYBOARD_BUFF_PRICE)
|
||||||
{
|
{
|
||||||
activeChar.sendMessage("Not enough currency!");
|
activeChar.sendMessage("Not enough currency!");
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
activeChar.getInventory().destroyItemByItemId("CB_Buff", Config.COMMUNITYBOARD_CURRENCY, Config.COMMUNITYBOARD_BUFF_PRICE, activeChar, activeChar);
|
else
|
||||||
SkillData.getInstance().getSkill(buffId, buffLevel).applyEffects(activeChar, activeChar);
|
{
|
||||||
|
activeChar.getInventory().destroyItemByItemId("CB_Buff", Config.COMMUNITYBOARD_CURRENCY, Config.COMMUNITYBOARD_BUFF_PRICE, activeChar, activeChar);
|
||||||
|
SkillData.getInstance().getSkill(buffId, buffLevel).applyEffects(activeChar, activeChar);
|
||||||
|
}
|
||||||
|
final String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/Custom/" + page + ".html");
|
||||||
|
CommunityBoardHandler.separateAndSend(html, activeChar);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user