Addition of new packet opcodes.
Contributed by Index.
This commit is contained in:
@@ -777,7 +777,15 @@ public enum ExIncomingPackets implements IIncomingPackets<GameClient>
|
||||
EX_VARIATION_CLOSE_UI(0x246, ExVariationCloseUi::new, ConnectionState.IN_GAME),
|
||||
EX_APPLY_VARIATION_OPTION(0x247, ExApplyVariationOption::new, ConnectionState.IN_GAME),
|
||||
EX_BR_VERSION(0x248, null, ConnectionState.IN_GAME),
|
||||
EX_MAX(0x249, null, ConnectionState.IN_GAME);
|
||||
EX_WRANKING_FESTIVAL_INFO(0x249, null, ConnectionState.IN_GAME),
|
||||
EX_WRANKING_FESTIVAL_OPEN(0x24A, null, ConnectionState.IN_GAME),
|
||||
EX_WRANKING_FESTIVAL_BUY(0x24B, null, ConnectionState.IN_GAME),
|
||||
EX_WRANKING_FESTIVAL_BONUS(0x24C, null, ConnectionState.IN_GAME),
|
||||
EX_WRANKING_FESTIVAL_RANKING(0x24D, null, ConnectionState.IN_GAME),
|
||||
EX_WRANKING_FESTIVAL_MY_RECEIVED_BONUS(0x24E, null, ConnectionState.IN_GAME),
|
||||
EX_WRANKING_FESTIVAL_REWARD(0x24F, null, ConnectionState.IN_GAME),
|
||||
EX_HENNA_UNEQUIP_INFO(0x250, RequestNewHennaUnequipInfo::new, ConnectionState.IN_GAME),
|
||||
EX_MAX(0x251, null, ConnectionState.IN_GAME);
|
||||
|
||||
public static final ExIncomingPackets[] PACKET_ARRAY;
|
||||
|
||||
|
@@ -1066,7 +1066,17 @@ public enum OutgoingPackets
|
||||
EX_TIME_RESTRICT_FIELD_DIE_LIMT_TIME(0xFE, 0x306),
|
||||
EX_APPLY_VARIATION_OPTION(0xFE, 0x307),
|
||||
EX_BR_VERSION(0xFE, 0x308),
|
||||
EX_MAX(0xFE, 0x309);
|
||||
EX_NOTIFY_ATTENDANCE(0xFE, 0x309),
|
||||
EX_WRANKING_FESTIVAL_INFO(0xFE, 0x30A),
|
||||
EX_WRANKING_FESTIVAL_SIDEBAR_INFO(0xFE, 0x30B),
|
||||
EX_WRANKING_FESTIVAL_BUY(0xFE, 0x30C),
|
||||
EX_WRANKING_FESTIVAL_BONUS(0xFE, 0x30D),
|
||||
EX_WRANKING_FESTIVAL_RANKING(0xFE, 0x30E),
|
||||
EX_WRANKING_FESTIVAL_MYINFO(0xFE, 0x30F),
|
||||
EX_WRANKING_FESTIVAL_MY_RECEIVED_BONUS(0xFE, 0x310),
|
||||
EX_WRANKING_FESTIVAL_REWARD(0xFE, 0x311),
|
||||
EX_TOOLTIP_PARAM(0xFE, 0x312),
|
||||
EX_MAX(0xFE, 0x313);
|
||||
|
||||
private final int _id1;
|
||||
private final int _id2;
|
||||
|
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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.data.xml.HennaData;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.item.Henna;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.HennaItemRemoveInfo;
|
||||
|
||||
/**
|
||||
* @author Index
|
||||
*/
|
||||
public class RequestNewHennaUnequipInfo implements IClientIncomingPacket
|
||||
{
|
||||
private int _hennaId;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_hennaId = packet.readD();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final Player player = client.getPlayer();
|
||||
if ((player == null) || (_hennaId == 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final Henna henna = HennaData.getInstance().getHenna(_hennaId);
|
||||
if (henna == null)
|
||||
{
|
||||
PacketLogger.warning("Invalid Henna Id: " + _hennaId + " from " + player);
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendPacket(new HennaItemRemoveInfo(henna, player));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user