Requirements for new bypass validation(html action caching).
Posted: Wed Aug 28, 2013 4:34 pm
Since the last change to bypass validation(html action caching), NpcHtmlMessage must be filled correctly.
The new bypass validation(html action caching) now relies on the npcObjId passed to the html packets. That gives the possibility to verify if the player is still in the range of the npc, the dialog was opened, when the player clicks on a link.
Examples of bugus usages:
new NpcHtmlMessage(5, 1)
new NpcHtmlMessage(5, 0)
Examples of right usages:
new NpcHtmlMessage()
new NpcHtmlMessage(0, 1)
new NpcHtmlMessage(npc.getObjectId)
new NpcHtmlMessage(npc.getObjectId(), 1)
- Dialogs which don't require you to be near a npc to click it's links
- Use NpcHtmlMessage() or NpcHtmlMessage(String html) constructor. This both constructors set the npcObjId to 0 which means that the player don't need to be in a range of an npc to click links on the opened dialog. When you are required to use another constructor, fill the npcObjId correctly with 0(now itemId will also be send to client even when npcObjId is 0).
- Dialogs which require you to be near the npc you opened the dialog to be able to click links on it
- Use NpcHtmlMessage(int npcObjId), NpcHtmlMessage(int npcObjId, String html), NpcHtmlMessage(int npcObjId, int itemId) or NpcHtmlMessage(int npcObjId, int itemId, String html) constructors. You should fill the npcObjId correctly from the L2Object#getObjectId() method. This means, when a player clicks on a link with an dialog send with npcObjId not equals 0, the player needs to be in the range of this npc spawned in the world so it's bypass is processed.
The new bypass validation(html action caching) now relies on the npcObjId passed to the html packets. That gives the possibility to verify if the player is still in the range of the npc, the dialog was opened, when the player clicks on a link.
Examples of bugus usages:
new NpcHtmlMessage(5, 1)
new NpcHtmlMessage(5, 0)
Examples of right usages:
new NpcHtmlMessage()
new NpcHtmlMessage(0, 1)
new NpcHtmlMessage(npc.getObjectId)
new NpcHtmlMessage(npc.getObjectId(), 1)