Retail like builder HTML debugging.
This commit is contained in:
@@ -83,6 +83,10 @@ GMGiveSpecialSkills = False
|
||||
# Default: False
|
||||
GMGiveSpecialAuraSkills = False
|
||||
|
||||
# Debug html paths for GM characters.
|
||||
# Default: True
|
||||
GMDebugHtmlPaths = True
|
||||
|
||||
# In case you are not satisfied with the retail-like implementation of //gmspeed",
|
||||
# with this config you can rollback it to the old custom L2J version of the GM Speed.
|
||||
# Default: False
|
||||
|
||||
@@ -145,7 +145,7 @@ public final class CastleChamberlain extends AbstractNpcAI
|
||||
private NpcHtmlMessage getHtmlPacket(L2PcInstance player, L2Npc npc, String htmlFile)
|
||||
{
|
||||
final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
|
||||
packet.setHtml(getHtm(player.getHtmlPrefix(), htmlFile));
|
||||
packet.setHtml(getHtm(player, htmlFile));
|
||||
return packet;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,15 +68,15 @@ public final class CastleMercenaryManager extends AbstractNpcAI
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
|
||||
if (castle.getName().equalsIgnoreCase("Aden"))
|
||||
{
|
||||
html.setHtml(getHtm(player.getHtmlPrefix(), "mercmanager-aden-limit.html"));
|
||||
html.setHtml(getHtm(player, "mercmanager-aden-limit.html"));
|
||||
}
|
||||
else if (castle.getName().equalsIgnoreCase("Rune"))
|
||||
{
|
||||
html.setHtml(getHtm(player.getHtmlPrefix(), "mercmanager-rune-limit.html"));
|
||||
html.setHtml(getHtm(player, "mercmanager-rune-limit.html"));
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setHtml(getHtm(player.getHtmlPrefix(), "mercmanager-limit.html"));
|
||||
html.setHtml(getHtm(player, "mercmanager-limit.html"));
|
||||
}
|
||||
html.replace("%feud_name%", String.valueOf(1001000 + castle.getResidenceId()));
|
||||
player.sendPacket(html);
|
||||
|
||||
@@ -66,7 +66,7 @@ public final class CastleWarehouse extends AbstractNpcAI
|
||||
}
|
||||
case "warehouse-04.html":
|
||||
{
|
||||
htmltext = (!isMyLord) ? "warehouse-no.html" : getHtm(player.getHtmlPrefix(), "warehouse-04.html").replace("%blood%", Integer.toString(player.getClan().getBloodAllianceCount()));
|
||||
htmltext = (!isMyLord) ? "warehouse-no.html" : getHtm(player, "warehouse-04.html").replace("%blood%", Integer.toString(player.getClan().getBloodAllianceCount()));
|
||||
break;
|
||||
}
|
||||
case "Receive":
|
||||
|
||||
@@ -77,7 +77,7 @@ public final class ClanHallAuctioneer extends AbstractNpcAI
|
||||
}
|
||||
case "map":
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallAuctioneer-map.html");
|
||||
htmltext = getHtm(player, "ClanHallAuctioneer-map.html");
|
||||
htmltext = htmltext.replace("%MAP%", npc.getParameters().getString("fnAgitMap", "gludio"));
|
||||
htmltext = htmltext.replace("%TOWN_NAME%", npc.getCastle().getName());
|
||||
break;
|
||||
@@ -106,7 +106,7 @@ public final class ClanHallAuctioneer extends AbstractNpcAI
|
||||
|
||||
// THE_CLAN_DOES_NOT_OWN_A_CLAN_HALL
|
||||
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallAuctioneer-cancelBid.html");
|
||||
htmltext = getHtm(player, "ClanHallAuctioneer-cancelBid.html");
|
||||
htmltext = htmltext.replaceAll("%myBid%", String.valueOf(clanHallAuction.getClanBid(clan)));
|
||||
htmltext = htmltext.replaceAll("%myBidRemain%", String.valueOf(clanHallAuction.getClanBid(clan) * 9));
|
||||
break;
|
||||
@@ -150,7 +150,7 @@ public final class ClanHallAuctioneer extends AbstractNpcAI
|
||||
{
|
||||
final DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();
|
||||
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallAuctioneer-bid2.html");
|
||||
htmltext = getHtm(player, "ClanHallAuctioneer-bid2.html");
|
||||
htmltext = htmltext.replaceAll("%id%", String.valueOf(clanHallAuction.getClanHallId()));
|
||||
htmltext = htmltext.replaceAll("%minBid%", String.valueOf(clanHallAuction.getHighestBid()));
|
||||
htmltext = htmltext.replaceAll("%myBid%", String.valueOf(clanHallAuction.getClanBid(clan)));
|
||||
@@ -193,7 +193,7 @@ public final class ClanHallAuctioneer extends AbstractNpcAI
|
||||
final Instant endTime = Instant.ofEpochMilli(System.currentTimeMillis() + remainingTime);
|
||||
|
||||
final DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallAuctioneer-bidInfo.html");
|
||||
htmltext = getHtm(player, "ClanHallAuctioneer-bidInfo.html");
|
||||
htmltext = htmltext.replaceAll("%id%", String.valueOf(clanHall.getResidenceId()));
|
||||
htmltext = htmltext.replace("%owner%", owner != null ? owner.getName() : "");
|
||||
htmltext = htmltext.replace("%clanLeader%", owner != null ? owner.getLeaderName() : "");
|
||||
@@ -251,7 +251,7 @@ public final class ClanHallAuctioneer extends AbstractNpcAI
|
||||
final Instant endTime = Instant.ofEpochMilli(System.currentTimeMillis() + remainingTime);
|
||||
final DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
|
||||
html.setHtml(getHtm(player.getHtmlPrefix(), "ClanHallAuctioneer-info.html"));
|
||||
html.setHtml(getHtm(player, "ClanHallAuctioneer-info.html"));
|
||||
|
||||
html.replace("%id%", clanHall.getResidenceId());
|
||||
html.replace("%owner%", owner != null ? owner.getName() : "");
|
||||
@@ -275,7 +275,7 @@ public final class ClanHallAuctioneer extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId(), getHtm(player.getHtmlPrefix(), "ClanHallAuctioneer-list.html"));
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId(), getHtm(player, "ClanHallAuctioneer-list.html"));
|
||||
//@formatter:off
|
||||
final PageResult result = PageBuilder.newBuilder(clanHalls, 8, "bypass -h Quest ClanHallAuctioneer auctionList")
|
||||
.currentPage(page)
|
||||
@@ -349,7 +349,7 @@ public final class ClanHallAuctioneer extends AbstractNpcAI
|
||||
if (bid == 0)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
|
||||
html.setHtml(getHtm(player.getHtmlPrefix(), "ClanHallAuctioneer-bid1.html"));
|
||||
html.setHtml(getHtm(player, "ClanHallAuctioneer-bid1.html"));
|
||||
html.replace("%clanAdena%", clan.getWarehouse().getAdena());
|
||||
html.replace("%minBid%", ClanHallAuctionManager.getInstance().getClanHallAuctionById(clanHallId).getHighestBid());
|
||||
html.replace("%id%", clanHall.getResidenceId());
|
||||
@@ -406,7 +406,7 @@ public final class ClanHallAuctioneer extends AbstractNpcAI
|
||||
return;
|
||||
}
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId(), getHtm(player.getHtmlPrefix(), "ClanHallAuctioneer-bidderList.html"));
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId(), getHtm(player, "ClanHallAuctioneer-bidderList.html"));
|
||||
//@formatter:off
|
||||
final PageResult result = PageBuilder.newBuilder(clanHallAuction.getBids().values().stream().sorted(Comparator.comparingLong(Bidder::getTime).reversed()).collect(Collectors.toList()), 10, "bypass -h Quest ClanHallAuctioneer auctionList")
|
||||
.currentPage(page)
|
||||
|
||||
@@ -99,7 +99,7 @@ public final class ClanHallDoorManager extends AbstractNpcAI
|
||||
final ClanHall clanHall = npc.getClanHall();
|
||||
if (isOwningClan(player, npc))
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallDoorManager-01.html");
|
||||
htmltext = getHtm(player, "ClanHallDoorManager-01.html");
|
||||
htmltext = htmltext.replace("%ownerClanName%", clanHall.getOwner().getName());
|
||||
}
|
||||
else if (clanHall.getOwnerId() <= 0)
|
||||
@@ -108,7 +108,7 @@ public final class ClanHallDoorManager extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallDoorManager-03.html");
|
||||
htmltext = getHtm(player, "ClanHallDoorManager-03.html");
|
||||
htmltext = htmltext.replace("%ownerName%", clanHall.getOwner().getLeaderName());
|
||||
htmltext = htmltext.replace("%ownerClanName%", clanHall.getOwner().getName());
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ public final class ClanHallManager extends AbstractNpcAI
|
||||
final ResidenceFunction hpFunc = clanHall.getFunction(ResidenceFunctionType.HP_REGEN);
|
||||
final ResidenceFunction mpFunc = clanHall.getFunction(ResidenceFunctionType.MP_REGEN);
|
||||
final ResidenceFunction xpFunc = clanHall.getFunction(ResidenceFunctionType.EXP_RESTORE);
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallManager-09.html");
|
||||
htmltext = getHtm(player, "ClanHallManager-09.html");
|
||||
htmltext = htmltext.replaceAll("%hpFunction%", hpFunc != null ? String.valueOf((int) hpFunc.getValue()) : "0");
|
||||
htmltext = htmltext.replaceAll("%mpFunction%", mpFunc != null ? String.valueOf((int) mpFunc.getValue()) : "0");
|
||||
htmltext = htmltext.replaceAll("%resFunction%", xpFunc != null ? String.valueOf((int) xpFunc.getValue()) : "0");
|
||||
@@ -208,7 +208,7 @@ public final class ClanHallManager extends AbstractNpcAI
|
||||
{
|
||||
if (!st.hasMoreTokens())
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallManager-funcBuffs_" + buffLevel + ".html");
|
||||
htmltext = getHtm(player, "ClanHallManager-funcBuffs_" + buffLevel + ".html");
|
||||
htmltext = htmltext.replaceAll("%manaLeft%", Integer.toString((int) npc.getCurrentMp()));
|
||||
}
|
||||
else
|
||||
@@ -219,16 +219,16 @@ public final class ClanHallManager extends AbstractNpcAI
|
||||
{
|
||||
if (npc.getCurrentMp() < (npc.getStat().getMpConsume(skill.getSkill()) + npc.getStat().getMpInitialConsume(skill.getSkill())))
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallManager-funcBuffsNoMp.html");
|
||||
htmltext = getHtm(player, "ClanHallManager-funcBuffsNoMp.html");
|
||||
}
|
||||
else if (npc.isSkillDisabled(skill.getSkill()))
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallManager-funcBuffsNoReuse.html");
|
||||
htmltext = getHtm(player, "ClanHallManager-funcBuffsNoReuse.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
castSkill(npc, player, skill);
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallManager-funcBuffsDone.html");
|
||||
htmltext = getHtm(player, "ClanHallManager-funcBuffsDone.html");
|
||||
}
|
||||
htmltext = htmltext.replaceAll("%manaLeft%", Integer.toString((int) npc.getCurrentMp()));
|
||||
}
|
||||
@@ -270,7 +270,7 @@ public final class ClanHallManager extends AbstractNpcAI
|
||||
}
|
||||
case "warehouse":
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallManager-10.html");
|
||||
htmltext = getHtm(player, "ClanHallManager-10.html");
|
||||
htmltext = htmltext.replaceAll("%lease%", String.valueOf(clanHall.getLease()));
|
||||
htmltext = htmltext.replaceAll("%payDate%", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(clanHall.getNextPayment())));
|
||||
break;
|
||||
@@ -289,7 +289,7 @@ public final class ClanHallManager extends AbstractNpcAI
|
||||
{
|
||||
case "recovery":
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), clanHall.getGrade() == ClanHallGrade.GRADE_S ? "ClanHallManager-manageFuncRecoverySGrade.html" : "ClanHallManager-manageFuncRecoveryBGrade.html");
|
||||
htmltext = getHtm(player, clanHall.getGrade() == ClanHallGrade.GRADE_S ? "ClanHallManager-manageFuncRecoverySGrade.html" : "ClanHallManager-manageFuncRecoveryBGrade.html");
|
||||
htmltext = getFunctionInfo(clanHall.getFunction(ResidenceFunctionType.HP_REGEN), htmltext, "HP");
|
||||
htmltext = getFunctionInfo(clanHall.getFunction(ResidenceFunctionType.MP_REGEN), htmltext, "MP");
|
||||
htmltext = getFunctionInfo(clanHall.getFunction(ResidenceFunctionType.EXP_RESTORE), htmltext, "XP");
|
||||
@@ -297,7 +297,7 @@ public final class ClanHallManager extends AbstractNpcAI
|
||||
}
|
||||
case "other":
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallManager-manageFuncOther.html");
|
||||
htmltext = getHtm(player, "ClanHallManager-manageFuncOther.html");
|
||||
htmltext = getFunctionInfo(clanHall.getFunction(ResidenceFunctionType.TELEPORT), htmltext, "TP");
|
||||
htmltext = getFunctionInfo(clanHall.getFunction(ResidenceFunctionType.BUFF), htmltext, "BUFF");
|
||||
htmltext = getFunctionInfo(clanHall.getFunction(ResidenceFunctionType.ITEM), htmltext, "ITEM");
|
||||
@@ -305,7 +305,7 @@ public final class ClanHallManager extends AbstractNpcAI
|
||||
}
|
||||
case "decor":
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallManager-manageFuncDecor.html");
|
||||
htmltext = getHtm(player, "ClanHallManager-manageFuncDecor.html");
|
||||
htmltext = getFunctionInfo(clanHall.getFunction(ResidenceFunctionType.CURTAIN), htmltext, "CURTAIN");
|
||||
htmltext = getFunctionInfo(clanHall.getFunction(ResidenceFunctionType.PLATFORM), htmltext, "PODIUM");
|
||||
break;
|
||||
@@ -321,7 +321,7 @@ public final class ClanHallManager extends AbstractNpcAI
|
||||
if (oldFunc != null)
|
||||
{
|
||||
final int funcVal = (int) oldFunc.getTemplate().getValue();
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallManager-manageFuncAlreadySet.html");
|
||||
htmltext = getHtm(player, "ClanHallManager-manageFuncAlreadySet.html");
|
||||
htmltext = htmltext.replaceAll("%funcEffect%", "<fstring p1=\"" + (funcVal > 0 ? funcVal : oldFunc.getLevel()) + "\">" + (funcVal > 0 ? NpcStringId.S1.getId() : NpcStringId.STAGE_S1.getId()) + "</fstring>");
|
||||
}
|
||||
else if ((funcId >= 1) && (funcId <= 8))
|
||||
@@ -329,7 +329,7 @@ public final class ClanHallManager extends AbstractNpcAI
|
||||
final ResidenceFunctionTemplate template = ResidenceFunctionsData.getInstance().getFunction(funcId, funcLv);
|
||||
if (template != null)
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallManager-funcConfirm" + funcId + ".html");
|
||||
htmltext = getHtm(player, "ClanHallManager-funcConfirm" + funcId + ".html");
|
||||
htmltext = htmltext.replaceAll("%funcId%", String.valueOf(funcId));
|
||||
htmltext = htmltext.replaceAll("%funcLv%", String.valueOf(funcLv));
|
||||
htmltext = htmltext.replaceAll("%funcCost%", "<fstring p1=\"" + template.getCost().getCount() + "\" p2=\"" + template.getDurationAsDays() + "\">" + NpcStringId.FONT_COLOR_FFAABB_S1_FONT_ADENA_S2_DAY_S.getId() + "</fstring>");
|
||||
@@ -375,7 +375,7 @@ public final class ClanHallManager extends AbstractNpcAI
|
||||
{
|
||||
if (act.equals("confirm"))
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallManager-removeFunctionConfirm.html");
|
||||
htmltext = getHtm(player, "ClanHallManager-removeFunctionConfirm.html");
|
||||
htmltext = htmltext.replaceAll("%FUNC_TYPE%", funcType.toString());
|
||||
}
|
||||
else if (act.equals("remove"))
|
||||
@@ -436,7 +436,7 @@ public final class ClanHallManager extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "ClanHallManager-02.html");
|
||||
htmltext = getHtm(player, "ClanHallManager-02.html");
|
||||
htmltext = htmltext.replaceAll("%costFailDayLeft%", Integer.toString((8 - clanHall.getCostFailDay())));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ public final class ClassMaster extends AbstractNpcAI implements IGameXmlReader
|
||||
{
|
||||
if (classDataIndex == -1)
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "cc_options.html");
|
||||
htmltext = getHtm(player, "cc_options.html");
|
||||
htmltext = htmltext.replace("%name%", ClassListData.getInstance().getClass(classId).getClassName()); // getEscapedClientCode());
|
||||
htmltext = htmltext.replace("%options%", getClassChangeOptions(player, classId));
|
||||
return htmltext;
|
||||
@@ -765,7 +765,7 @@ public final class ClassMaster extends AbstractNpcAI implements IGameXmlReader
|
||||
}
|
||||
else if (checkIfClassChangeHasOptions(player))
|
||||
{
|
||||
String html = getHtm(player.getHtmlPrefix(), "cc_options.html");
|
||||
String html = getHtm(player, "cc_options.html");
|
||||
html = html.replace("%name%", ClassListData.getInstance().getClass(newClass.getId()).getClassName()); // getEscapedClientCode());
|
||||
html = html.replace("%options%", getClassChangeOptions(player, newClass.getId()));
|
||||
showResult(player, html);
|
||||
@@ -872,19 +872,19 @@ public final class ClassMaster extends AbstractNpcAI implements IGameXmlReader
|
||||
String html = null;
|
||||
if ((player.isInCategory(CategoryType.SECOND_CLASS_GROUP) || player.isInCategory(CategoryType.FIRST_CLASS_GROUP)) && (player.getLevel() >= 40)) // In retail you can skip first occupation
|
||||
{
|
||||
html = getHtm(player.getHtmlPrefix(), getSecondOccupationChangeHtml(player));
|
||||
html = getHtm(player, getSecondOccupationChangeHtml(player));
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.FIRST_CLASS_GROUP) && (player.getLevel() >= 20))
|
||||
{
|
||||
html = getHtm(player.getHtmlPrefix(), getFirstOccupationChangeHtml(player));
|
||||
html = getHtm(player, getFirstOccupationChangeHtml(player));
|
||||
}
|
||||
else if (player.isInCategory(CategoryType.THIRD_CLASS_GROUP) && (player.getLevel() >= 76))
|
||||
{
|
||||
html = getHtm(player.getHtmlPrefix(), "qm_thirdclass.html");
|
||||
html = getHtm(player, "qm_thirdclass.html");
|
||||
}
|
||||
// else if (player.isInCategory(CategoryType.FOURTH_CLASS_GROUP) && (player.getLevel() >= 85)) // 9
|
||||
// {
|
||||
// html = getHtm(player.getHtmlPrefix(), "qm_awaken.html");
|
||||
// html = getHtm(player, "qm_awaken.html");
|
||||
// }
|
||||
|
||||
if (html != null)
|
||||
|
||||
@@ -68,7 +68,7 @@ public class NewbieGuide extends AbstractNpcAI
|
||||
else
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/scripts/ai/others/NewbieGuide/" + npc.getId() + ".htm");
|
||||
html.setFile(player, "data/scripts/ai/others/NewbieGuide/" + npc.getId() + ".htm");
|
||||
html.replace(SUPPORT_MAGIC_STRING, "");
|
||||
player.sendPacket(html);
|
||||
return htmltext;
|
||||
@@ -108,7 +108,7 @@ public class NewbieGuide extends AbstractNpcAI
|
||||
return npc.getId() + ".htm";
|
||||
}
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/scripts/ai/others/NewbieGuide/" + npc.getId() + ".htm");
|
||||
html.setFile(player, "data/scripts/ai/others/NewbieGuide/" + npc.getId() + ".htm");
|
||||
html.replace(SUPPORT_MAGIC_STRING, "");
|
||||
player.sendPacket(html);
|
||||
return null;
|
||||
|
||||
@@ -107,12 +107,12 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
||||
case 2:
|
||||
case 3: // First 3 weeks of month is 1v1 + 1v1 class matches
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "OlyManager-joinMatch.html");
|
||||
htmltext = getHtm(player, "OlyManager-joinMatch.html");
|
||||
break;
|
||||
}
|
||||
default:// Rest is only 1v1 class matches
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "OlyManager-joinMatchClass.html");
|
||||
htmltext = getHtm(player, "OlyManager-joinMatchClass.html");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -266,7 +266,7 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
||||
{
|
||||
final int classId = Integer.parseInt(event.replace("rank_", ""));
|
||||
final List<String> names = Olympiad.getInstance().getClassLeaderBoard(classId);
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "OlyManager-rankDetail.html");
|
||||
htmltext = getHtm(player, "OlyManager-rankDetail.html");
|
||||
|
||||
int index = 1;
|
||||
for (String name : names)
|
||||
|
||||
@@ -69,7 +69,7 @@ public final class Proclaimer extends AbstractNpcAI
|
||||
if (ownerClan != null)
|
||||
{
|
||||
final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
|
||||
packet.setHtml(getHtm(player.getHtmlPrefix(), "proclaimer.html"));
|
||||
packet.setHtml(getHtm(player, "proclaimer.html"));
|
||||
packet.replace("%leaderName%", ownerClan.getLeaderName());
|
||||
packet.replace("%clanName%", ownerClan.getName());
|
||||
packet.replace("%castleName%", npc.getCastle().getName());
|
||||
|
||||
@@ -91,9 +91,9 @@ public final class WyvernManager extends AbstractNpcAI
|
||||
player.mount(WYVERN, 0, true);
|
||||
return "wyvernmanager-04.html";
|
||||
}
|
||||
return replacePart(player.getHtmlPrefix(), "wyvernmanager-06.html");
|
||||
return replacePart(player, "wyvernmanager-06.html");
|
||||
}
|
||||
return replacePart(player.getHtmlPrefix(), "wyvernmanager-05.html");
|
||||
return replacePart(player, "wyvernmanager-05.html");
|
||||
}
|
||||
|
||||
private boolean isOwnerClan(L2Npc npc, L2PcInstance player)
|
||||
@@ -174,14 +174,14 @@ public final class WyvernManager extends AbstractNpcAI
|
||||
}
|
||||
}
|
||||
|
||||
private String replaceAll(L2Npc npc, String htmlPrefix)
|
||||
private String replaceAll(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
return replacePart(htmlPrefix, "wyvernmanager-01.html").replace("%residence_name%", getResidenceName(npc));
|
||||
return replacePart(player, "wyvernmanager-01.html").replace("%residence_name%", getResidenceName(npc));
|
||||
}
|
||||
|
||||
private String replacePart(String htmlPrefix, String htmlFile)
|
||||
private String replacePart(L2PcInstance player, String htmlFile)
|
||||
{
|
||||
return getHtm(htmlPrefix, htmlFile).replace("%wyvern_fee%", String.valueOf(WYVERN_FEE)).replace("%strider_level%", String.valueOf(STRIDER_LVL));
|
||||
return getHtm(player, htmlFile).replace("%wyvern_fee%", String.valueOf(WYVERN_FEE)).replace("%strider_level%", String.valueOf(STRIDER_LVL));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -198,7 +198,7 @@ public final class WyvernManager extends AbstractNpcAI
|
||||
}
|
||||
else if (Config.ALLOW_WYVERN_ALWAYS)
|
||||
{
|
||||
htmltext = replaceAll(npc, player.getHtmlPrefix());
|
||||
htmltext = replaceAll(npc, player);
|
||||
}
|
||||
else if (MANAGERS.get(npc.getId()) == ManagerType.CASTLE)
|
||||
{
|
||||
@@ -206,13 +206,13 @@ public final class WyvernManager extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = replaceAll(npc, player.getHtmlPrefix());
|
||||
htmltext = replaceAll(npc, player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "Help":
|
||||
{
|
||||
htmltext = MANAGERS.get(npc.getId()) == ManagerType.CASTLE ? replacePart(player.getHtmlPrefix(), "wyvernmanager-03.html") : replacePart(player.getHtmlPrefix(), "wyvernmanager-03b.html");
|
||||
htmltext = MANAGERS.get(npc.getId()) == ManagerType.CASTLE ? replacePart(player, "wyvernmanager-03.html") : replacePart(player, "wyvernmanager-03b.html");
|
||||
break;
|
||||
}
|
||||
case "RideWyvern":
|
||||
@@ -253,7 +253,7 @@ public final class WyvernManager extends AbstractNpcAI
|
||||
}
|
||||
else if (Config.ALLOW_WYVERN_ALWAYS)
|
||||
{
|
||||
htmltext = replaceAll(npc, player.getHtmlPrefix());
|
||||
htmltext = replaceAll(npc, player);
|
||||
}
|
||||
else if (MANAGERS.get(npc.getId()) == ManagerType.CASTLE)
|
||||
{
|
||||
@@ -261,7 +261,7 @@ public final class WyvernManager extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = replaceAll(npc, player.getHtmlPrefix());
|
||||
htmltext = replaceAll(npc, player);
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public final class FactionSystem extends AbstractNpcAI
|
||||
{
|
||||
final String htmltext = null;
|
||||
final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
|
||||
packet.setHtml(getHtm(player.getHtmlPrefix(), "onlinelimit.html"));
|
||||
packet.setHtml(getHtm(player, "onlinelimit.html"));
|
||||
packet.replace("%name%", player.getName());
|
||||
packet.replace("%more%", Config.FACTION_GOOD_TEAM_NAME);
|
||||
packet.replace("%less%", Config.FACTION_EVIL_TEAM_NAME);
|
||||
@@ -94,7 +94,7 @@ public final class FactionSystem extends AbstractNpcAI
|
||||
{
|
||||
final String htmltext = null;
|
||||
final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
|
||||
packet.setHtml(getHtm(player.getHtmlPrefix(), "onlinelimit.html"));
|
||||
packet.setHtml(getHtm(player, "onlinelimit.html"));
|
||||
packet.replace("%name%", player.getName());
|
||||
packet.replace("%more%", Config.FACTION_EVIL_TEAM_NAME);
|
||||
packet.replace("%less%", Config.FACTION_GOOD_TEAM_NAME);
|
||||
@@ -132,7 +132,7 @@ public final class FactionSystem extends AbstractNpcAI
|
||||
{
|
||||
final String htmltext = null;
|
||||
final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
|
||||
packet.setHtml(getHtm(player.getHtmlPrefix(), "manager.html"));
|
||||
packet.setHtml(getHtm(player, "manager.html"));
|
||||
packet.replace("%name%", player.getName());
|
||||
packet.replace("%good%", Config.FACTION_GOOD_TEAM_NAME);
|
||||
packet.replace("%evil%", Config.FACTION_EVIL_TEAM_NAME);
|
||||
|
||||
@@ -385,7 +385,7 @@ public final class Race extends Event
|
||||
private void showMenu(L2PcInstance activeChar)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage();
|
||||
final String content = getHtm(activeChar.getHtmlPrefix(), "admin_menu.htm");
|
||||
final String content = getHtm(activeChar, "admin_menu.htm");
|
||||
html.setHtml(content);
|
||||
activeChar.sendPacket(html);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class L2StaticObjectInstanceAction implements IActionHandler
|
||||
else if (staticObject.getType() == 2)
|
||||
{
|
||||
final String filename = (staticObject.getId() == 24230101) ? "data/html/signboards/tomb_of_crystalgolem.htm" : "data/html/signboards/pvp_signboard.htm";
|
||||
final String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), filename);
|
||||
final String content = HtmCache.getInstance().getHtm(activeChar, filename);
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(staticObject.getObjectId());
|
||||
|
||||
if (content == null)
|
||||
|
||||
@@ -47,7 +47,7 @@ public class L2DoorInstanceActionShift implements IActionShiftHandler
|
||||
final Castle castle = door.getCastle();
|
||||
activeChar.sendPacket(new StaticObject(door, activeChar.isGM()));
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/doorinfo.htm");
|
||||
html.setFile(activeChar, "data/html/admin/doorinfo.htm");
|
||||
// Hp / MP
|
||||
html.replace("%hpGauge%", HtmlUtil.getHpGauge(250, (long) door.getCurrentHp(), door.getMaxHp(), false));
|
||||
html.replace("%mpGauge%", HtmlUtil.getMpGauge(250, (long) door.getCurrentMp(), door.getMaxMp(), false));
|
||||
|
||||
@@ -53,7 +53,7 @@ public class L2NpcActionShift implements IActionShiftHandler
|
||||
final L2Npc npc = (L2Npc) target;
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
final ClanHall clanHall = ClanHallData.getInstance().getClanHallByNpcId(npc.getId());
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/npcinfo.htm");
|
||||
html.setFile(activeChar, "data/html/admin/npcinfo.htm");
|
||||
|
||||
html.replace("%objid%", String.valueOf(target.getObjectId()));
|
||||
html.replace("%class%", target.getClass().getSimpleName());
|
||||
|
||||
@@ -90,7 +90,7 @@ public class AdminAnnouncements implements IAdminCommandHandler
|
||||
{
|
||||
if (!st.hasMoreTokens())
|
||||
{
|
||||
final String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/announces-add.htm");
|
||||
final String content = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/announces-add.htm");
|
||||
Util.sendCBHtml(activeChar, content);
|
||||
break;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public class AdminAnnouncements implements IAdminCommandHandler
|
||||
}
|
||||
if (!st.hasMoreTokens())
|
||||
{
|
||||
String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/announces-edit.htm");
|
||||
String content = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/announces-edit.htm");
|
||||
final String announcementId = "" + announce.getId();
|
||||
final String announcementType = announce.getType().name();
|
||||
String announcementInital = "0";
|
||||
@@ -417,7 +417,7 @@ public class AdminAnnouncements implements IAdminCommandHandler
|
||||
final IAnnouncement announce = AnnouncementsTable.getInstance().getAnnounce(id);
|
||||
if (announce != null)
|
||||
{
|
||||
String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/announces-show.htm");
|
||||
String content = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/announces-show.htm");
|
||||
final String announcementId = "" + announce.getId();
|
||||
final String announcementType = announce.getType().name();
|
||||
String announcementInital = "0";
|
||||
@@ -457,7 +457,7 @@ public class AdminAnnouncements implements IAdminCommandHandler
|
||||
}
|
||||
}
|
||||
|
||||
String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/announces-list.htm");
|
||||
String content = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/announces-list.htm");
|
||||
final PageResult result = PageBuilder.newBuilder(AnnouncementsTable.getInstance().getAllAnnouncements(), 8, "bypass admin_announces list").currentPage(page).bodyHandler((pages, announcement, sb) ->
|
||||
{
|
||||
sb.append("<tr>");
|
||||
|
||||
@@ -329,7 +329,7 @@ public class AdminBuffs implements IAdminCommandHandler
|
||||
}).build();
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/getbuffs.htm");
|
||||
html.setFile(activeChar, "data/html/admin/getbuffs.htm");
|
||||
|
||||
if (result.getPages() > 0)
|
||||
{
|
||||
|
||||
@@ -224,7 +224,7 @@ public final class AdminCastle implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/castlemanage.htm"));
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/castlemanage.htm"));
|
||||
activeChar.sendPacket(html);
|
||||
}
|
||||
}
|
||||
@@ -239,7 +239,7 @@ public final class AdminCastle implements IAdminCommandHandler
|
||||
{
|
||||
final L2Clan ownerClan = castle.getOwner();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setHtml(HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/admin/castlemanage_selected.htm"));
|
||||
html.setHtml(HtmCache.getInstance().getHtm(player, "data/html/admin/castlemanage_selected.htm"));
|
||||
html.replace("%castleId%", castle.getResidenceId());
|
||||
html.replace("%castleName%", castle.getName());
|
||||
html.replace("%ownerName%", ownerClan != null ? ownerClan.getLeaderName() : "NPC");
|
||||
|
||||
@@ -69,7 +69,7 @@ public class AdminClan implements IAdminCommandHandler
|
||||
}
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/claninfo.htm"));
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/claninfo.htm"));
|
||||
html.replace("%clan_name%", clan.getName());
|
||||
html.replace("%clan_leader%", clan.getLeaderName());
|
||||
html.replace("%clan_level%", String.valueOf(clan.getLevel()));
|
||||
@@ -116,7 +116,7 @@ public class AdminClan implements IAdminCommandHandler
|
||||
case "admin_clan_show_pending":
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/clanchanges.htm"));
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/clanchanges.htm"));
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
for (L2Clan clan : ClanTable.getInstance().getClans())
|
||||
{
|
||||
|
||||
@@ -157,7 +157,7 @@ public final class AdminClanHall implements IAdminCommandHandler
|
||||
private void sendClanHallList(L2PcInstance player, int page, BypassParser parser)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/admin/clanhall_list.htm");
|
||||
html.setFile(player, "data/html/admin/clanhall_list.htm");
|
||||
final List<ClanHall> clanHallList = ClanHallData.getInstance().getClanHalls().stream().sorted(Comparator.comparingLong(ClanHall::getResidenceId)).collect(Collectors.toList());
|
||||
|
||||
//@formatter:off
|
||||
@@ -209,7 +209,7 @@ public final class AdminClanHall implements IAdminCommandHandler
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/admin/clanhall_detail.htm");
|
||||
html.setFile(player, "data/html/admin/clanhall_detail.htm");
|
||||
html.replace("%clanHallId%", clanHall.getResidenceId());
|
||||
html.replace("%clanHallOwner%", (clanHall.getOwner() == null ? "<font color=\"00FF00\">Free</font>" : "<font color=\"FF9900\">" + clanHall.getOwner().getName() + "</font>"));
|
||||
final String grade = clanHall.getGrade().toString().replace("GRADE_", "") + " Grade";
|
||||
|
||||
@@ -90,7 +90,7 @@ public class AdminCursedWeapons implements IAdminCommandHandler
|
||||
final Collection<CursedWeapon> cws = cwm.getCursedWeapons();
|
||||
final StringBuilder replyMSG = new StringBuilder(cws.size() * 300);
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
|
||||
adminReply.setFile(activeChar.getHtmlPrefix(), "data/html/admin/cwinfo.htm");
|
||||
adminReply.setFile(activeChar, "data/html/admin/cwinfo.htm");
|
||||
for (CursedWeapon cw : cwm.getCursedWeapons())
|
||||
{
|
||||
itemId = cw.getItemId();
|
||||
|
||||
@@ -1053,7 +1053,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
players.sort(Comparator.comparingLong(L2PcInstance::getUptime));
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/charlist.htm");
|
||||
html.setFile(activeChar, "data/html/admin/charlist.htm");
|
||||
|
||||
final PageResult result = PageBuilder.newBuilder(players, 20, "bypass -h admin_show_characters").currentPage(page).bodyHandler((pages, player, sb) ->
|
||||
{
|
||||
@@ -1128,7 +1128,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
}
|
||||
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
|
||||
adminReply.setFile(activeChar.getHtmlPrefix(), "data/html/admin/" + filename);
|
||||
adminReply.setFile(activeChar, "data/html/admin/" + filename);
|
||||
adminReply.replace("%name%", player.getName());
|
||||
adminReply.replace("%level%", String.valueOf(player.getLevel()));
|
||||
adminReply.replace("%clan%", String.valueOf(player.getClan() != null ? "<a action=\"bypass -h admin_clan_info " + player.getObjectId() + "\">" + player.getClan().getName() + "</a>" : null));
|
||||
@@ -1229,7 +1229,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
int CharactersFound = 0;
|
||||
String name;
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
|
||||
adminReply.setFile(activeChar.getHtmlPrefix(), "data/html/admin/charfind.htm");
|
||||
adminReply.setFile(activeChar, "data/html/admin/charfind.htm");
|
||||
|
||||
final StringBuilder replyMSG = new StringBuilder(1000);
|
||||
|
||||
@@ -1306,7 +1306,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
String name, ip = "0.0.0.0";
|
||||
final StringBuilder replyMSG = new StringBuilder(1000);
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
|
||||
adminReply.setFile(activeChar.getHtmlPrefix(), "data/html/admin/ipfind.htm");
|
||||
adminReply.setFile(activeChar, "data/html/admin/ipfind.htm");
|
||||
|
||||
final List<L2PcInstance> players = new ArrayList<>(L2World.getInstance().getPlayers());
|
||||
players.sort(Comparator.comparingLong(L2PcInstance::getUptime));
|
||||
@@ -1401,7 +1401,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
chars.values().stream().forEachOrdered(replyMSG::add);
|
||||
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
|
||||
adminReply.setFile(activeChar.getHtmlPrefix(), "data/html/admin/accountinfo.htm");
|
||||
adminReply.setFile(activeChar, "data/html/admin/accountinfo.htm");
|
||||
adminReply.replace("%account%", player.getAccountName());
|
||||
adminReply.replace("%player%", characterName);
|
||||
adminReply.replace("%characters%", replyMSG.toString());
|
||||
@@ -1460,7 +1460,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
}
|
||||
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
|
||||
adminReply.setFile(activeChar.getHtmlPrefix(), "data/html/admin/dualbox.htm");
|
||||
adminReply.setFile(activeChar, "data/html/admin/dualbox.htm");
|
||||
adminReply.replace("%multibox%", String.valueOf(multibox));
|
||||
adminReply.replace("%results%", results.toString());
|
||||
adminReply.replace("%strict%", "");
|
||||
@@ -1514,7 +1514,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
}
|
||||
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
|
||||
adminReply.setFile(activeChar.getHtmlPrefix(), "data/html/admin/dualbox.htm");
|
||||
adminReply.setFile(activeChar, "data/html/admin/dualbox.htm");
|
||||
adminReply.replace("%multibox%", String.valueOf(multibox));
|
||||
adminReply.replace("%results%", results.toString());
|
||||
adminReply.replace("%strict%", "strict_");
|
||||
@@ -1598,7 +1598,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
private void gatherSummonInfo(L2Summon target, L2PcInstance activeChar)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/petinfo.htm");
|
||||
html.setFile(activeChar, "data/html/admin/petinfo.htm");
|
||||
final String name = target.getName();
|
||||
html.replace("%name%", name == null ? "N/A" : name);
|
||||
html.replace("%level%", Integer.toString(target.getLevel()));
|
||||
@@ -1637,7 +1637,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
{
|
||||
boolean color = true;
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/partyinfo.htm");
|
||||
html.setFile(activeChar, "data/html/admin/partyinfo.htm");
|
||||
final StringBuilder text = new StringBuilder(400);
|
||||
for (L2PcInstance member : target.getParty().getMembers())
|
||||
{
|
||||
|
||||
@@ -547,7 +547,7 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
}).build();
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/ave_abnormal.htm");
|
||||
html.setFile(activeChar, "data/html/admin/ave_abnormal.htm");
|
||||
|
||||
if (result.getPages() > 0)
|
||||
{
|
||||
|
||||
@@ -119,7 +119,7 @@ public class AdminEventEngine implements IAdminCommandHandler
|
||||
|
||||
final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(Config.DATAPACK_ROOT + "/data/events/" + eventName)));
|
||||
final BufferedReader inbr = new BufferedReader(new InputStreamReader(in));
|
||||
adminReply.setFile("en", "data/html/mods/EventEngine/Participation.htm");
|
||||
adminReply.setFile(null, "data/html/mods/EventEngine/Participation.htm");
|
||||
adminReply.replace("%eventName%", eventName);
|
||||
adminReply.replace("%eventCreator%", inbr.readLine());
|
||||
adminReply.replace("%eventInfo%", inbr.readLine());
|
||||
|
||||
@@ -149,7 +149,7 @@ public class AdminEvents implements IAdminCommandHandler
|
||||
private void showMenu(L2PcInstance activeChar)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/gm_events.htm");
|
||||
html.setFile(activeChar, "data/html/admin/gm_events.htm");
|
||||
final StringBuilder cList = new StringBuilder(500);
|
||||
for (Quest event : QuestManager.getInstance().getScripts().values())
|
||||
{
|
||||
|
||||
@@ -98,7 +98,7 @@ public class AdminExpSp implements IAdminCommandHandler
|
||||
return;
|
||||
}
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
|
||||
adminReply.setFile(activeChar.getHtmlPrefix(), "data/html/admin/expsp.htm");
|
||||
adminReply.setFile(activeChar, "data/html/admin/expsp.htm");
|
||||
adminReply.replace("%name%", player.getName());
|
||||
adminReply.replace("%level%", String.valueOf(player.getLevel()));
|
||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||
|
||||
@@ -146,7 +146,7 @@ public class AdminFortSiege implements IAdminCommandHandler
|
||||
{
|
||||
int i = 0;
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
|
||||
adminReply.setFile(activeChar.getHtmlPrefix(), "data/html/admin/forts.htm");
|
||||
adminReply.setFile(activeChar, "data/html/admin/forts.htm");
|
||||
|
||||
final Collection<Fort> forts = FortManager.getInstance().getForts();
|
||||
final StringBuilder cList = new StringBuilder(forts.size() * 100);
|
||||
@@ -173,7 +173,7 @@ public class AdminFortSiege implements IAdminCommandHandler
|
||||
private void showFortSiegePage(L2PcInstance activeChar, Fort fort)
|
||||
{
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
|
||||
adminReply.setFile(activeChar.getHtmlPrefix(), "data/html/admin/fort.htm");
|
||||
adminReply.setFile(activeChar, "data/html/admin/fort.htm");
|
||||
adminReply.replace("%fortName%", fort.getName());
|
||||
adminReply.replace("%fortId%", String.valueOf(fort.getResidenceId()));
|
||||
activeChar.sendPacket(adminReply);
|
||||
|
||||
@@ -61,7 +61,7 @@ public class AdminGraciaSeeds implements IAdminCommandHandler
|
||||
private void showMenu(L2PcInstance activeChar)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/graciaseeds.htm");
|
||||
html.setFile(activeChar, "data/html/admin/graciaseeds.htm");
|
||||
html.replace("%sodstate%", String.valueOf(GraciaSeedsManager.getInstance().getSoDState()));
|
||||
html.replace("%sodtiatkill%", String.valueOf(GraciaSeedsManager.getInstance().getSoDTiatKilled()));
|
||||
if (GraciaSeedsManager.getInstance().getSoDTimeForNextStateChange() > 0)
|
||||
|
||||
@@ -70,7 +70,7 @@ public class AdminGrandBoss implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/grandboss.htm"));
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/grandboss.htm"));
|
||||
activeChar.sendPacket(html);
|
||||
}
|
||||
break;
|
||||
@@ -308,7 +308,7 @@ public class AdminGrandBoss implements IAdminCommandHandler
|
||||
final String bossRespawn = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(info.getLong("respawn_time"));
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), htmlPatch));
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar, htmlPatch));
|
||||
html.replace("%bossStatus%", text);
|
||||
html.replace("%bossColor%", textColor);
|
||||
html.replace("%respawnTime%", bossStatus == deadStatus ? bossRespawn : "Already respawned!");
|
||||
|
||||
@@ -92,7 +92,7 @@ public class AdminHtml implements IAdminCommandHandler
|
||||
String content = null;
|
||||
if (!reload)
|
||||
{
|
||||
content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), path);
|
||||
content = HtmCache.getInstance().getHtm(activeChar, path);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ public class AdminHwid implements IAdminCommandHandler
|
||||
}
|
||||
final L2PcInstance target = activeChar.getTarget().getActingPlayer();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/charhwinfo.htm"));
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/charhwinfo.htm"));
|
||||
html.replace("%name%", target.getName());
|
||||
html.replace("%macAddress%", target.getClient().getHardwareInfo().getMacAddress());
|
||||
html.replace("%windowsPlatformId%", target.getClient().getHardwareInfo().getWindowsPlatformId());
|
||||
|
||||
@@ -80,7 +80,7 @@ public final class AdminInstance implements IAdminCommandHandler
|
||||
case "admin_instances":
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/instances.htm");
|
||||
html.setFile(activeChar, "data/html/admin/instances.htm");
|
||||
html.replace("%instCount%", InstanceManager.getInstance().getInstances().size());
|
||||
html.replace("%tempCount%", InstanceManager.getInstance().getInstanceTemplates().size());
|
||||
activeChar.sendPacket(html);
|
||||
@@ -204,7 +204,7 @@ public final class AdminInstance implements IAdminCommandHandler
|
||||
final InstanceTemplate template = InstanceManager.getInstance().getInstanceTemplate(templateId);
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/admin/instances_detail.htm");
|
||||
html.setFile(player, "data/html/admin/instances_detail.htm");
|
||||
html.replace("%templateId%", template.getId());
|
||||
html.replace("%templateName%", template.getName());
|
||||
html.replace("%activeWorlds%", template.getWorldCount() + " / " + (template.getMaxWorlds() == -1 ? "Unlimited" : template.getMaxWorlds()));
|
||||
@@ -245,7 +245,7 @@ public final class AdminInstance implements IAdminCommandHandler
|
||||
private void sendTemplateList(L2PcInstance player, int page, BypassParser parser)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/admin/instances_list.htm");
|
||||
html.setFile(player, "data/html/admin/instances_list.htm");
|
||||
|
||||
final InstanceManager instManager = InstanceManager.getInstance();
|
||||
final List<InstanceTemplate> templateList = instManager.getInstanceTemplates().stream().sorted(Comparator.comparingLong(InstanceTemplate::getWorldCount).reversed()).filter(template -> !CommonUtil.contains(IGNORED_TEMPLATES, template.getId())).collect(Collectors.toList());
|
||||
|
||||
@@ -166,7 +166,7 @@ public class AdminLogin implements IAdminCommandHandler
|
||||
private void showMainPage(L2PcInstance activeChar)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/login.htm");
|
||||
html.setFile(activeChar, "data/html/admin/login.htm");
|
||||
html.replace("%server_name%", LoginServerThread.getInstance().getServerName());
|
||||
html.replace("%status%", LoginServerThread.getInstance().getStatusString());
|
||||
html.replace("%clock%", getServerTypeName(Config.SERVER_LIST_TYPE));
|
||||
|
||||
@@ -34,7 +34,7 @@ public final class AdminManor implements IAdminCommandHandler
|
||||
{
|
||||
final CastleManorManager manor = CastleManorManager.getInstance();
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar.getHtmlPrefix(), "data/html/admin/manor.htm");
|
||||
msg.setFile(activeChar, "data/html/admin/manor.htm");
|
||||
msg.replace("%status%", manor.getCurrentModeName());
|
||||
msg.replace("%change%", manor.getNextModeChange());
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ public final class AdminPForge implements IAdminCommandHandler
|
||||
private void showValuesPage(L2PcInstance activeChar, String[] opCodes, String format)
|
||||
{
|
||||
String sendBypass = null;
|
||||
String valuesHtml = HtmCache.getInstance().getHtmForce(activeChar.getHtmlPrefix(), "data/html/admin/pforge/values.htm");
|
||||
String valuesHtml = HtmCache.getInstance().getHtmForce(activeChar, "data/html/admin/pforge/values.htm");
|
||||
if (opCodes.length == 3)
|
||||
{
|
||||
valuesHtml = valuesHtml.replace("%opformat%", "chd");
|
||||
@@ -251,7 +251,7 @@ public final class AdminPForge implements IAdminCommandHandler
|
||||
valuesHtml = valuesHtml.replace("%format%", format);
|
||||
sendBypass += " " + format;
|
||||
|
||||
final String editorTemplate = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/pforge/inc/editor.htm");
|
||||
final String editorTemplate = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/pforge/inc/editor.htm");
|
||||
|
||||
if (editorTemplate != null)
|
||||
{
|
||||
|
||||
@@ -191,7 +191,7 @@ public final class AdminPcCafePoints implements IAdminCommandHandler
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
final L2PcInstance target = getTarget(activeChar);
|
||||
final int points = target.getPcCafePoints();
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/pccafe.htm"));
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/pccafe.htm"));
|
||||
html.replace("%points%", Util.formatAdena(points));
|
||||
html.replace("%targetName%", target.getName());
|
||||
activeChar.sendPacket(html);
|
||||
|
||||
@@ -52,7 +52,7 @@ public class AdminPcCondOverride implements IAdminCommandHandler
|
||||
case "admin_exceptions":
|
||||
{
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar.getHtmlPrefix(), "data/html/admin/cond_override.htm");
|
||||
msg.setFile(activeChar, "data/html/admin/cond_override.htm");
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
for (PcCondOverride ex : PcCondOverride.values())
|
||||
{
|
||||
|
||||
@@ -105,7 +105,7 @@ public class AdminPremium implements IAdminCommandHandler
|
||||
}
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/premium_menu.htm"));
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/premium_menu.htm"));
|
||||
activeChar.sendPacket(html);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ public final class AdminPrimePoints implements IAdminCommandHandler
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
final L2PcInstance target = getTarget(activeChar);
|
||||
final int points = target.getPrimePoints();
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/primepoints.htm"));
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/primepoints.htm"));
|
||||
html.replace("%points%", Util.formatAdena(points));
|
||||
html.replace("%targetName%", target.getName());
|
||||
activeChar.sendPacket(html);
|
||||
|
||||
@@ -77,7 +77,7 @@ public class AdminPunishment implements IAdminCommandHandler
|
||||
{
|
||||
if (!st.hasMoreTokens())
|
||||
{
|
||||
String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/punishment.htm");
|
||||
String content = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/punishment.htm");
|
||||
if (content != null)
|
||||
{
|
||||
content = content.replaceAll("%punishments%", CommonUtil.implode(PunishmentType.values(), ";"));
|
||||
@@ -118,7 +118,7 @@ public class AdminPunishment implements IAdminCommandHandler
|
||||
key = findCharId(key);
|
||||
}
|
||||
|
||||
String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/punishment-info.htm");
|
||||
String content = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/punishment-info.htm");
|
||||
if (content != null)
|
||||
{
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
@@ -174,7 +174,7 @@ public class AdminPunishment implements IAdminCommandHandler
|
||||
{
|
||||
target = activeChar.getTarget().getActingPlayer();
|
||||
}
|
||||
String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/punishment-player.htm");
|
||||
String content = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/punishment-player.htm");
|
||||
if (content != null)
|
||||
{
|
||||
content = content.replaceAll("%player_name%", target.getName());
|
||||
|
||||
@@ -182,7 +182,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
}
|
||||
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar.getHtmlPrefix(), "data/html/admin/npc-quests.htm");
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%objid%", character.getObjectId());
|
||||
msg.replace("%questName%", "");
|
||||
@@ -286,7 +286,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
}
|
||||
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar.getHtmlPrefix(), "data/html/admin/npc-quests.htm");
|
||||
msg.setFile(activeChar, "data/html/admin/npc-quests.htm");
|
||||
msg.replace("%quests%", sb.toString());
|
||||
msg.replace("%questName%", "<table><tr><td width=\"50\" align=\"left\"><a action=\"bypass -h admin_script_load " + quest.getName() + "\">Reload</a></td> <td width=\"150\" align=\"center\"><a action=\"bypass -h admin_quest_info " + quest.getName() + "\">" + quest.getName() + "</a></td> <td width=\"50\" align=\"right\"><a action=\"bypass -h admin_script_unload " + quest.getName() + "\">Unload</a></td></tr></table>");
|
||||
activeChar.sendPacket(msg);
|
||||
@@ -365,7 +365,7 @@ public class AdminQuest implements IAdminCommandHandler
|
||||
replace = replace.substring(0, 17200); // packetlimit
|
||||
}
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/scriptdirectory.htm");
|
||||
html.setFile(activeChar, "data/html/admin/scriptdirectory.htm");
|
||||
html.replace("%path%", currentPath);
|
||||
html.replace("%list%", replace);
|
||||
activeChar.sendPacket(html);
|
||||
|
||||
@@ -171,7 +171,7 @@ public class AdminScan implements IAdminCommandHandler
|
||||
{
|
||||
final BypassBuilder bypassParser = createBypassBuilder(parser, "bypass -h admin_scan");
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/scan.htm");
|
||||
html.setFile(activeChar, "data/html/admin/scan.htm");
|
||||
|
||||
//@formatter:off
|
||||
final PageResult result = PageBuilder.newBuilder(L2World.getInstance().getVisibleObjects(activeChar, L2Npc.class, radius, condition), 15, bypassParser.toString())
|
||||
|
||||
@@ -53,7 +53,7 @@ public class AdminServerInfo implements IAdminCommandHandler
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage();
|
||||
final Runtime RunTime = Runtime.getRuntime();
|
||||
final int mb = 1024 * 1024;
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/serverinfo.htm"));
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar, "data/html/admin/serverinfo.htm"));
|
||||
|
||||
html.replace("%os_name%", System.getProperty("os.name"));
|
||||
html.replace("%os_ver%", System.getProperty("os.version"));
|
||||
|
||||
@@ -106,7 +106,7 @@ public class AdminShutdown implements IAdminCommandHandler
|
||||
final Calendar cal = Calendar.getInstance();
|
||||
cal.set(Calendar.HOUR_OF_DAY, h);
|
||||
cal.set(Calendar.MINUTE, m);
|
||||
adminReply.setFile(activeChar.getHtmlPrefix(), "data/html/admin/shutdown.htm");
|
||||
adminReply.setFile(activeChar, "data/html/admin/shutdown.htm");
|
||||
adminReply.replace("%count%", String.valueOf(L2World.getInstance().getPlayers().size()));
|
||||
adminReply.replace("%used%", String.valueOf(Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()));
|
||||
adminReply.replace("%time%", format.format(cal.getTime()));
|
||||
|
||||
@@ -409,7 +409,7 @@ public class AdminSkill implements IAdminCommandHandler
|
||||
}
|
||||
final L2PcInstance player = target.getActingPlayer();
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
|
||||
adminReply.setFile(activeChar.getHtmlPrefix(), "data/html/admin/charskills.htm");
|
||||
adminReply.setFile(activeChar, "data/html/admin/charskills.htm");
|
||||
adminReply.replace("%name%", player.getName());
|
||||
adminReply.replace("%level%", String.valueOf(player.getLevel()));
|
||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||
|
||||
@@ -112,7 +112,7 @@ public class AdminZone implements IAdminCommandHandler
|
||||
|
||||
private static void showHtml(L2PcInstance activeChar)
|
||||
{
|
||||
final String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/zone.htm");
|
||||
final String htmContent = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/zone.htm");
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
|
||||
adminReply.setHtml(htmContent);
|
||||
adminReply.replace("%PEACE%", activeChar.isInsideZone(ZoneId.PEACE) ? "<font color=\"LEVEL\">YES</font>" : "NO");
|
||||
|
||||
@@ -265,7 +265,7 @@ public class AdminZones extends AbstractNpcAI implements IAdminCommandHandler
|
||||
}
|
||||
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar.getHtmlPrefix(), "data/html/admin/zone_editor.htm");
|
||||
msg.setFile(activeChar, "data/html/admin/zone_editor.htm");
|
||||
msg.replace("%zones%", sb.toString());
|
||||
activeChar.sendPacket(msg);
|
||||
}
|
||||
@@ -561,7 +561,7 @@ public class AdminZones extends AbstractNpcAI implements IAdminCommandHandler
|
||||
private void buildHtmlWindow(L2PcInstance activeChar, int page)
|
||||
{
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(0, 1);
|
||||
msg.setFile(activeChar.getHtmlPrefix(), "data/html/admin/zone_editor_create.htm");
|
||||
msg.setFile(activeChar, "data/html/admin/zone_editor_create.htm");
|
||||
final ZoneNodeHolder holder = _zones.computeIfAbsent(activeChar.getObjectId(), key -> new ZoneNodeHolder(activeChar));
|
||||
final AtomicInteger position = new AtomicInteger(page * 20);
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public class Link implements IBypassHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
final String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/" + htmlPath);
|
||||
final String content = HtmCache.getInstance().getHtm(activeChar, "data/html/" + htmlPath);
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(target != null ? target.getObjectId() : 0);
|
||||
html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0)));
|
||||
activeChar.sendPacket(html);
|
||||
|
||||
@@ -199,7 +199,7 @@ public class NpcViewMod implements IBypassHandler
|
||||
public static void sendNpcView(L2PcInstance activeChar, L2Npc npc)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage();
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/mods/NpcView/Info.htm");
|
||||
html.setFile(activeChar, "data/html/mods/NpcView/Info.htm");
|
||||
html.replace("%name%", npc.getName());
|
||||
html.replace("%hpGauge%", HtmlUtil.getHpGauge(250, (long) npc.getCurrentHp(), npc.getMaxHp(), false));
|
||||
html.replace("%mpGauge%", HtmlUtil.getMpGauge(250, (long) npc.getCurrentMp(), npc.getMaxMp(), false));
|
||||
@@ -274,7 +274,7 @@ public class NpcViewMod implements IBypassHandler
|
||||
public static void sendNpcSkillView(L2PcInstance activeChar, L2Npc npc)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage();
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/mods/NpcView/Skills.htm");
|
||||
html.setFile(activeChar, "data/html/mods/NpcView/Skills.htm");
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -306,7 +306,7 @@ public class NpcViewMod implements IBypassHandler
|
||||
public static void sendAggroListView(L2PcInstance activeChar, L2Npc npc)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage();
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/mods/NpcView/AggroList.htm");
|
||||
html.setFile(activeChar, "data/html/mods/NpcView/AggroList.htm");
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -568,7 +568,7 @@ public class NpcViewMod implements IBypassHandler
|
||||
bodySb.append("</td>");
|
||||
bodySb.append("</tr></table>");
|
||||
|
||||
String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/mods/NpcView/DropList.htm");
|
||||
String html = HtmCache.getInstance().getHtm(activeChar, "data/html/mods/NpcView/DropList.htm");
|
||||
if (html == null)
|
||||
{
|
||||
LOGGER.warning(NpcViewMod.class.getSimpleName() + ": The html file data/html/mods/NpcView/DropList.htm could not be found.");
|
||||
|
||||
@@ -61,7 +61,7 @@ public class PlayerHelp implements IBypassHandler
|
||||
html = new NpcHtmlMessage();
|
||||
}
|
||||
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/help/" + cmd[0]);
|
||||
html.setFile(activeChar, "data/html/help/" + cmd[0]);
|
||||
activeChar.sendPacket(html);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -211,7 +211,7 @@ public class QuestLink implements IBypassHandler
|
||||
if (player.getAllActiveQuests().size() > 40)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fullquest.html");
|
||||
html.setFile(player, "data/html/fullquest.html");
|
||||
player.sendPacket(html);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -45,14 +45,14 @@ public class TerritoryStatus implements IBypassHandler
|
||||
{
|
||||
if (npc.getCastle().getOwnerId() > 0)
|
||||
{
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/territorystatus.htm");
|
||||
html.setFile(activeChar, "data/html/territorystatus.htm");
|
||||
final L2Clan clan = ClanTable.getInstance().getClan(npc.getCastle().getOwnerId());
|
||||
html.replace("%clanname%", clan.getName());
|
||||
html.replace("%clanleadername%", clan.getLeaderName());
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/territorynoclan.htm");
|
||||
html.setFile(activeChar, "data/html/territorynoclan.htm");
|
||||
}
|
||||
}
|
||||
html.replace("%castlename%", npc.getCastle().getName());
|
||||
|
||||
@@ -141,9 +141,9 @@ public class DropSearchBoard implements IParseBoardHandler
|
||||
@Override
|
||||
public boolean parseCommunityBoardCommand(String command, L2PcInstance player)
|
||||
{
|
||||
final String navigation = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), NAVIGATION_PATH);
|
||||
final String navigation = HtmCache.getInstance().getHtm(player, NAVIGATION_PATH);
|
||||
String[] params = command.split(" ");
|
||||
String html = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/CommunityBoard/Custom/dropsearch/main.html");
|
||||
String html = HtmCache.getInstance().getHtm(player, "data/html/CommunityBoard/Custom/dropsearch/main.html");
|
||||
switch (params[0])
|
||||
{
|
||||
case "_bbs_search_item":
|
||||
|
||||
@@ -59,7 +59,7 @@ public class FavoriteBoard implements IParseBoardHandler
|
||||
if (command.startsWith("_bbsgetfav"))
|
||||
{
|
||||
// Load Favorite links
|
||||
final String list = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/favorite_list.html");
|
||||
final String list = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/favorite_list.html");
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(SELECT_FAVORITES))
|
||||
@@ -77,7 +77,7 @@ public class FavoriteBoard implements IParseBoardHandler
|
||||
sb.append(link);
|
||||
}
|
||||
}
|
||||
String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/favorite.html");
|
||||
String html = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/favorite.html");
|
||||
html = html.replaceAll("%fav_list%", sb.toString());
|
||||
CommunityBoardHandler.separateAndSend(html, activeChar);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class FriendsBoard implements IParseBoardHandler
|
||||
{
|
||||
CommunityBoardHandler.getInstance().addBypass(activeChar, "Friends List", command);
|
||||
|
||||
final String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/friends_list.html");
|
||||
final String html = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/friends_list.html");
|
||||
|
||||
CommunityBoardHandler.separateAndSend(html, activeChar);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public class FriendsBoard implements IParseBoardHandler
|
||||
{
|
||||
CommunityBoardHandler.getInstance().addBypass(activeChar, "Ignore list", command);
|
||||
|
||||
final String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/friends_block_list.html");
|
||||
final String html = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/friends_block_list.html");
|
||||
|
||||
CommunityBoardHandler.separateAndSend(html, activeChar);
|
||||
}
|
||||
|
||||
@@ -119,13 +119,13 @@ public final class HomeBoard implements IParseBoardHandler
|
||||
}
|
||||
|
||||
String returnHtml = null;
|
||||
final String navigation = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), NAVIGATION_PATH);
|
||||
final String navigation = HtmCache.getInstance().getHtm(activeChar, NAVIGATION_PATH);
|
||||
if (command.equals("_bbshome") || command.equals("_bbstop"))
|
||||
{
|
||||
final String customPath = Config.CUSTOM_CB_ENABLED ? "Custom/" : "";
|
||||
CommunityBoardHandler.getInstance().addBypass(activeChar, "Home", command);
|
||||
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/" + customPath + "home.html");
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/" + customPath + "home.html");
|
||||
if (!Config.CUSTOM_CB_ENABLED)
|
||||
{
|
||||
returnHtml = returnHtml.replaceAll("%fav_count%", Integer.toString(getFavoriteCount(activeChar)));
|
||||
@@ -139,7 +139,7 @@ public final class HomeBoard implements IParseBoardHandler
|
||||
final String path = command.replace("_bbstop;", "");
|
||||
if ((path.length() > 0) && path.endsWith(".html"))
|
||||
{
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/" + customPath + path);
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/" + customPath + path);
|
||||
}
|
||||
}
|
||||
else if (command.startsWith("_bbsmultisell"))
|
||||
@@ -148,7 +148,7 @@ public final class HomeBoard implements IParseBoardHandler
|
||||
final String[] buypassOptions = fullBypass.split(",");
|
||||
final int multisellId = Integer.parseInt(buypassOptions[0]);
|
||||
final String page = buypassOptions[1];
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/Custom/" + page + ".html");
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/" + page + ".html");
|
||||
MultisellData.getInstance().separateAndSend(multisellId, activeChar, null, false);
|
||||
}
|
||||
else if (command.startsWith("_bbsexcmultisell"))
|
||||
@@ -157,13 +157,13 @@ public final class HomeBoard implements IParseBoardHandler
|
||||
final String[] buypassOptions = fullBypass.split(",");
|
||||
final int multisellId = Integer.parseInt(buypassOptions[0]);
|
||||
final String page = buypassOptions[1];
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/Custom/" + page + ".html");
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/" + page + ".html");
|
||||
MultisellData.getInstance().separateAndSend(multisellId, activeChar, null, true);
|
||||
}
|
||||
else if (command.startsWith("_bbssell"))
|
||||
{
|
||||
final String page = command.replace("_bbssell;", "");
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/Custom/" + page + ".html");
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/" + page + ".html");
|
||||
activeChar.sendPacket(new BuyList(BuyListData.getInstance().getBuyList(423), activeChar, 0));
|
||||
activeChar.sendPacket(new ExBuySellList(activeChar, false));
|
||||
}
|
||||
@@ -224,7 +224,7 @@ public final class HomeBoard implements IParseBoardHandler
|
||||
}
|
||||
}
|
||||
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/Custom/" + page + ".html");
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/" + page + ".html");
|
||||
}
|
||||
else if (command.startsWith("_bbsheal"))
|
||||
{
|
||||
@@ -254,7 +254,7 @@ public final class HomeBoard implements IParseBoardHandler
|
||||
activeChar.sendMessage("You used heal!");
|
||||
}
|
||||
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/Custom/" + page + ".html");
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/" + page + ".html");
|
||||
}
|
||||
else if (command.startsWith("_bbspremium"))
|
||||
{
|
||||
@@ -270,7 +270,7 @@ public final class HomeBoard implements IParseBoardHandler
|
||||
activeChar.destroyItemByItemId("CB_Premium", Config.COMMUNITY_PREMIUM_COIN_ID, Config.COMMUNITY_PREMIUM_PRICE_PER_DAY * premiumDays, activeChar, true);
|
||||
PremiumManager.getInstance().addPremiumTime(activeChar.getAccountName(), premiumDays, TimeUnit.DAYS);
|
||||
activeChar.sendMessage("Your account will now have premium status until " + new SimpleDateFormat("dd.MM.yyyy HH:mm").format(PremiumManager.getInstance().getPremiumExpiration(activeChar.getAccountName())) + ".");
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/Custom/premium/thankyou.html");
|
||||
returnHtml = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/Custom/premium/thankyou.html");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public class HomepageBoard implements IParseBoardHandler
|
||||
@Override
|
||||
public boolean parseCommunityBoardCommand(String command, L2PcInstance activeChar)
|
||||
{
|
||||
CommunityBoardHandler.separateAndSend(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/homepage.html"), activeChar);
|
||||
CommunityBoardHandler.separateAndSend(HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/homepage.html"), activeChar);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class MailBoard implements IWriteBoardHandler
|
||||
{
|
||||
CommunityBoardHandler.getInstance().addBypass(activeChar, "Mail Command", command);
|
||||
|
||||
final String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/mail.html");
|
||||
final String html = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/mail.html");
|
||||
CommunityBoardHandler.separateAndSend(html, activeChar);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class MemoBoard implements IWriteBoardHandler
|
||||
{
|
||||
CommunityBoardHandler.getInstance().addBypass(activeChar, "Memo Command", command);
|
||||
|
||||
final String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/memo.html");
|
||||
final String html = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/memo.html");
|
||||
CommunityBoardHandler.separateAndSend(html, activeChar);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class RegionBoard implements IWriteBoardHandler
|
||||
{
|
||||
CommunityBoardHandler.getInstance().addBypass(activeChar, "Region", command);
|
||||
|
||||
final String list = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/region_list.html");
|
||||
final String list = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/region_list.html");
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < REGIONS.length; i++)
|
||||
{
|
||||
@@ -69,7 +69,7 @@ public class RegionBoard implements IWriteBoardHandler
|
||||
sb.append(link);
|
||||
}
|
||||
|
||||
String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/region.html");
|
||||
String html = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/region.html");
|
||||
html = html.replace("%region_list%", sb.toString());
|
||||
CommunityBoardHandler.separateAndSend(html, activeChar);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Book implements IItemHandler
|
||||
final int itemId = item.getId();
|
||||
|
||||
final String filename = "data/html/help/" + itemId + ".htm";
|
||||
final String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), filename);
|
||||
final String content = HtmCache.getInstance().getHtm(activeChar, filename);
|
||||
|
||||
if (content == null)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Bypass implements IItemHandler
|
||||
final int itemId = item.getId();
|
||||
|
||||
final String filename = "data/html/item/" + itemId + ".htm";
|
||||
final String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), filename);
|
||||
final String content = HtmCache.getInstance().getHtm(activeChar, filename);
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, item.getId());
|
||||
if (content == null)
|
||||
{
|
||||
|
||||
@@ -166,7 +166,7 @@ public class JailHandler implements IPunishmentHandler
|
||||
|
||||
// Open a Html message to inform the player
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage();
|
||||
String content = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/jail_in.htm");
|
||||
String content = HtmCache.getInstance().getHtm(player, "data/html/jail_in.htm");
|
||||
if (content != null)
|
||||
{
|
||||
content = content.replaceAll("%reason%", task != null ? task.getReason() : "");
|
||||
@@ -202,7 +202,7 @@ public class JailHandler implements IPunishmentHandler
|
||||
|
||||
// Open a Html message to inform the player
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage();
|
||||
final String content = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/jail_out.htm");
|
||||
final String content = HtmCache.getInstance().getHtm(player, "data/html/jail_out.htm");
|
||||
if (content != null)
|
||||
{
|
||||
msg.setHtml(content);
|
||||
|
||||
@@ -77,7 +77,7 @@ public class SiegeStatus implements IUserCommandHandler
|
||||
}
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage();
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/siege/siege_status.htm");
|
||||
html.setFile(activeChar, "data/html/siege/siege_status.htm");
|
||||
html.replace("%kill_count%", clan.getSiegeKills());
|
||||
html.replace("%death_count%", clan.getSiegeDeaths());
|
||||
html.replace("%member_list%", sb.toString());
|
||||
|
||||
@@ -95,7 +95,7 @@ public class ChangePassword implements IVoicedCommandHandler
|
||||
else
|
||||
{
|
||||
// showHTML(activeChar);
|
||||
String html = HtmCache.getInstance().getHtm("en", "data/html/mods/ChangePassword.htm");
|
||||
String html = HtmCache.getInstance().getHtm(null, "data/html/mods/ChangePassword.htm");
|
||||
if (html == null)
|
||||
{
|
||||
html = "<html><body><br><br><center><font color=LEVEL>404:</font> File Not Found</center></body></html>";
|
||||
|
||||
@@ -47,7 +47,7 @@ public class Lang implements IVoicedCommandHandler
|
||||
html.append("<button value=\"" + lang.toUpperCase() + "\" action=\"bypass -h voice .lang " + lang + "\" width=60 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"><br>");
|
||||
}
|
||||
|
||||
msg.setFile(activeChar.getHtmlPrefix(), "data/html/mods/Lang/LanguageSelect.htm");
|
||||
msg.setFile(activeChar, "data/html/mods/Lang/LanguageSelect.htm");
|
||||
msg.replace("%list%", html.toString());
|
||||
activeChar.sendPacket(msg);
|
||||
return true;
|
||||
@@ -59,11 +59,11 @@ public class Lang implements IVoicedCommandHandler
|
||||
final String lang = st.nextToken().trim();
|
||||
if (activeChar.setLang(lang))
|
||||
{
|
||||
msg.setFile(activeChar.getHtmlPrefix(), "data/html/mods/Lang/Ok.htm");
|
||||
msg.setFile(activeChar, "data/html/mods/Lang/Ok.htm");
|
||||
activeChar.sendPacket(msg);
|
||||
return true;
|
||||
}
|
||||
msg.setFile(activeChar.getHtmlPrefix(), "data/html/mods/Lang/Error.htm");
|
||||
msg.setFile(activeChar, "data/html/mods/Lang/Error.htm");
|
||||
activeChar.sendPacket(msg);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ public class Q00255_Tutorial extends Quest
|
||||
|
||||
private void showTutorialHtml(L2PcInstance player, String html)
|
||||
{
|
||||
player.sendPacket(new TutorialShowHtml(getHtm(player.getHtmlPrefix(), html)));
|
||||
player.sendPacket(new TutorialShowHtml(getHtm(player, html)));
|
||||
}
|
||||
|
||||
public void playTutorialVoice(L2PcInstance player, String voice)
|
||||
|
||||
@@ -309,7 +309,7 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
|
||||
if ((i9 % 32) < 31)
|
||||
{
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "30845-12.html");
|
||||
htmltext = getHtm(player, "30845-12.html");
|
||||
}
|
||||
else if ((i9 % 32) == 31)
|
||||
{
|
||||
@@ -478,7 +478,7 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
rewardItems(player, 729, 1);
|
||||
st.set("ExMemoState", 0);
|
||||
st.set("v1", 0);
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "30845-13.html");
|
||||
htmltext = getHtm(player, "30845-13.html");
|
||||
}
|
||||
else if (i6 == 30)
|
||||
{
|
||||
@@ -486,7 +486,7 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
rewardItems(player, 951, 2);
|
||||
st.set("ExMemoState", 0);
|
||||
st.set("v1", 0);
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "30845-14.html");
|
||||
htmltext = getHtm(player, "30845-14.html");
|
||||
}
|
||||
else if ((i6 == 21) || (i6 == 12))
|
||||
{
|
||||
@@ -495,34 +495,34 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
rewardItems(player, 955, 1);
|
||||
st.set("ExMemoState", 0);
|
||||
st.set("v1", 0);
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "30845-15.html");
|
||||
htmltext = getHtm(player, "30845-15.html");
|
||||
}
|
||||
else if (i6 == 20)
|
||||
{
|
||||
rewardItems(player, 951, 2);
|
||||
st.set("ExMemoState", 0);
|
||||
st.set("v1", 0);
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "30845-16.html");
|
||||
htmltext = getHtm(player, "30845-16.html");
|
||||
}
|
||||
else if (i6 == 11)
|
||||
{
|
||||
rewardItems(player, 951, 1);
|
||||
st.set("ExMemoState", 0);
|
||||
st.set("v1", 0);
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "30845-17.html");
|
||||
htmltext = getHtm(player, "30845-17.html");
|
||||
}
|
||||
else if (i6 == 10)
|
||||
{
|
||||
rewardItems(player, 956, 2);
|
||||
st.set("ExMemoState", 0);
|
||||
st.set("v1", 0);
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "30845-18.html");
|
||||
htmltext = getHtm(player, "30845-18.html");
|
||||
}
|
||||
else if (i6 == 0)
|
||||
{
|
||||
st.set("ExMemoState", 0);
|
||||
st.set("v1", 0);
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "30845-19.html");
|
||||
htmltext = getHtm(player, "30845-19.html");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -619,7 +619,7 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
int i2 = (i0 % 10000) / 100;
|
||||
int i3 = (i0 % 1000000) / 10000;
|
||||
int i4 = (i0 % 100000000) / 1000000;
|
||||
htmltext = getHtm(player.getHtmlPrefix(), "30845-11a.html");
|
||||
htmltext = getHtm(player, "30845-11a.html");
|
||||
|
||||
if ((i9 % 2) < 1)
|
||||
{
|
||||
|
||||
@@ -495,7 +495,7 @@ public class Q11000_MoonKnight extends Quest
|
||||
final L2PcInstance player = event.getActiveChar();
|
||||
if ((event.getMarkId() == QUESTION_MARK_ID) && canStartQuest(player))
|
||||
{
|
||||
final String html = getHtm(player.getHtmlPrefix(), "popup.html");
|
||||
final String html = getHtm(player, "popup.html");
|
||||
player.sendPacket(new TutorialShowHtml(html));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,6 +413,7 @@ public final class Config
|
||||
public static boolean GM_CRITANNOUNCER_NAME;
|
||||
public static boolean GM_GIVE_SPECIAL_SKILLS;
|
||||
public static boolean GM_GIVE_SPECIAL_AURA_SKILLS;
|
||||
public static boolean GM_DEBUG_HTML_PATHS;
|
||||
public static boolean USE_SUPER_HASTE_AS_GM_SPEED;
|
||||
public static boolean GAMEGUARD_ENFORCE;
|
||||
public static boolean GAMEGUARD_PROHIBITACTION;
|
||||
@@ -1764,6 +1765,7 @@ public final class Config
|
||||
GM_CRITANNOUNCER_NAME = General.getBoolean("GMShowCritAnnouncerName", false);
|
||||
GM_GIVE_SPECIAL_SKILLS = General.getBoolean("GMGiveSpecialSkills", false);
|
||||
GM_GIVE_SPECIAL_AURA_SKILLS = General.getBoolean("GMGiveSpecialAuraSkills", false);
|
||||
GM_DEBUG_HTML_PATHS = General.getBoolean("GMDebugHtmlPaths", true);
|
||||
USE_SUPER_HASTE_AS_GM_SPEED = General.getBoolean("UseSuperHasteAsGMSpeed", false);
|
||||
GAMEGUARD_ENFORCE = General.getBoolean("GameGuardEnforce", false);
|
||||
GAMEGUARD_PROHIBITACTION = General.getBoolean("GameGuardProhibitAction", false);
|
||||
|
||||
@@ -29,6 +29,8 @@ import java.util.regex.Pattern;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.util.file.filter.HTMLFilter;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.util.BuilderUtil;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@@ -140,9 +142,9 @@ public class HtmCache
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getHtmForce(String prefix, String path)
|
||||
public String getHtmForce(L2PcInstance player, String path)
|
||||
{
|
||||
String content = getHtm(prefix, path);
|
||||
String content = getHtm(player, path);
|
||||
if (content == null)
|
||||
{
|
||||
content = "<html><body>My text is missing:<br>" + path + "</body></html>";
|
||||
@@ -151,8 +153,9 @@ public class HtmCache
|
||||
return content;
|
||||
}
|
||||
|
||||
public String getHtm(String prefix, String path)
|
||||
public String getHtm(L2PcInstance player, String path)
|
||||
{
|
||||
final String prefix = player != null ? player.getHtmlPrefix() : "en";
|
||||
String newPath = null;
|
||||
String content;
|
||||
if ((prefix != null) && !prefix.isEmpty())
|
||||
@@ -161,6 +164,10 @@ public class HtmCache
|
||||
content = getHtm(newPath);
|
||||
if (content != null)
|
||||
{
|
||||
if ((player != null) && player.isGM() && Config.GM_DEBUG_HTML_PATHS)
|
||||
{
|
||||
BuilderUtil.sendHtmlMessage(player, newPath.substring(5));
|
||||
}
|
||||
return content;
|
||||
}
|
||||
}
|
||||
@@ -171,6 +178,10 @@ public class HtmCache
|
||||
_cache.put(newPath, content);
|
||||
}
|
||||
|
||||
if ((player != null) && player.isGM() && (path != null) && Config.GM_DEBUG_HTML_PATHS)
|
||||
{
|
||||
BuilderUtil.sendHtmlMessage(player, path.substring(5));
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
||||
|
||||
@@ -444,7 +444,7 @@ public final class PetitionManager
|
||||
final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage();
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/petition.htm");
|
||||
html.setFile(activeChar, "data/html/admin/petition.htm");
|
||||
html.replace("%petition%", String.valueOf(currPetition.getId()));
|
||||
html.replace("%time%", dateFormat.format(new Date(currPetition.getSubmitTime())));
|
||||
html.replace("%type%", currPetition.getTypeAsString());
|
||||
|
||||
@@ -86,20 +86,20 @@ public final class SellBuffsManager implements IGameXmlReader
|
||||
|
||||
public void sendSellMenu(L2PcInstance player)
|
||||
{
|
||||
final String html = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), htmlFolder + (player.isSellingBuffs() ? "BuffMenu_already.html" : "BuffMenu.html"));
|
||||
final String html = HtmCache.getInstance().getHtm(player, htmlFolder + (player.isSellingBuffs() ? "BuffMenu_already.html" : "BuffMenu.html"));
|
||||
CommunityBoardHandler.separateAndSend(html, player);
|
||||
}
|
||||
|
||||
public void sendBuffChoiceMenu(L2PcInstance player, int index)
|
||||
{
|
||||
String html = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), htmlFolder + "BuffChoice.html");
|
||||
String html = HtmCache.getInstance().getHtm(player, htmlFolder + "BuffChoice.html");
|
||||
html = html.replace("%list%", buildSkillMenu(player, index));
|
||||
CommunityBoardHandler.separateAndSend(html, player);
|
||||
}
|
||||
|
||||
public void sendBuffEditMenu(L2PcInstance player)
|
||||
{
|
||||
String html = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), htmlFolder + "BuffChoice.html");
|
||||
String html = HtmCache.getInstance().getHtm(player, htmlFolder + "BuffChoice.html");
|
||||
html = html.replace("%list%", buildEditMenu(player));
|
||||
CommunityBoardHandler.separateAndSend(html, player);
|
||||
}
|
||||
@@ -111,7 +111,7 @@ public final class SellBuffsManager implements IGameXmlReader
|
||||
return;
|
||||
}
|
||||
|
||||
String html = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), htmlFolder + "BuffBuyMenu.html");
|
||||
String html = HtmCache.getInstance().getHtm(player, htmlFolder + "BuffBuyMenu.html");
|
||||
html = html.replace("%list%", buildBuffMenu(player, seller, index));
|
||||
CommunityBoardHandler.separateAndSend(html, player);
|
||||
}
|
||||
|
||||
@@ -721,7 +721,7 @@ public class L2Npc extends L2Character
|
||||
*/
|
||||
private boolean showPkDenyChatWindow(L2PcInstance player, String type)
|
||||
{
|
||||
String html = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/" + type + "/" + getId() + "-pk.htm");
|
||||
String html = HtmCache.getInstance().getHtm(player, "data/html/" + type + "/" + getId() + "-pk.htm");
|
||||
if (html != null)
|
||||
{
|
||||
html = html.replaceAll("%objectId%", String.valueOf(getObjectId()));
|
||||
@@ -847,7 +847,7 @@ public class L2Npc extends L2Character
|
||||
|
||||
// Send a Server->Client NpcHtmlMessage containing the text of the L2NpcInstance to the L2PcInstance
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), filename);
|
||||
html.setFile(player, filename);
|
||||
html.replace("%npcname%", getName());
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
player.sendPacket(html);
|
||||
@@ -865,7 +865,7 @@ public class L2Npc extends L2Character
|
||||
{
|
||||
// Send a Server->Client NpcHtmlMessage containing the text of the L2NpcInstance to the L2PcInstance
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), filename);
|
||||
html.setFile(player, filename);
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
player.sendPacket(html);
|
||||
|
||||
|
||||
@@ -114,11 +114,11 @@ public class L2DoormenInstance extends L2NpcInstance
|
||||
|
||||
if (!isOwnerClan(player))
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/doormen/" + getTemplate().getId() + "-no.htm");
|
||||
html.setFile(player, "data/html/doormen/" + getTemplate().getId() + "-no.htm");
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/doormen/" + getTemplate().getId() + ".htm");
|
||||
html.setFile(player, "data/html/doormen/" + getTemplate().getId() + ".htm");
|
||||
}
|
||||
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
@@ -152,7 +152,7 @@ public class L2DoormenInstance extends L2NpcInstance
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/doormen/" + getTemplate().getId() + "-busy.htm");
|
||||
html.setFile(player, "data/html/doormen/" + getTemplate().getId() + "-busy.htm");
|
||||
player.sendPacket(html);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,15 +40,15 @@ public class L2FortDoormenInstance extends L2DoormenInstance
|
||||
|
||||
if (!isOwnerClan(player))
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/doormen/" + getTemplate().getId() + "-no.htm");
|
||||
html.setFile(player, "data/html/doormen/" + getTemplate().getId() + "-no.htm");
|
||||
}
|
||||
else if (isUnderSiege())
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/doormen/" + getTemplate().getId() + "-busy.htm");
|
||||
html.setFile(player, "data/html/doormen/" + getTemplate().getId() + "-busy.htm");
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/doormen/" + getTemplate().getId() + ".htm");
|
||||
html.setFile(player, "data/html/doormen/" + getTemplate().getId() + ".htm");
|
||||
}
|
||||
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
|
||||
@@ -77,12 +77,12 @@ public class L2FortLogisticsInstance extends L2MerchantInstance
|
||||
{
|
||||
if (isMyLord)
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/logistics-rewards.htm");
|
||||
html.setFile(player, "data/html/fortress/logistics-rewards.htm");
|
||||
html.replace("%bloodoath%", String.valueOf(player.getClan().getBloodOathCount()));
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/logistics-noprivs.htm");
|
||||
html.setFile(player, "data/html/fortress/logistics-noprivs.htm");
|
||||
}
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
player.sendPacket(html);
|
||||
@@ -96,16 +96,16 @@ public class L2FortLogisticsInstance extends L2MerchantInstance
|
||||
{
|
||||
player.addItem("Quest", 9910, blood, this, true);
|
||||
player.getClan().resetBloodOathCount();
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/logistics-blood.htm");
|
||||
html.setFile(player, "data/html/fortress/logistics-blood.htm");
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/logistics-noblood.htm");
|
||||
html.setFile(player, "data/html/fortress/logistics-noblood.htm");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/logistics-noprivs.htm");
|
||||
html.setFile(player, "data/html/fortress/logistics-noprivs.htm");
|
||||
}
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
player.sendPacket(html);
|
||||
@@ -116,17 +116,17 @@ public class L2FortLogisticsInstance extends L2MerchantInstance
|
||||
{
|
||||
if (player.isClanLeader())
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/logistics-supplylvl.htm");
|
||||
html.setFile(player, "data/html/fortress/logistics-supplylvl.htm");
|
||||
html.replace("%supplylvl%", String.valueOf(getFort().getSupplyLvL()));
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/logistics-noprivs.htm");
|
||||
html.setFile(player, "data/html/fortress/logistics-noprivs.htm");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/logistics-1.htm"); // TODO: Missing HTML?
|
||||
html.setFile(player, "data/html/fortress/logistics-1.htm"); // TODO: Missing HTML?
|
||||
}
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
player.sendPacket(html);
|
||||
@@ -137,7 +137,7 @@ public class L2FortLogisticsInstance extends L2MerchantInstance
|
||||
{
|
||||
if (getFort().getSiege().isInProgress())
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/logistics-siege.htm");
|
||||
html.setFile(player, "data/html/fortress/logistics-siege.htm");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -155,17 +155,17 @@ public class L2FortLogisticsInstance extends L2MerchantInstance
|
||||
getFort().setSupplyLvL(0);
|
||||
getFort().saveFortVariables();
|
||||
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/logistics-supply.htm");
|
||||
html.setFile(player, "data/html/fortress/logistics-supply.htm");
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/logistics-nosupply.htm");
|
||||
html.setFile(player, "data/html/fortress/logistics-nosupply.htm");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/logistics-noprivs.htm");
|
||||
html.setFile(player, "data/html/fortress/logistics-noprivs.htm");
|
||||
}
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
player.sendPacket(html);
|
||||
@@ -198,7 +198,7 @@ public class L2FortLogisticsInstance extends L2MerchantInstance
|
||||
}
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), filename);
|
||||
html.setFile(player, filename);
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
html.replace("%npcId%", String.valueOf(getId()));
|
||||
if (getFort().getOwnerClan() != null)
|
||||
|
||||
@@ -97,14 +97,14 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
if (player.hasClanPrivilege(ClanPrivilege.CS_DISMISS))
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-expel.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-expel.htm");
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
player.sendPacket(html);
|
||||
}
|
||||
else
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-noprivs.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-noprivs.htm");
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
player.sendPacket(html);
|
||||
}
|
||||
@@ -116,14 +116,14 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
{
|
||||
getFort().banishForeigners(); // Move non-clan members off fortress area
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-expeled.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-expeled.htm");
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
player.sendPacket(html);
|
||||
}
|
||||
else
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-noprivs.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-noprivs.htm");
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
player.sendPacket(html);
|
||||
}
|
||||
@@ -134,7 +134,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
if (getFort().getFortState() < 2)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-report.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-report.htm");
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
if (Config.FS_MAX_OWN_TIME > 0)
|
||||
{
|
||||
@@ -155,7 +155,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
else
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-castlereport.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-castlereport.htm");
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
int hour, minutes;
|
||||
if (Config.FS_MAX_OWN_TIME > 0)
|
||||
@@ -196,14 +196,14 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
if (open)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-opened.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-opened.htm");
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
player.sendPacket(html);
|
||||
}
|
||||
else
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-closed.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-closed.htm");
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
player.sendPacket(html);
|
||||
}
|
||||
@@ -211,7 +211,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
else
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/" + getTemplate().getId() + "-d.htm");
|
||||
html.setFile(player, "data/html/fortress/" + getTemplate().getId() + "-d.htm");
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
html.replace("%npcname%", getName());
|
||||
player.sendPacket(html);
|
||||
@@ -220,7 +220,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
else
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-noprivs.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-noprivs.htm");
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
player.sendPacket(html);
|
||||
}
|
||||
@@ -241,13 +241,13 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-vault.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-vault.htm");
|
||||
sendHtmlMessage(player, html);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-noprivs.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-noprivs.htm");
|
||||
sendHtmlMessage(player, html);
|
||||
}
|
||||
return;
|
||||
@@ -259,11 +259,11 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
if (getFort().getFortFunction(Fort.FUNC_TELEPORT) == null)
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-nac.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-nac.htm");
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/" + getId() + "-t" + getFort().getFortFunction(Fort.FUNC_TELEPORT).getLvl() + ".htm");
|
||||
html.setFile(player, "data/html/fortress/" + getId() + "-t" + getFort().getFortFunction(Fort.FUNC_TELEPORT).getLvl() + ".htm");
|
||||
}
|
||||
sendHtmlMessage(player, html);
|
||||
}
|
||||
@@ -272,11 +272,11 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
if (getFort().getFortFunction(Fort.FUNC_SUPPORT) == null)
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-nac.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-nac.htm");
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/support" + getFort().getFortFunction(Fort.FUNC_SUPPORT).getLvl() + ".htm");
|
||||
html.setFile(player, "data/html/fortress/support" + getFort().getFortFunction(Fort.FUNC_SUPPORT).getLvl() + ".htm");
|
||||
html.replace("%mp%", String.valueOf((int) getCurrentMp()));
|
||||
}
|
||||
sendHtmlMessage(player, html);
|
||||
@@ -288,7 +288,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
else
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-functions.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-functions.htm");
|
||||
if (getFort().getFortFunction(Fort.FUNC_RESTORE_EXP) != null)
|
||||
{
|
||||
html.replace("%xp_regen%", String.valueOf(getFort().getFortFunction(Fort.FUNC_RESTORE_EXP).getLvl()));
|
||||
@@ -334,7 +334,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
if (val.equalsIgnoreCase("hp_cancel"))
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-cancel.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-cancel.htm");
|
||||
html.replace("%apply%", "recovery hp 0");
|
||||
sendHtmlMessage(player, html);
|
||||
return;
|
||||
@@ -342,7 +342,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
else if (val.equalsIgnoreCase("mp_cancel"))
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-cancel.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-cancel.htm");
|
||||
html.replace("%apply%", "recovery mp 0");
|
||||
sendHtmlMessage(player, html);
|
||||
return;
|
||||
@@ -350,7 +350,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
else if (val.equalsIgnoreCase("exp_cancel"))
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-cancel.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-cancel.htm");
|
||||
html.replace("%apply%", "recovery exp 0");
|
||||
sendHtmlMessage(player, html);
|
||||
return;
|
||||
@@ -359,7 +359,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
{
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-apply.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-apply.htm");
|
||||
html.replace("%name%", "(HP Recovery Device)");
|
||||
final int percent = Integer.parseInt(val);
|
||||
int cost;
|
||||
@@ -387,7 +387,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
{
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-apply.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-apply.htm");
|
||||
html.replace("%name%", "(MP Recovery)");
|
||||
final int percent = Integer.parseInt(val);
|
||||
int cost;
|
||||
@@ -414,7 +414,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
{
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-apply.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-apply.htm");
|
||||
html.replace("%name%", "(EXP Recovery Device)");
|
||||
final int percent = Integer.parseInt(val);
|
||||
int cost;
|
||||
@@ -444,12 +444,12 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
int fee;
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-apply_confirmed.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-apply_confirmed.htm");
|
||||
if (getFort().getFortFunction(Fort.FUNC_RESTORE_HP) != null)
|
||||
{
|
||||
if (getFort().getFortFunction(Fort.FUNC_RESTORE_HP).getLvl() == Integer.parseInt(val))
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-used.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-used.htm");
|
||||
html.replace("%val%", val + "%");
|
||||
sendHtmlMessage(player, html);
|
||||
return;
|
||||
@@ -461,7 +461,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
case 0:
|
||||
{
|
||||
fee = 0;
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-cancel_confirmed.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-cancel_confirmed.htm");
|
||||
break;
|
||||
}
|
||||
case 300:
|
||||
@@ -477,7 +477,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
}
|
||||
if (!getFort().updateFunctions(player, Fort.FUNC_RESTORE_HP, percent, fee, Config.FS_HPREG_FEE_RATIO, (getFort().getFortFunction(Fort.FUNC_RESTORE_HP) == null)))
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/low_adena.htm");
|
||||
html.setFile(player, "data/html/fortress/low_adena.htm");
|
||||
sendHtmlMessage(player, html);
|
||||
}
|
||||
sendHtmlMessage(player, html);
|
||||
@@ -491,12 +491,12 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
int fee;
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-apply_confirmed.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-apply_confirmed.htm");
|
||||
if (getFort().getFortFunction(Fort.FUNC_RESTORE_MP) != null)
|
||||
{
|
||||
if (getFort().getFortFunction(Fort.FUNC_RESTORE_MP).getLvl() == Integer.parseInt(val))
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-used.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-used.htm");
|
||||
html.replace("%val%", val + "%");
|
||||
sendHtmlMessage(player, html);
|
||||
return;
|
||||
@@ -508,7 +508,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
case 0:
|
||||
{
|
||||
fee = 0;
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-cancel_confirmed.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-cancel_confirmed.htm");
|
||||
break;
|
||||
}
|
||||
case 40:
|
||||
@@ -524,7 +524,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
}
|
||||
if (!getFort().updateFunctions(player, Fort.FUNC_RESTORE_MP, percent, fee, Config.FS_MPREG_FEE_RATIO, (getFort().getFortFunction(Fort.FUNC_RESTORE_MP) == null)))
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/low_adena.htm");
|
||||
html.setFile(player, "data/html/fortress/low_adena.htm");
|
||||
sendHtmlMessage(player, html);
|
||||
}
|
||||
sendHtmlMessage(player, html);
|
||||
@@ -538,12 +538,12 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
int fee;
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-apply_confirmed.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-apply_confirmed.htm");
|
||||
if (getFort().getFortFunction(Fort.FUNC_RESTORE_EXP) != null)
|
||||
{
|
||||
if (getFort().getFortFunction(Fort.FUNC_RESTORE_EXP).getLvl() == Integer.parseInt(val))
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-used.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-used.htm");
|
||||
html.replace("%val%", val + "%");
|
||||
sendHtmlMessage(player, html);
|
||||
return;
|
||||
@@ -555,7 +555,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
case 0:
|
||||
{
|
||||
fee = 0;
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-cancel_confirmed.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-cancel_confirmed.htm");
|
||||
break;
|
||||
}
|
||||
case 45:
|
||||
@@ -571,7 +571,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
}
|
||||
if (!getFort().updateFunctions(player, Fort.FUNC_RESTORE_EXP, percent, fee, Config.FS_EXPREG_FEE_RATIO, (getFort().getFortFunction(Fort.FUNC_RESTORE_EXP) == null)))
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/low_adena.htm");
|
||||
html.setFile(player, "data/html/fortress/low_adena.htm");
|
||||
sendHtmlMessage(player, html);
|
||||
}
|
||||
sendHtmlMessage(player, html);
|
||||
@@ -580,7 +580,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
}
|
||||
}
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/edit_recovery.htm");
|
||||
html.setFile(player, "data/html/fortress/edit_recovery.htm");
|
||||
final String hp = "[<a action=\"bypass -h npc_%objectId%_manage recovery edit_hp 300\">300%</a>][<a action=\"bypass -h npc_%objectId%_manage recovery edit_hp 400\">400%</a>]";
|
||||
final String exp = "[<a action=\"bypass -h npc_%objectId%_manage recovery edit_exp 45\">45%</a>][<a action=\"bypass -h npc_%objectId%_manage recovery edit_exp 50\">50%</a>]";
|
||||
final String mp = "[<a action=\"bypass -h npc_%objectId%_manage recovery edit_mp 40\">40%</a>][<a action=\"bypass -h npc_%objectId%_manage recovery edit_mp 50\">50%</a>]";
|
||||
@@ -635,7 +635,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
if (val.equalsIgnoreCase("tele_cancel"))
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-cancel.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-cancel.htm");
|
||||
html.replace("%apply%", "other tele 0");
|
||||
sendHtmlMessage(player, html);
|
||||
return;
|
||||
@@ -643,7 +643,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
else if (val.equalsIgnoreCase("support_cancel"))
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-cancel.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-cancel.htm");
|
||||
html.replace("%apply%", "other support 0");
|
||||
sendHtmlMessage(player, html);
|
||||
return;
|
||||
@@ -652,7 +652,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
{
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-apply.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-apply.htm");
|
||||
html.replace("%name%", "Insignia (Supplementary Magic)");
|
||||
final int stage = Integer.parseInt(val);
|
||||
int cost;
|
||||
@@ -679,7 +679,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
{
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-apply.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-apply.htm");
|
||||
html.replace("%name%", "Mirror (Teleportation Device)");
|
||||
final int stage = Integer.parseInt(val);
|
||||
int cost;
|
||||
@@ -709,12 +709,12 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
int fee;
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-apply_confirmed.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-apply_confirmed.htm");
|
||||
if (getFort().getFortFunction(Fort.FUNC_TELEPORT) != null)
|
||||
{
|
||||
if (getFort().getFortFunction(Fort.FUNC_TELEPORT).getLvl() == Integer.parseInt(val))
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-used.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-used.htm");
|
||||
html.replace("%val%", "Stage " + val);
|
||||
sendHtmlMessage(player, html);
|
||||
return;
|
||||
@@ -726,7 +726,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
case 0:
|
||||
{
|
||||
fee = 0;
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-cancel_confirmed.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-cancel_confirmed.htm");
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
@@ -742,7 +742,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
}
|
||||
if (!getFort().updateFunctions(player, Fort.FUNC_TELEPORT, lvl, fee, Config.FS_TELE_FEE_RATIO, (getFort().getFortFunction(Fort.FUNC_TELEPORT) == null)))
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/low_adena.htm");
|
||||
html.setFile(player, "data/html/fortress/low_adena.htm");
|
||||
sendHtmlMessage(player, html);
|
||||
}
|
||||
sendHtmlMessage(player, html);
|
||||
@@ -756,12 +756,12 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
int fee;
|
||||
val = st.nextToken();
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-apply_confirmed.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-apply_confirmed.htm");
|
||||
if (getFort().getFortFunction(Fort.FUNC_SUPPORT) != null)
|
||||
{
|
||||
if (getFort().getFortFunction(Fort.FUNC_SUPPORT).getLvl() == Integer.parseInt(val))
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-used.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-used.htm");
|
||||
html.replace("%val%", "Stage " + val);
|
||||
sendHtmlMessage(player, html);
|
||||
return;
|
||||
@@ -773,7 +773,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
case 0:
|
||||
{
|
||||
fee = 0;
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/functions-cancel_confirmed.htm");
|
||||
html.setFile(player, "data/html/fortress/functions-cancel_confirmed.htm");
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
@@ -789,7 +789,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
}
|
||||
if (!getFort().updateFunctions(player, Fort.FUNC_SUPPORT, lvl, fee, Config.FS_SUPPORT_FEE_RATIO, (getFort().getFortFunction(Fort.FUNC_SUPPORT) == null)))
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/low_adena.htm");
|
||||
html.setFile(player, "data/html/fortress/low_adena.htm");
|
||||
sendHtmlMessage(player, html);
|
||||
}
|
||||
else
|
||||
@@ -801,7 +801,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
}
|
||||
}
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/edit_other.htm");
|
||||
html.setFile(player, "data/html/fortress/edit_other.htm");
|
||||
final String tele = "[<a action=\"bypass -h npc_%objectId%_manage other edit_tele 1\">Level 1</a>][<a action=\"bypass -h npc_%objectId%_manage other edit_tele 2\">Level 2</a>]";
|
||||
final String support = "[<a action=\"bypass -h npc_%objectId%_manage other edit_support 1\">Level 1</a>][<a action=\"bypass -h npc_%objectId%_manage other edit_support 2\">Level 2</a>]";
|
||||
if (getFort().getFortFunction(Fort.FUNC_TELEPORT) != null)
|
||||
@@ -837,14 +837,14 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
else
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/manage.htm");
|
||||
html.setFile(player, "data/html/fortress/manage.htm");
|
||||
sendHtmlMessage(player, html);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-noprivs.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-noprivs.htm");
|
||||
sendHtmlMessage(player, html);
|
||||
}
|
||||
return;
|
||||
@@ -888,12 +888,12 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/support-no_mana.htm");
|
||||
html.setFile(player, "data/html/fortress/support-no_mana.htm");
|
||||
html.replace("%mp%", String.valueOf((int) getCurrentMp()));
|
||||
sendHtmlMessage(player, html);
|
||||
return;
|
||||
}
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/support-done.htm");
|
||||
html.setFile(player, "data/html/fortress/support-done.htm");
|
||||
html.replace("%mp%", String.valueOf((int) getCurrentMp()));
|
||||
sendHtmlMessage(player, html);
|
||||
}
|
||||
@@ -915,7 +915,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
{
|
||||
return;
|
||||
}
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/support" + getFort().getFortFunction(Fort.FUNC_SUPPORT).getLvl() + ".htm");
|
||||
html.setFile(player, "data/html/fortress/support" + getFort().getFortFunction(Fort.FUNC_SUPPORT).getLvl() + ".htm");
|
||||
html.replace("%mp%", String.valueOf((int) getStatus().getCurrentMp()));
|
||||
sendHtmlMessage(player, html);
|
||||
return;
|
||||
@@ -963,7 +963,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
}
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), filename);
|
||||
html.setFile(player, filename);
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
html.replace("%npcname%", getName());
|
||||
player.sendPacket(html);
|
||||
@@ -1006,7 +1006,7 @@ public class L2FortManagerInstance extends L2MerchantInstance
|
||||
else
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fortress/foreman-noprivs.htm");
|
||||
html.setFile(player, "data/html/fortress/foreman-noprivs.htm");
|
||||
sendHtmlMessage(player, html);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public final class L2ObservationInstance extends L2Npc
|
||||
}
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), filename);
|
||||
html.setFile(player, filename);
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
player.sendPacket(html);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class L2PetManagerInstance extends L2MerchantInstance
|
||||
}
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), filename);
|
||||
html.setFile(player, filename);
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
html.replace("%npcname%", getName());
|
||||
player.sendPacket(html);
|
||||
@@ -127,7 +127,7 @@ public class L2PetManagerInstance extends L2MerchantInstance
|
||||
if (!ok)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/petmanager/evolve_no.htm");
|
||||
html.setFile(player, "data/html/petmanager/evolve_no.htm");
|
||||
player.sendPacket(html);
|
||||
}
|
||||
return;
|
||||
@@ -169,7 +169,7 @@ public class L2PetManagerInstance extends L2MerchantInstance
|
||||
if (!ok)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/petmanager/restore_no.htm");
|
||||
html.setFile(player, "data/html/petmanager/restore_no.htm");
|
||||
player.sendPacket(html);
|
||||
}
|
||||
return;
|
||||
@@ -186,12 +186,12 @@ public class L2PetManagerInstance extends L2MerchantInstance
|
||||
if (player.destroyItemByItemId("Consume", itemIdtake, 1, this, true))
|
||||
{
|
||||
player.addItem("", itemIdgive, 1, this, true);
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/petmanager/" + getId() + ".htm");
|
||||
html.setFile(player, "data/html/petmanager/" + getId() + ".htm");
|
||||
player.sendPacket(html);
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/petmanager/exchange_no.htm");
|
||||
html.setFile(player, "data/html/petmanager/exchange_no.htm");
|
||||
player.sendPacket(html);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public final class L2TeleporterInstance extends L2Npc
|
||||
private void sendHtmlMessage(L2PcInstance player, String filename)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), filename);
|
||||
html.setFile(player, filename);
|
||||
html.replace("%objectId%", String.valueOf(getObjectId()));
|
||||
html.replace("%npcname%", getName());
|
||||
player.sendPacket(html);
|
||||
|
||||
@@ -256,11 +256,11 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
if (clan.getNewLeaderId() == 0)
|
||||
{
|
||||
clan.setNewLeaderId(member.getObjectId(), true);
|
||||
msg.setFile(player.getHtmlPrefix(), "data/scripts/village_master/Clan/9000-07-success.htm");
|
||||
msg.setFile(player, "data/scripts/village_master/Clan/9000-07-success.htm");
|
||||
}
|
||||
else
|
||||
{
|
||||
msg.setFile(player.getHtmlPrefix(), "data/scripts/village_master/Clan/9000-07-in-progress.htm");
|
||||
msg.setFile(player, "data/scripts/village_master/Clan/9000-07-in-progress.htm");
|
||||
}
|
||||
player.sendPacket(msg);
|
||||
}
|
||||
@@ -278,7 +278,7 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
if (clan.getNewLeaderId() != 0)
|
||||
{
|
||||
clan.setNewLeaderId(0, true);
|
||||
msg.setFile(player.getHtmlPrefix(), "data/scripts/village_master/Clan/9000-07-canceled.htm");
|
||||
msg.setFile(player, "data/scripts/village_master/Clan/9000-07-canceled.htm");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -315,14 +315,14 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
// Subclasses may not be changed while a transformated state.
|
||||
if (player.getTransformation() != null)
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_NoTransformed.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_NoTransformed.htm");
|
||||
player.sendPacket(html);
|
||||
return;
|
||||
}
|
||||
// Subclasses may not be changed while a summon is active.
|
||||
if (player.hasSummon())
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_NoSummon.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_NoSummon.htm");
|
||||
player.sendPacket(html);
|
||||
return;
|
||||
}
|
||||
@@ -370,20 +370,20 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
switch (cmdChoice)
|
||||
{
|
||||
case 0: // Subclass change menu
|
||||
html.setFile(player.getHtmlPrefix(), getSubClassMenu(player.getRace()));
|
||||
html.setFile(player, getSubClassMenu(player.getRace()));
|
||||
break;
|
||||
case 1: // Add Subclass - Initial
|
||||
// Avoid giving player an option to add a new sub class, if they have max sub-classes already.
|
||||
if (player.getTotalSubClasses() >= Config.MAX_SUBCLASS)
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), getSubClassFail());
|
||||
html.setFile(player, getSubClassFail());
|
||||
break;
|
||||
}
|
||||
|
||||
subsAvailable = getAvailableSubClasses(player);
|
||||
if ((subsAvailable != null) && !subsAvailable.isEmpty())
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_Add.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_Add.htm");
|
||||
final StringBuilder content1 = new StringBuilder(200);
|
||||
for (PlayerClass subClass : subsAvailable)
|
||||
{
|
||||
@@ -395,12 +395,12 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
{
|
||||
if ((player.getRace() == Race.ELF) || (player.getRace() == Race.DARK_ELF))
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_Fail_Elves.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_Fail_Elves.htm");
|
||||
player.sendPacket(html);
|
||||
}
|
||||
else if (player.getRace() == Race.KAMAEL)
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_Fail_Kamael.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_Fail_Kamael.htm");
|
||||
player.sendPacket(html);
|
||||
}
|
||||
else
|
||||
@@ -414,7 +414,7 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
case 2: // Change Class - Initial
|
||||
if (player.getSubClasses().isEmpty())
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_ChangeNo.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_ChangeNo.htm");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -435,26 +435,26 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
|
||||
if (content2.length() > 0)
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_Change.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_Change.htm");
|
||||
html.replace("%list%", content2.toString());
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_ChangeNotFound.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_ChangeNotFound.htm");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3: // Change/Cancel Subclass - Initial
|
||||
if ((player.getSubClasses() == null) || player.getSubClasses().isEmpty())
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_ModifyEmpty.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_ModifyEmpty.htm");
|
||||
break;
|
||||
}
|
||||
|
||||
// custom value
|
||||
if (player.getTotalSubClasses() > 3)
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_ModifyCustom.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_ModifyCustom.htm");
|
||||
final StringBuilder content3 = new StringBuilder(200);
|
||||
int classIndex = 1;
|
||||
|
||||
@@ -469,7 +469,7 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
else
|
||||
{
|
||||
// retail html contain only 3 subclasses
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_Modify.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_Modify.htm");
|
||||
if (player.getSubClasses().containsKey(1))
|
||||
{
|
||||
html.replace("%sub1%", ClassListData.getInstance().getClass(player.getSubClasses().get(1).getClassId()).getClientCode());
|
||||
@@ -555,13 +555,13 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
|
||||
player.setActiveClass(player.getTotalSubClasses());
|
||||
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_AddOk.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_AddOk.htm");
|
||||
|
||||
player.sendPacket(SystemMessageId.THE_NEW_SUBCLASS_HAS_BEEN_ADDED); // Subclass added.
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), getSubClassFail());
|
||||
html.setFile(player, getSubClassFail());
|
||||
}
|
||||
break;
|
||||
case 5: // Change Class - Action
|
||||
@@ -576,7 +576,7 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
|
||||
if (player.getClassIndex() == paramOne)
|
||||
{
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_Current.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_Current.htm");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -631,16 +631,16 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
switch (paramOne)
|
||||
{
|
||||
case 1:
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_ModifyChoice1.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_ModifyChoice1.htm");
|
||||
break;
|
||||
case 2:
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_ModifyChoice2.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_ModifyChoice2.htm");
|
||||
break;
|
||||
case 3:
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_ModifyChoice3.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_ModifyChoice3.htm");
|
||||
break;
|
||||
default:
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_ModifyChoice.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_ModifyChoice.htm");
|
||||
}
|
||||
html.replace("%list%", content6.toString());
|
||||
break;
|
||||
@@ -667,7 +667,7 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
player.stopCubics();
|
||||
player.setActiveClass(paramOne);
|
||||
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/SubClass_ModifyOk.htm");
|
||||
html.setFile(player, "data/html/villagemaster/SubClass_ModifyOk.htm");
|
||||
html.replace("%name%", ClassListData.getInstance().getClass(paramTwo).getClientCode());
|
||||
|
||||
player.sendPacket(SystemMessageId.THE_NEW_SUBCLASS_HAS_BEEN_ADDED); // Subclass added.
|
||||
@@ -1180,7 +1180,7 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
if (!player.isClanLeader())
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage();
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/NotClanLeader.htm");
|
||||
html.setFile(player, "data/html/villagemaster/NotClanLeader.htm");
|
||||
player.sendPacket(html);
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
@@ -1206,7 +1206,7 @@ public class L2VillageMasterInstance extends L2NpcInstance
|
||||
else
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage();
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/villagemaster/NoMoreSkills.htm");
|
||||
html.setFile(player, "data/html/villagemaster/NoMoreSkills.htm");
|
||||
player.sendPacket(html);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ public class CeremonyOfChaosEvent extends AbstractEvent<CeremonyOfChaosMember>
|
||||
player.registerOnEvent(this);
|
||||
|
||||
// Load the html
|
||||
msg.setFile(player.getHtmlPrefix(), "data/html/CeremonyOfChaos/started.htm");
|
||||
msg.setFile(player, "data/html/CeremonyOfChaos/started.htm");
|
||||
|
||||
// Remove buffs
|
||||
player.stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||
|
||||
@@ -449,7 +449,7 @@ public class Hero
|
||||
if (mainList != null)
|
||||
{
|
||||
final NpcHtmlMessage DiaryReply = new NpcHtmlMessage();
|
||||
final String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/olympiad/herodiary.htm");
|
||||
final String htmContent = HtmCache.getInstance().getHtm(activeChar, "data/html/olympiad/herodiary.htm");
|
||||
final String heroMessage = _heroMessage.get(charid);
|
||||
if ((htmContent != null) && (heroMessage != null))
|
||||
{
|
||||
@@ -535,7 +535,7 @@ public class Hero
|
||||
if (heroFights != null)
|
||||
{
|
||||
final NpcHtmlMessage FightReply = new NpcHtmlMessage();
|
||||
final String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/olympiad/herohistory.htm");
|
||||
final String htmContent = HtmCache.getInstance().getHtm(activeChar, "data/html/olympiad/herohistory.htm");
|
||||
if (htmContent != null)
|
||||
{
|
||||
FightReply.setHtml(htmContent);
|
||||
|
||||
@@ -131,11 +131,11 @@ public class L2Event
|
||||
|
||||
if (_registeredPlayers.contains(player))
|
||||
{
|
||||
htmContent = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/mods/EventEngine/Participating.htm");
|
||||
htmContent = HtmCache.getInstance().getHtm(player, "data/html/mods/EventEngine/Participating.htm");
|
||||
}
|
||||
else
|
||||
{
|
||||
htmContent = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/mods/EventEngine/Participation.htm");
|
||||
htmContent = HtmCache.getInstance().getHtm(player, "data/html/mods/EventEngine/Participation.htm");
|
||||
}
|
||||
|
||||
if (htmContent != null)
|
||||
|
||||
@@ -207,7 +207,7 @@ public class OlympiadManager
|
||||
if ((Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0) && !AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.OLYMPIAD_ID, player, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP))
|
||||
{
|
||||
final NpcHtmlMessage message = new NpcHtmlMessage(player.getLastHtmlActionOriginId());
|
||||
message.setFile(player.getHtmlPrefix(), "data/html/mods/OlympiadIPRestriction.htm");
|
||||
message.setFile(player, "data/html/mods/OlympiadIPRestriction.htm");
|
||||
message.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(player, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)));
|
||||
player.sendPacket(message);
|
||||
return false;
|
||||
@@ -234,7 +234,7 @@ public class OlympiadManager
|
||||
if ((Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0) && !AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.OLYMPIAD_ID, player, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP))
|
||||
{
|
||||
final NpcHtmlMessage message = new NpcHtmlMessage(player.getLastHtmlActionOriginId());
|
||||
message.setFile(player.getHtmlPrefix(), "data/html/mods/OlympiadIPRestriction.htm");
|
||||
message.setFile(player, "data/html/mods/OlympiadIPRestriction.htm");
|
||||
message.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(player, Config.DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)));
|
||||
player.sendPacket(message);
|
||||
return false;
|
||||
|
||||
@@ -1777,7 +1777,7 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
*/
|
||||
public static String getNoQuestMsg(L2PcInstance player)
|
||||
{
|
||||
final String result = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/noquest.htm");
|
||||
final String result = HtmCache.getInstance().getHtm(player, "data/html/noquest.htm");
|
||||
if ((result != null) && (result.length() > 0))
|
||||
{
|
||||
return result;
|
||||
@@ -1791,7 +1791,7 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
*/
|
||||
public static String getNoQuestLevelRewardMsg(L2PcInstance player)
|
||||
{
|
||||
return HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/noquestlevelreward.html");
|
||||
return HtmCache.getInstance().getHtm(player, "data/html/noquestlevelreward.html");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1810,7 +1810,7 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
*/
|
||||
public static String getAlreadyCompletedMsg(L2PcInstance player, QuestType type)
|
||||
{
|
||||
return HtmCache.getInstance().getHtm(player.getHtmlPrefix(), (type == QuestType.ONE_TIME ? "data/html/alreadyCompleted.html" : "data/html/alreadyCompletedDaily.html"));
|
||||
return HtmCache.getInstance().getHtm(player, (type == QuestType.ONE_TIME ? "data/html/alreadyCompleted.html" : "data/html/alreadyCompletedDaily.html"));
|
||||
}
|
||||
|
||||
// TODO: Clean up these methods
|
||||
@@ -2738,7 +2738,7 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
final int questId = getId();
|
||||
|
||||
// Create handler to file linked to the quest
|
||||
String content = getHtm(player.getHtmlPrefix(), filename);
|
||||
String content = getHtm(player, filename);
|
||||
|
||||
// Send message to client if message not empty
|
||||
if (content != null)
|
||||
@@ -2768,20 +2768,20 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param prefix player's language prefix.
|
||||
* @param player for language prefix.
|
||||
* @param fileName the html file to be get.
|
||||
* @return the HTML file contents
|
||||
*/
|
||||
public String getHtm(String prefix, String fileName)
|
||||
public String getHtm(L2PcInstance player, String fileName)
|
||||
{
|
||||
final HtmCache hc = HtmCache.getInstance();
|
||||
String content = hc.getHtm(prefix, fileName.startsWith("data/") ? fileName : "data/scripts/" + getPath().toLowerCase() + "/" + fileName);
|
||||
String content = hc.getHtm(player, fileName.startsWith("data/") ? fileName : "data/scripts/" + getPath() + "/" + fileName);
|
||||
if (content == null)
|
||||
{
|
||||
content = hc.getHtm(prefix, "data/scripts/" + getPath() + "/" + fileName);
|
||||
content = hc.getHtm(player, "data/scripts/" + getPath() + "/" + fileName);
|
||||
if (content == null)
|
||||
{
|
||||
content = hc.getHtmForce(prefix, "data/scripts/quests/" + getName() + "/" + fileName);
|
||||
content = hc.getHtmForce(player, "data/scripts/quests/" + getName() + "/" + fileName);
|
||||
}
|
||||
}
|
||||
return content;
|
||||
|
||||
@@ -179,7 +179,7 @@ public final class TeleportHolder
|
||||
|
||||
// Send html message
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||
msg.setFile(player.getHtmlPrefix(), "data/html/teleporter/teleports.htm");
|
||||
msg.setFile(player, "data/html/teleporter/teleports.htm");
|
||||
msg.replace("%locations%", sb_f.toString());
|
||||
player.sendPacket(msg);
|
||||
}
|
||||
@@ -221,7 +221,7 @@ public final class TeleportHolder
|
||||
if (npc.getCastle().getSiege().isInProgress())
|
||||
{
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||
msg.setFile(player.getHtmlPrefix(), "data/html/teleporter/castleteleporter-busy.htm");
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
player.sendPacket(msg);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class Debug
|
||||
}
|
||||
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage();
|
||||
msg.setFile(creature.getActingPlayer().getHtmlPrefix(), "data/html/admin/statsdebug.htm");
|
||||
msg.setFile(creature.getActingPlayer(), "data/html/admin/statsdebug.htm");
|
||||
msg.replace("%stat%", String.valueOf(stat));
|
||||
msg.replace("%mulValue%", Util.formatDouble(creature.getStat().getMul(stat), "#.##"));
|
||||
msg.replace("%addValue%", creature.getStat().getAdd(stat));
|
||||
@@ -77,7 +77,7 @@ public class Debug
|
||||
}
|
||||
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage();
|
||||
msg.setFile(attacker.getActingPlayer().getHtmlPrefix(), "data/html/admin/skilldebug.htm");
|
||||
msg.setFile(attacker.getActingPlayer(), "data/html/admin/skilldebug.htm");
|
||||
msg.replace("%patk%", target.getPAtk());
|
||||
msg.replace("%matk%", target.getMAtk());
|
||||
msg.replace("%pdef%", target.getPDef());
|
||||
@@ -116,7 +116,7 @@ public class Debug
|
||||
}
|
||||
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage();
|
||||
msg.setFile(player.getHtmlPrefix(), "data/html/admin/itemdebug.htm");
|
||||
msg.setFile(player, "data/html/admin/itemdebug.htm");
|
||||
msg.replace("%itemName%", item.getName());
|
||||
msg.replace("%itemSlot%", getBodyPart(item.getItem().getBodyPart()));
|
||||
msg.replace("%itemType%", item.isArmor() ? "Armor" : item.isWeapon() ? "Weapon" : "Etc");
|
||||
|
||||
@@ -118,7 +118,7 @@ public class CharacterSelect implements IClientIncomingPacket
|
||||
if ((Config.DUALBOX_CHECK_MAX_PLAYERS_PER_IP > 0) && !AntiFeedManager.getInstance().tryAddClient(AntiFeedManager.GAME_ID, client, Config.DUALBOX_CHECK_MAX_PLAYERS_PER_IP))
|
||||
{
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage();
|
||||
msg.setFile(info.getHtmlPrefix(), "data/html/mods/IPRestriction.htm");
|
||||
msg.setFile(null, "data/html/mods/IPRestriction.htm");
|
||||
msg.replace("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(client, Config.DUALBOX_CHECK_MAX_PLAYERS_PER_IP)));
|
||||
client.sendPacket(msg);
|
||||
return;
|
||||
@@ -129,7 +129,7 @@ public class CharacterSelect implements IClientIncomingPacket
|
||||
if (info.isGood() && (L2World.getInstance().getAllGoodPlayers().size() >= (L2World.getInstance().getAllEvilPlayers().size() + Config.FACTION_BALANCE_PLAYER_EXCEED_LIMIT)))
|
||||
{
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage();
|
||||
msg.setFile(info.getHtmlPrefix(), "data/html/mods/Faction/ExceededOnlineLimit.htm");
|
||||
msg.setFile(null, "data/html/mods/Faction/ExceededOnlineLimit.htm");
|
||||
msg.replace("%more%", Config.FACTION_GOOD_TEAM_NAME);
|
||||
msg.replace("%less%", Config.FACTION_EVIL_TEAM_NAME);
|
||||
client.sendPacket(msg);
|
||||
@@ -138,7 +138,7 @@ public class CharacterSelect implements IClientIncomingPacket
|
||||
if (info.isEvil() && (L2World.getInstance().getAllEvilPlayers().size() >= (L2World.getInstance().getAllGoodPlayers().size() + Config.FACTION_BALANCE_PLAYER_EXCEED_LIMIT)))
|
||||
{
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage();
|
||||
msg.setFile(info.getHtmlPrefix(), "data/html/mods/Faction/ExceededOnlineLimit.htm");
|
||||
msg.setFile(null, "data/html/mods/Faction/ExceededOnlineLimit.htm");
|
||||
msg.replace("%more%", Config.FACTION_EVIL_TEAM_NAME);
|
||||
msg.replace("%less%", Config.FACTION_GOOD_TEAM_NAME);
|
||||
client.sendPacket(msg);
|
||||
|
||||
@@ -519,7 +519,7 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
if (showClanNotice)
|
||||
{
|
||||
final NpcHtmlMessage notice = new NpcHtmlMessage();
|
||||
notice.setFile(activeChar.getHtmlPrefix(), "data/html/clanNotice.htm");
|
||||
notice.setFile(activeChar, "data/html/clanNotice.htm");
|
||||
notice.replace("%clan_name%", activeChar.getClan().getName());
|
||||
notice.replace("%notice_text%", activeChar.getClan().getNotice());
|
||||
notice.disableValidation();
|
||||
@@ -527,7 +527,7 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
else if (Config.SERVER_NEWS)
|
||||
{
|
||||
final String serverNews = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/servnews.htm");
|
||||
final String serverNews = HtmCache.getInstance().getHtm(activeChar, "data/html/servnews.htm");
|
||||
if (serverNews != null)
|
||||
{
|
||||
client.sendPacket(new NpcHtmlMessage(serverNews));
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ExPCCafeRequestOpenWindowWithoutNPC implements IClientIncomingPacke
|
||||
if ((activeChar != null) && Config.PC_CAFE_ENABLED)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage();
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/pccafe.htm");
|
||||
html.setFile(activeChar, "data/html/pccafe.htm");
|
||||
activeChar.sendPacket(html);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public final class RequestLinkHtml implements IClientIncomingPacket
|
||||
|
||||
final String filename = "data/html/" + _link;
|
||||
final NpcHtmlMessage msg = new NpcHtmlMessage(htmlObjectId);
|
||||
msg.setFile(actor.getHtmlPrefix(), filename);
|
||||
msg.setFile(actor, filename);
|
||||
actor.sendPacket(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class RequestCuriousHouseHtml implements IClientIncomingPacket
|
||||
if (CeremonyOfChaosManager.getInstance().canRegister(player, true))
|
||||
{
|
||||
final NpcHtmlMessage message = new NpcHtmlMessage(0);
|
||||
message.setFile(player.getHtmlPrefix(), "data/html/CeremonyOfChaos/invite.htm");
|
||||
message.setFile(player, "data/html/CeremonyOfChaos/invite.htm");
|
||||
player.sendPacket(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,9 +87,9 @@ public abstract class AbstractHtmlPacket implements IClientOutgoingPacket
|
||||
_html = html;
|
||||
}
|
||||
|
||||
public final boolean setFile(String prefix, String path)
|
||||
public final boolean setFile(L2PcInstance player, String path)
|
||||
{
|
||||
final String content = HtmCache.getInstance().getHtm(prefix, path);
|
||||
final String content = HtmCache.getInstance().getHtm(player, path);
|
||||
if (content == null)
|
||||
{
|
||||
setHtml("<html><body>My Text is missing:<br>" + path + "</body></html>");
|
||||
|
||||
@@ -41,6 +41,16 @@ public final class BuilderUtil
|
||||
player.sendPacket(new CreatureSay(0, ChatType.GENERAL, "SYS", message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends builder html message to the player.
|
||||
* @param player
|
||||
* @param message
|
||||
*/
|
||||
public static void sendHtmlMessage(L2PcInstance player, String message)
|
||||
{
|
||||
player.sendPacket(new CreatureSay(0, ChatType.GENERAL, "HTML", message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes player's hiding state.
|
||||
* @param player
|
||||
|
||||
Reference in New Issue
Block a user