Requirements for new bypass validation(html action caching).

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
HorridoJoho
L2j Senior Developer
L2j Senior Developer
Posts: 795
Joined: Sun Aug 14, 2005 11:27 am

Requirements for new bypass validation(html action caching).

Post by HorridoJoho »

Since the last change to bypass validation(html action caching), NpcHtmlMessage must be filled correctly.
  • 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.
Explanation:
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)
User avatar
yksdtc
Posts: 76
Joined: Sat Jul 30, 2011 1:16 pm

Re: Requirements for new bypass validation(html action cachi

Post by yksdtc »

Thank you !
:D
xban1x
L2j Veteran
L2j Veteran
Posts: 1228
Joined: Thu Jan 17, 2013 9:46 am

Re: Requirements for new bypass validation(html action cachi

Post by xban1x »

This should be stickied and put inside F.A.Q . It's a helpful thing for new users. Similar topics should be made for things like PlayerVariables, AccountVariables, NpcVariables, GlobalVariables to explain the differences and usages. These 4 classes i mentioned remove the need of creating a scheme buffer within core cause they offer the developer to make all that stuff from DP side :)
Hyrelius
Posts: 257
Joined: Thu Dec 16, 2010 5:16 am

Re: Requirements for new bypass validation(html action cachi

Post by Hyrelius »

Hm what about community board HTML display? Is there a way to ensure someone is near a NPC when doing bypass validation (except writing it from scratch using getDistance etc.?)?
Image
I don't mind helping - however: I only do so if I want to.
No support for other server packs than L2J.
HorridoJoho
L2j Senior Developer
L2j Senior Developer
Posts: 795
Joined: Sun Aug 14, 2005 11:27 am

Re: Requirements for new bypass validation(html action cachi

Post by HorridoJoho »

Hyrelius wrote:Hm what about community board HTML display? Is there a way to ensure someone is near a NPC when doing bypass validation (except writing it from scratch using getDistance etc.?)?
viewtopic.php?t=29765

Test and report please.
Post Reply