|
|
|
@@ -1,52 +1,48 @@
|
|
|
|
|
/*
|
|
|
|
|
* This file is part of the L2J Mobius project.
|
|
|
|
|
*
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
package org.l2jmobius.gameserver.network.clientpackets;
|
|
|
|
|
|
|
|
|
|
import org.l2jmobius.commons.network.PacketReader;
|
|
|
|
|
import org.l2jmobius.gameserver.cache.HtmCache;
|
|
|
|
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
|
|
|
|
import org.l2jmobius.gameserver.network.GameClient;
|
|
|
|
|
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @author Mobius
|
|
|
|
|
*/
|
|
|
|
|
public class ExOpenDimensionalHtml implements IClientIncomingPacket
|
|
|
|
|
{
|
|
|
|
|
@Override
|
|
|
|
|
public boolean read(GameClient client, PacketReader packet)
|
|
|
|
|
{
|
|
|
|
|
packet.readC(); // html scope?
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void run(GameClient client)
|
|
|
|
|
{
|
|
|
|
|
final PlayerInstance player = client.getPlayer();
|
|
|
|
|
if (player == null)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FIXME:
|
|
|
|
|
// client.sendPacket(new ExPremiumManagerShowHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/DimensionalMerchant/32478.html")));
|
|
|
|
|
final NpcHtmlMessage html = new NpcHtmlMessage();
|
|
|
|
|
html.setHtml(HtmCache.getInstance().getHtm(player, "data/scripts/ai/others/DimensionalMerchant/32478.html"));
|
|
|
|
|
player.sendPacket(html);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
* This file is part of the L2J Mobius project.
|
|
|
|
|
*
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
package org.l2jmobius.gameserver.network.clientpackets;
|
|
|
|
|
|
|
|
|
|
import org.l2jmobius.Config;
|
|
|
|
|
import org.l2jmobius.commons.network.PacketReader;
|
|
|
|
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
|
|
|
|
import org.l2jmobius.gameserver.network.GameClient;
|
|
|
|
|
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @author Mobius
|
|
|
|
|
*/
|
|
|
|
|
public class ExOpenHtml implements IClientIncomingPacket
|
|
|
|
|
{
|
|
|
|
|
@Override
|
|
|
|
|
public boolean read(GameClient client, PacketReader packet)
|
|
|
|
|
{
|
|
|
|
|
packet.readC(); // html scope?
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void run(GameClient client)
|
|
|
|
|
{
|
|
|
|
|
final PlayerInstance player = client.getPlayer();
|
|
|
|
|
if ((player != null) && Config.PC_CAFE_ENABLED)
|
|
|
|
|
{
|
|
|
|
|
final NpcHtmlMessage html = new NpcHtmlMessage();
|
|
|
|
|
html.setFile(player, "data/html/pccafe.htm");
|
|
|
|
|
player.sendPacket(html);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|