1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-11 09:42:54 +00:00

NPC Html chat messages

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-05-25 13:54:59 -03:00
parent 7033518023
commit 4a003b21e0
10103 changed files with 56028 additions and 20460 deletions

View File

@@ -93,10 +93,16 @@ public class AbstractNPCController implements NPCController {
* @return the html code
*/
protected String getHTML(NPC npc, String id) {
// id correction - on l2j default chat is also "0".
if ("0".equals(id)) // avoid NullPointerException
id = null;
final NPCTemplate template = npc.getTemplate();
String html = template.getHTML(id);
if (html == null)
return null;
// TODO use an decent template engine
return template.getHTML(id).replaceAll("%objectId%",
npc.getID().getID().toString());
return html.replaceAll("%objectId%", npc.getID().getID().toString());
}
/**