Retail like builder HTML debugging.
This commit is contained in:
@ -132,6 +132,7 @@ public final class Config
|
||||
public static boolean GM_STARTUP_BUILDER_HIDE;
|
||||
public static boolean GM_STARTUP_INVULNERABLE;
|
||||
public static boolean GM_ANNOUNCER_NAME;
|
||||
public static boolean GM_DEBUG_HTML_PATHS;
|
||||
public static boolean USE_SUPER_HASTE_AS_GM_SPEED;
|
||||
|
||||
public static boolean CHECK_KNOWN;
|
||||
@ -1232,6 +1233,7 @@ public final class Config
|
||||
GM_STARTUP_INVISIBLE = Boolean.parseBoolean(AccessSettings.getProperty("GMStartupInvisible", "true"));
|
||||
GM_SPECIAL_EFFECT = Boolean.parseBoolean(AccessSettings.getProperty("GmLoginSpecialEffect", "false"));
|
||||
GM_STARTUP_SILENCE = Boolean.parseBoolean(AccessSettings.getProperty("GMStartupSilence", "true"));
|
||||
GM_DEBUG_HTML_PATHS = Boolean.parseBoolean(AccessSettings.getProperty("GMDebugHtmlPaths", "true"));
|
||||
USE_SUPER_HASTE_AS_GM_SPEED = Boolean.parseBoolean(AccessSettings.getProperty("UseSuperHasteAsGMSpeed", "false"));
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -22,6 +22,7 @@ import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.cache.HtmCache;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.clientpackets.RequestBypassToServer;
|
||||
import com.l2jmobius.gameserver.util.BuilderUtil;
|
||||
|
||||
/**
|
||||
* The HTML parser in the client knowns these standard and non-standard tags and attributes<br>
|
||||
@ -135,6 +136,9 @@ public class NpcHtmlMessage extends L2GameServerPacket
|
||||
/** The _html. */
|
||||
private String _html;
|
||||
|
||||
/** The _html file. */
|
||||
private String _file = null;
|
||||
|
||||
/** The _validate. */
|
||||
private final boolean _validate = true;
|
||||
|
||||
@ -211,6 +215,7 @@ public class NpcHtmlMessage extends L2GameServerPacket
|
||||
return false;
|
||||
}
|
||||
|
||||
_file = path;
|
||||
setHtml(content);
|
||||
return true;
|
||||
}
|
||||
@ -318,8 +323,13 @@ public class NpcHtmlMessage extends L2GameServerPacket
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
{
|
||||
writeC(0x0f);
|
||||
final L2PcInstance player = getClient().getActiveChar();
|
||||
if ((_file != null) && player.isGM() && Config.GM_DEBUG_HTML_PATHS)
|
||||
{
|
||||
BuilderUtil.sendHtmlMessage(player, _file.substring(10));
|
||||
}
|
||||
|
||||
writeC(0x0f);
|
||||
writeD(_npcObjId);
|
||||
writeS(_html);
|
||||
writeD(0x00);
|
||||
|
@ -37,7 +37,17 @@ public final class BuilderUtil
|
||||
*/
|
||||
public static void sendSysMessage(L2PcInstance player, String message)
|
||||
{
|
||||
player.sendPacket(new CreatureSay(-1, Say2.ALL, "SYS", message));
|
||||
player.sendPacket(new CreatureSay(0, Say2.ALL, "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, Say2.ALL, "HTML", message));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user